• 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

doubt about custom types

 
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have started playing with web services some weeks ago.

I first discovered that I could not use data types such as the hashMap from java, for example, as other languages probably don't have a similar type.

Then I decided to implement my CustomMap imagining that it would work. Since I implemented my CustomMap, I thought it would be available for my clients,
with all of its methods and all.

I then found out that it was not possible either. Only simple get and set methods are allowed.

So my question is:

Why is that? Why it does not work? Is it really impossible to do? Are there any researches that you guys are aware of on a new web service architeture that would allow that to happen? I mean, allow me for example to implement my customClass with custom methods, such as the CustomMap I implemented and then make it available to the web services consumers?
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
I recommend you to have a look at customizing JAXB bindings, which allow you to, among other things, override the specified default binding of XML Schema built-in datatypes to Java datatypes.
http://java.sun.com/webservices/docs/1.5/tutorial/doc/JAXBUsing4.html
Best wishes!
 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
the java web service support only the types available in XML xsd. check the following link.
http://publib.boulder.ibm.com/infocenter/iseries/v5r3/index.jsp?topic=/rzamy/50/webserv/wsdevmap.htm
LIST,Collections, MAPS will not work with WSDL types . it will take it as anyType which is equal to a java type of OBJECT .
 
reply
    Bookmark Topic Watch Topic
  • New Topic