File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
David Brossard
Ranch Hand
Posts: 109
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
Peer Reynders
Bartender
Posts: 2933
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic