[OFBiz] Users - Custom services

David E. Jones jonesde at ofbiz.org
Wed Mar 30 23:24:37 EST 2005


The error says you have a bad XML file, looks like there is more detail  
somewhere in the log. Start looking for invalid XML files using the  
validator in your XML editor or something.

-David


On Mar 30, 2005, at 3:20 PM, Ashish Hareet wrote:

>
> Wrong shortcut. Here's the complete message
>
> I'm trying to write my own services using simple-methods.
>
> In my ofbiz-component.xml file I set the appropriate tags
> 	<service-resource type="model" loader="main"  
> location="servicedef/services.xml" />
>
> The services.xml file is in "my_app/servicedef" folder
>
>
> The service is defined as follows
> 	<service name="createPPPostalAddress" engine="simple"
> 		location="services/CustomServices.xml"  
> invoke="createPPPostalAddress" auth="true">
> 		<description>Create a new postal address for PP</description>
> 		<auto-attributes entity-name="PostalAddress" include="nonpk"  
> mode="IN" optional="true" />
> 	</service>
>
>
> When I run the applications the service is not being loaded.
>
> And the following exception results
>
> 10926[ ModelServiceReader.java:161:ERROR]
> ---- exception report  
> ----------------------------------------------------------
> Error getting XML document from resource
> Exception: org.ofbiz.base.config.GenericConfigException
> Message: Error reading ComponentResourceHandler from XML file [pp]  
> with loaderName
> [main] and location [servicedef/services.xml] (The processing  
> instruction target matching "[xX][mM][lL]" is not allowed.)
> ---- stack trace  
> ---------------------------------------------------------------
> org.ofbiz.base.config.GenericConfigException: Error reading  
> ComponentResourceHandler from XML file [pp]
> with loaderName [main] and location [servicedef/services.xml] (The  
> processing instruction target matching "[xX][mM][lL]" is not allowed.)
> org.ofbiz.base.component.ComponentResourceHandler.getDocument(Component 
> ResourceHandler.java:77)
> org.ofbiz.service.ModelServiceReader.getModelServices(ModelServiceReade 
> r.java:159)
>
> Your suggestions are appreciated
> Ashish Hareet
>
> _______________________________________________
> Users mailing list
> Users at lists.ofbiz.org
> http://lists.ofbiz.org/mailman/listinfo/users



More information about the Users mailing list