• Post Reply Bookmark Topic Watch Topic
  • New Topic

doubt about custom types  RSS feed

 
Rodrigo Bossini
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • 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?
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • 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!
 
cnivas redy
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • 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 .
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!