• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Data Type Mapping in Apache Axis

 
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
If you were a tree, what sort of tree would you be? This tiny ad is a poop beast.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic