Hi, Ranjith.

  If I am right, wrapper element around your actual document is not specific
to Axis. That is the way Weblogic also works, Weblogic determines which
method to invoke, based on this wrapper element (root element of your xml
payload).

You're right, but it would nice to have an alternative routing technique. If I'm writing a new document/literal web service from scratch, fine, I can add the wrapper element with the operation name. It clutters up my schema a bit and is a little more work for the clients, but it's not a major problem.


However, let's say I have an existing Java class I want to expose as a web service. It defines two methods, "process" and "validate", and they both accept a PurchaseOrder as their only parameter. For a document/literal operation, requests to either "process" or "validate" would contain a PurchaseOrder element as the child of the SOAP Body. I cannot deploy this class as a document/literal Axis web service without modifying the class (and thus causing problems for existing users of the class.) I need to define a wrapper class that receives the SOAP messages and calls the appropriate method in the original class.

On the other hand, if my web service implementation used the SOAPAction value to route the header, clients could simply specify the qualified name of the WSDL operation as the value of SOAPAction, and the correct operation could be called without a wrapper element in the SOAPMessage. I could expose my original class as a Web service without modification.

Regards,
Mike

Thanks,
Ranjith Pillai.
        

-----Original Message-----
From: Michael Woinoski [mailto:[EMAIL PROTECTED] Sent: Thursday, November 13, 2003 2:48 PM
To: [EMAIL PROTECTED]
Subject: Re: How to define document/literal service with multiple operations


Keith,


With document/literal web services you need to define your schema in
such a way that the "wrapper" element or root element will lead you to
the business function. So you are not just defining the data that needs
to be sent but also a wrapper element that suggests the operation to be
performed.


Well, that may be the way Axis currently routes messages, but I prefer to develop my application's schema based on what is appropriate for the application, not because of the limitations imposed by a particular implementation. This is exactly the kind of situation that SOAPAction is supposed to address. .NET uses it for routing messages, so I know Axis HAS
to support it ;-) I suspect it's just a matter of configuring HTTPActionHandler


correctly.

Also, I'd like to keep my web services portable to different JAX-RPC implementations, so I try to avoid Axis-specific features (e.g.,
Message-style services.)



Read the axis users guide about "service styles"
specifically the "message", "document" and "wrapped" service styles.


I did. I didn't find anything in the user's guide about the details of
routing document-style services.


Regards,
Mike


-----Original Message-----
From: Michael Woinoski [mailto:[EMAIL PROTECTED] Sent: Thursday, November 13, 2003 4:47 PM
To: Axis User mailing list
Subject: How to define document/literal service with multiple operations


How can I define a document/literal service with multiple operations?
Because there's no wrapper element around the input message parts, Axis seems to
have a problem invoking the correct service method.


If I add a value for SOAPAction in the service's binding, the client
stubs set SOAPAction in the HTTP request correctly, but Axis doesn't use the
SOAPAction value. I found the Axis HTTPActionHandler class and tried adding it to
the request flow in the service's deploy.wsdd but it didn't seem to make a difference. Does Axis support this? If so, how do I configure it?


Thanks,
Mike




--


Mike Woinoski                      Pine Needle Consulting
mailto:[EMAIL PROTECTED]



Reply via email to