aspose file tools*
The moose likes Web Services and the fly likes Axis 1.x web service: how to make a strongly-typed interface Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Axis 1.x web service: how to make a strongly-typed interface" Watch "Axis 1.x web service: how to make a strongly-typed interface" New topic
Author

Axis 1.x web service: how to make a strongly-typed interface

David Brossard
Ranch Hand

Joined: Jun 03, 2004
Posts: 109
Hi everyone,

I've been writing web services for a while now - mainly in axis 1. I've always used primitive types (e.g. string, int, boolean) but I now want to use more complex ones e.g. UUID and have a corresponding wsdl (meaning I don't want to convert in my app logic from UUID to String).

java2wsdl produces a wsdl with the following


Then of course wsdl2java fails stating:


So what's the way to do it? I've never done sthg similar and googling is actually no so easy...


No matter what they say in Ohio, we're still first in flight!
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2922
    
    5
When it comes to web service interfaces XML Schema Datatypes and of course the types that you define in your own schemas define the "data-types" against which you can type the web services interface. The data types of the host language are irrelevant.

So the only "option" you have is to use Axis in the "encoded" mode and write (de-)serializers for all the non-primitive Java datatypes that you plan to exchange. That also implies that you have to provide your client with those (de-)serializers in addition to the WSDL and require that they access the web service only with Java and Axis.

What Axis cannot send via SOAP
[ December 13, 2006: Message edited by: Peer Reynders ]
 
 
subject: Axis 1.x web service: how to make a strongly-typed interface