[jboss-user] [JBossWS] - no java-xml-type-mapping from wscompile

dschneider@e2open.com do-not-reply at jboss.com
Wed Sep 13 22:30:01 EDT 2006


I've been trying to provide a Web Service implementation on our JBoss 4.0.3 servers from an externally provided WSDL.  After running wscompile -import to generate the SEI, I noticed the methods in the generated interface took a single SOAPElement parameter and returned SOAPElement.  Initially I hadn't run wscompile with the -f:nodatabinding flag, though after many days of reading the documentation I realized that's probably what I wanted all along.  But what I got on the server side when trying to start up the service were a series of the following warnings:


  | 2006-09-13 21:29:22,188 WARN [org.jboss.webservice.metadata.jaxrpcmapping.JavaWsdlMapping] Cannot find jaxrpc-mapping for type: {urn:oasis:names:tc:SPML:1:0}addRequest
  | 2006-09-13 21:29:22,215 WARN  [org.jboss.webservice.deployment.TypeMappingDescription] Class not found: javax.xml.soap.addRequest
  | 

And then when trying to call the service it would result in the following exception:


  | 2006-09-13 21:32:15,955 ERROR [org.jboss.axis.providers.java.RPCInvocation] org.xml.sax.SAXException: Deserializing parameter 'addRequest':  could not find deserializer for type {urn:oasis:names:tc:SPML:1:0}addRequest
  | 

After poking around a little I realized this was probably due to the generated mapping file not having any java-xml-type-mapping entries.  So to fix the errors I added entries like the following:


  |   <java-xml-type-mapping>
  |     <java-type>javax.xml.soap.SOAPElement</java-type>
  |     <root-type-qname xmlns:rtq="urn:oasis:names:tc:SPML:1:0">rtq:addRequest</root-type-qname>
  |     <qname-scope>simpleType</qname-scope>
  |   </java-xml-type-mapping>
  | 

This made the warnings go away, but then when I tried invoking the service I get a different exception:


  | 2006-09-13 18:07:29,624 ERROR [org.jboss.axis.providers.java.RPCInvocation] org.xml.sax.SAXException: Unable to create JavaBean of type javax.xml.soap.SOAPElement.  Missing default constructor?  Error was: java.lang.InstantiationException: javax.xml.soap.SOAPElement.
  | 

I'm pretty sure the interface is defined properly as that's how the use of the nodatabinding option is described in the JAX RPC Patterns and Strategies doc: http://java.sun.com/developer/technicalArticles/xml/jaxrpcpatterns/index3.html#7

So at this point I believe the root of the problem is in how I specified the mapping entries.  So my questions are:

1) Any idea why wscompile didn't include the java-xml-type-mapping entries?  Could it have been because the WSDL (and included XSDs) contained some unsupported xsd types (e.g. xsd:choice)?
2) Do my manual additions of the java-xml-type-mapping entries look correct?

Any pointers would be greatly appreciated.  Oh, and moving up to 4.0.4 at this point would be difficult, so hopefully that's not the only solution.

Thanks,
Dave

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

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



More information about the jboss-user mailing list