• Post Reply Bookmark Topic Watch Topic
  • New Topic

Generating java using WSDL2Java

 
Amutha Ramesh
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am working with Webservices using Apache Axis 1. 3 for deployment
I am facing an issue with Axis 1.3
I have got the following service

* getUserInfo
* create
* update
* query
* retrieve

I have deployed the services successfully. When I invoke the services from my java client it works fine.

From the deployed wsdl I have generated java classes using WSDL2Java and tested the service with the same java client.
Now query and retrieve services throws an exception.

I have noticed that in my wsdl I have got ID to be a simple restriction type and found online that

* Axis no longer generates a wrapper class for simple type restrictions, this means that the ID class disappears, ID is now treated as a plain jane String

* query & retrieve calls that have null field values, will now correctly populate a null value in the Any array, however if you include Id in your field list, this will not appear in the Any collection (this is a bug in 1.2 that looks like it'll be fixed in the upcoming Axis 1.2.1 release).

Is the above statements true?

Is this a bug with Axis 1.3?

Any help would be greatly appreciated.

Thanks
Amutha
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not a direct answer to your question, but if you have two clients to access your WS, one of which works, and one of which doesn't, then the best way to debug that may to use the TCPMon tool that comes with Axis. It allows you to watch the SOAP traffic in transit, and thus see if the two clients send different SOAP to Axis. If they do, you have a good starting point for further debugging.
 
Amutha Ramesh
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Dittmer,

Thankyou for your reply.

Let me exaplain my issue clearly.

I am facing one issue with Webservices in Axis 1.3

My wsdl definition contains the following segment

<!-- Our simple ID Type -->
<simpleType name="ID">
<restriction base="xsd:string">
<length value="32"/>
<pattern value='[a-zA-Z0-9]{32}'/>
</restriction>
</simpleType>

When generating the Java classes using WSDL2Java(reverse process) the files get generated but there is no class found for the type ID.


When I deploy the service, it gets successfully deployed.

Using WSDL2Java I am trying to generate the client for the deployed wsdl. When I invoke the service, I get NullPointerException. as my wsdl contains a simple restriction type ID. My query and retrieve services throws an exception. When I searched online I found a link explaining the below points

* Axis no longer generates a wrapper class for simple type restrictions, this means that the ID class disappears, ID is now treated as a plain jane String

* query & retrieve calls that have null field values, will now correctly populate a null value in the Any array, however if you include Id in your field list, this will not appear in the Any collection (this is a bug in 1.2 that looks like it'll be fixed in the upcoming Axis 1.2.1 release).

URL - http://blog.sforce.com/sforce/2005/06/migrating_from_.html


Thanks

Amutha
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!