Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem while generating JAXB mapping classes for remotely place XSDs  RSS feed

premchand chand
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am working on a one way Notification web service, using WSAD 5.1 with JDK 1.3 version. I have to generate the JAXB mapping classes for the XSDs of the service which are remotely located (with http urls)
I am using ant script XJC target to generate the classes, but the jaxb:binding tag does not recognize the schema location with the urls.

A similar approach was followed to generate the mapping classes using JAXB2 without any errors, but I am not able to generate the classes for JAXB and jdk1.3.

If anyone has worked on this before and can send me the snippet of the ant scripts used would be of great help.

Next, in order to generate the mappings, I created local copies of the XSDs and generated the implementation classes.
After creating the classes I encountered an error while invoking the service which was:
“org.springframework.remoting.RemoteAccessException: Cannot access remote service [{}testSOAP]; nested exception is Error invoking operation:
javax.xml.rpc.JAXRPCException: Number of parameters passed in (1) doesn't match the number of IN/INOUT parameters (2) from the addParameter() calls “
After debugging the code, I found that the error is occurring when the service is using the reflection to dynamically identify the input parameter from the WSDL binding.
Although I am passing a single argument(NotifyImpl), the class is ignoring the base parent element which is Notify and using its child elements “Notification Message” and “Any” as parameters.
The schema for the service is :
<xsd:element name="Notify">
<xsd:element ref="wsnt:NotificationMessage" minOccurs="1" maxOccurs="unbounded"/>
<xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>

And the WSDL port type mapping is :
<wsdl:portType name="NotificationConsumer">
<wsdlperation name="Notify">
<wsdl:input message="wsntw:Notify" />

<wsdl:message name="Notify">
<wsdl:part name="Notify" element="wsnt:Notify"/>

Again, this code is working fine for jaxb2 but is giving an error in JaxB.

Any pointers would be very helpful.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!