• 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 ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

Axis1.4 several questions

Ranch Hand
Posts: 210
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I generated an Axis skeleton and stub based upon the WSDL I generated first.
The WSDL is very simple, it is a document/literal type. The 'in' has a element called 'Request' which has one simpleType 'TimeRequest' of type dateTime.
The 'out' has an element called 'Reply' which has two simpletypes 'TimeRequest' and 'TimeReply' both of type dateTime.

The stub thus sends 'TimeRequest' (being the current timestamp) and the skeleton answers with taking the same TimeRequest value from the request and adding its current timestamp in 'TimeReply'.
You can see the WSDL here:


ok, so I used wsdl2java with the following parameters to generate the skeleton:

My questions:

1. The skeleton seems to perform some kind of XML validation against the elements I specified in the WSDL, which is good.
For example, if I leave a mandatory element out, I get an exception. Is there any way to obtain control over this (turn off for example) ? Or where can I find information how this validation is performed ?
It is most likeley done by XMLBeans or does axis 1.4 use another framework for the XML parsing ?

2. When I leave the 'TimeReply' absent from the response the skeleton makes (which is off course not schema valid, since TimeReply is mandatory) the skeleton generates an error indicating that TimeReply may not be nill, which is good.
Only, this error is NOT propagated to the client side, the response is just empty (only the http headers, not SOAP reply).
When ever I trhow a 'manual' exception from my skeleton (RemoteException or a RuntimeException) then I do get a nice SOAPFault in the reply.

This is the reply when the skeleton leaves out a mandatory element from the rely:

the line: <parameter name="className" value="be.test.www.WebserviceBindingSkeleton"/> is sometimes also replaced with the binding class instead of the skeleton class (depending on the options you feed to wsdl2java). The binding class is however the default.
But when I use the binding class rather then the skeleton class, I get an exception that the operation 'Request' coud not be found. When I change it back to the skeleton class it works like expected.
That is great, but I would like to understand the difference and why it works with the binding and not with the skeleton.

To conclude: I don't understand why axis makes all these things so hard. Validation, handlers etc are all very, very, common things that you cannot live without when creating or consuming a 'real world' webservice.
I would like that they start focusing on suplying some decent information and howto's first on how to do these things (and yes, I read the manual 100 times allready, but there is a severe lack of information IMHO)

[ December 17, 2006: Message edited by: Jim Janssens ]
[ December 17, 2006: Message edited by: Jim Janssens ]
    Bookmark Topic Watch Topic
  • New Topic