Hi,
I wish to use XFire instead of Axis 1.x for my future WS.
I try tu use the WSGen tool to generate the code from my WSDL but have some trouble to customize namaspace/package mapping.
I use the JAXB option from WSGen tool and an external binding file to customize the namaspace/package mapping. I find an example on the Xfire User'guide but it is very short and not sufficient for my understanding.
Here is an extract of this external binding file :
<?xml version="1.0" encoding="UTF-8"?>
<jxb:bindings jxb:version="1.0"
xmlns:jxb="
http://java.sun.com/xml/ns/jaxb"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<jxb:bindings schemaLocation='C://Documents%20and%20Settings//user//workspace//XfireTest//src//test.wsdl'>
<jxb:bindings node='/wsdl:definitions/wsdl:types/xsd:[EMAIL PROTECTED]http://myproject.com/myservice/exception]'>
<jxb:schemaBindings>
<jxb:package name="my.package.for.service.exception"></jxb:package>
</jxb:schemaBindings>
</jxb:bindings>
<jxb:bindings node='/wsdl:definitions/wsdl:types/xsd:[EMAIL PROTECTED]
http://myproject.com/myservice]'>
<jxb:schemaBindings>
<jxb:package name="my.package.for.service"></jxb:package>
</jxb:schemaBindings>
</jxb:bindings>
<jxb:bindings node="/wsdl:definitions/wsdl:types/xsd:[EMAIL PROTECTED]
http://myproject.com/myservice/data]">
<jxb:schemaBindings>
<jxb:package name="my.package.for.service.data"></jxb:package>
</jxb:schemaBindings>
</jxb:bindings>
</jxb:bindings>
</jxb:bindings>
Here is the WSGen output :
19 oct. 2006 16:16:40 org.codehaus.xfire.gen.Wsdl11Generator generate
INFO: Generating code for WSDL at file:/C://Documents%20and%20Settings//user//workspace//XfireTest//src//test.wsdl with a base URI of C://Documents%20and%20Settings//user//workspace//XfireTest//src//test.wsdl
19 oct. 2006 16:16:41 org.codehaus.xfire.gen.jaxb.ErrorReceiverImpl error
GRAVE: "C://Documents%20and%20Settings//user//workspace//XfireTest//src//test.wsdl" is not a part of this compilation. Is this a mistake for "file:/C:/Documents%20and%20Settings/user/workspace/XfireTest/src/test.wsdl#types?schema3"? at 11,148 in file:/C:/Documents%20and%20Settings/user/workspace/XfirTest/src/external_bindings.xjb.xml
org.codehaus.xfire.gen.GenerationException: Error generating JAXB model.
at org.codehaus.xfire.gen.jaxb.JAXBSchemaSupport.initialize(JAXBSchemaSupport.java:108)
at org.codehaus.xfire.gen.Wsdl11Generator.generate
(Wsdl11Generator.java:119)
at org.codehaus.xfire.gen.WsGen.main(WsGen.java:122)
Exception in thread "main" org.codehaus.xfire.gen.GenerationException: Error generating JAXB model.
at org.codehaus.xfire.gen.WsGen.main
(WsGen.java:126)
Caused by: org.codehaus.xfire.gen.GenerationException: Error generating JAXB model.
at org.codehaus.xfire.gen.jaxb.JAXBSchemaSupport.initialize(JAXBSchemaSupport.java:108)
at org.codehaus.xfire.gen.Wsdl11Generator.generate
(Wsdl11Generator.java:119)
at org.codehaus.xfire.gen.WsGen.main(WsGen.java:122)
Thanks for your help
Laurent
