axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Denero Watz <denero_w...@yahoo.com>
Subject Re: SoapAction = (Target Namespace + Operation name) Always??
Date Fri, 25 Jul 2003 08:51:39 GMT
This was very useful information. Thanks a lot!!

Anne Thomas Manes <anne@manes.net> wrote:Denero,

SOAPAction is an HTTP Header attribute. According to the SOAP specification,
it provides a "hint" that the SOAP server can use for routing. The
SOAPAction header is always required in all SOAP over HTTP requests, but it
is not used with other transports (JMS, SMPT, etc). The contents of the
header can be null, blank, or a URI, e.g.:

SOAPAction:
SOAPAction: ""
SOAPAction: "urn:myservice/foobar/foo"
SOAPAction: "http://example.org/foobar#1234567890"

There's no requirement that if you specify a URI that it must be the
targetNamespace + Operation name (such as "urn:myservice/foobar/foo"). Many
systems don't specify a URI, especially when using rpc/encoded. On the other
hand, some systems generate a method signature for the SOAPAction attribute
(such as "http://example.org/foobar#1234567890"). The contents of the
SOAPAction will be determined by the SOAP Server you use to host the Web
service.

As I mentioned, the SOAPAction provides a "hint" that the SOAP server can
use to optimize request routing. Officially, though, the SOAP server should
use the QName of the child element of the soap-env:body to determine how to
process the request. (Remember that SOAP can run over other transports, and
other transports don't have the equivalent of SOAPAction.) To demonstrate:



test



In this example, the QName of the child element of the soap-env:body is
"urn:myservice/foobar}foo".

When using doc/literal, the service developer must define the the QName of
the child element of the soap-env:body in the wsdl:types element. This QName
uses the targetNamespace of the element (which isn't
necessarily the same as the targetNamespace of the 
element) combined with the local name of the element that defines the
message payload. In other words, the QName is equal to the value specified
in the element attribute in the , e.g.:



When using rpc/encoded, you don't have a schema of the SOAP message body, so
the SOAP runtime generates the QName of the child element of the
soap-env:body from information specified in the -- uses the
name attribute in the as its local name, and it uses the
namespace specified in the element:


transport="http://schemas.xmlsoap.org/soap/http" />
<--local name


namespace="urn:myservice/foobar" <-- namespace
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />

...


So again, in this example, the QName of the child element of the
soap-env:body would be "urn:myservice/foobar}foo".

Best regards,
Anne

----- Original Message -----
From: Denero Watz
To: axis-user@ws.apache.org
Sent: Thursday, July 24, 2003 1:49 AM
Subject: SoapAction = (Target Namespace + Operation name) Always??


Hello!!
I have just started on Soap and writing a Soap client now for a project.
While looking at the documentation, I see the following are some of the
parameters needed while sending a request.

- Operation name
- A Name Space
- A Soap action for the header

Why is these attributes required separately in the WSDL. The Soap action is
actually the combination of the target namespace and the operation, right?
Or they can be different?

Atleast, in my case we have a UI to set this fields by the users, so my
question is that will it work if I show only op name and namespace to
specify by the user and I internally resolve the Soapaction url based on
this target namespace and operation name he has selected before sending a
soap request?

TIA,
dw



Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software



---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
Mime
View raw message