[jboss-user] [JBossWS] - Re: Is this a valid JAX-WS binding file for wsconsume?

Brad Marshall do-not-reply at jboss.com
Thu Jan 10 11:18:05 EST 2008


I am now getting quite specific. Our WSDL defines four operations and imports 13 schemas. I have solved all of my namespace-to-package mapping issues for our schema files with a JAXB binding file which looks like this:

<jxb:bindings version="1.0"
  |     xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
  |     xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
  |     xmlns:xs="http://www.w3.org/2001/XMLSchema"
  |     wsdlLocation="CARetriever.wsdl">
  |     <jxb:bindings schemaLocation="xyz.xsd" node="/xs:schema">
  |         <jxb:schemaBindings>
  |             <jxb:package name="com.ca.webservice.valueobj.xyz"/>
  |         </jxb:schemaBindings>
  |     </jxb:bindings>
  | <!--and for 12 other schemas as well -->
  | </jxb:bindings>

And I've solved the wsdl:definitions node namespace to mapping issues with a JAX-WS binding file that looks like this:

<jaxws:bindings version="2.0"
  |     xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
  |     xmlns:xs="http://www.w3.org/2001/XMLSchema"
  |     xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
  |     wsdlLocation="CARetriever.wsdl">
  |     <jaxws:bindings xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
  |         node="wsdl:definitions">
  |         <jaxws:package name="com.ca.webservice.caservice"/>
  |     </jaxws:bindings>
  | </jaxws:bindings>
However, my binding element for the WSDL's wsdl:definitions/wsdl:types/xsd:schema node shown below doesn't work - wsconsume produces the message 'Null', then fails to parse the wsdl and subsequently fails to launch WsImport.

<jaxws:bindings version="2.0"
  |     <jaxws:bindings
  |         node="wsdl:definitions/wsdl:types/xsd:schema">
  |         <jxb:schemaBindings>
  |             <jxb:package name="com.ca.webservice.caservice"/>
  |         </jxb:schemaBindings>
  |     </jaxws:bindings>
  | </jaxws:bindings>

I've found many examples of this syntax for this last binding, and I can't see any error. I've also done it with the node attribute written in the (sanitized) form:

node="wsdl:definitions/wsdl:types/xsd:schema[@targetNamespace='http://www.ourdomain.com/our/namespace']">

Alas, with no joy. Can anyone help me understand why this last binding attribute isn't working with wsconsume?


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118735#4118735

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118735



More information about the jboss-user mailing list