Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Data Type Mapping in Apache Axis

 
Sachin Dere
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Pradeep,
thanks for the reply. I used Object to pass it to the WebService and it worked
thanks again,
Sachin
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic