aspose file tools*
The moose likes Web Services and the fly likes Data Type Mapping in Apache Axis Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Data Type Mapping in Apache Axis" Watch "Data Type Mapping in Apache Axis" New topic
Author

Data Type Mapping in Apache Axis

Sachin Dere
Ranch Hand

Joined: Jan 14, 2003
Posts: 80
Hi guys,
whats the datatype mapping for xsd:anytype in Apache axis? Im posting data to a WebService but its giving me error at one of the parameters as it expects Array.
Pls help me here,
thanks,
Sachin
Pradeep Ram
Greenhorn

Joined: Sep 29, 2004
Posts: 18
Sachin,
The simplest way to get the mapping is to obtain the WSDL for the webservice that you want to post to, and run WSDL2Java on that file. Look at the interfaces and stubs that it creates, it will help you identify Data type mappings.

From the Axis documentation it appears that when there is an element or a nattribute without any type it defaults to xsd:anyType.

One other thing is that open the XXXBindingStub.java that Axis generates, locate the addParameter() where you are passing xsd:anyType and try to change the mapping to Array.
--pradeeP
Sachin Dere
Ranch Hand

Joined: Jan 14, 2003
Posts: 80
Hi Pradeep,
thanks for the reply. I used Object to pass it to the WebService and it worked
thanks again,
Sachin
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Data Type Mapping in Apache Axis