You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Ottinger, Michael" <MD...@pge.com> on 2005/09/16 17:35:17 UTC

Stumped on web service intermediaries

Hi Folks

I've created a simple web service that I want to have act as an
intermediary. In my client code I've added a header element to the
requesting soap with a soapenv:role (also tried soapenv:actor) attribute
value set to the url endpoint of my web service; no luck. I've read up
on intermediaries as much as possible and I feel I'm missing something
here. What does it take to target a soap message to an intermediary? How
does an intermediary "intercept" a message? I also set the soapenv:role
attribute value to a role uri I declared in the service's wsdd entry; no
luck either. Does the service method in my interdiary need to follow a
certain signature, or implement an interface? Finally, is there any
sample code out there that could get me pointed in the right direction?
Thanks in advance.

Mike Ottinger


Re: Stumped on web service intermediaries

Posted by Anne Thomas Manes <at...@gmail.com>.
You use soapenv:actor with SOAP 1.1 and soapenv:role with SOAP 1.2.

The value of the actor/role attribute is a URI that represents the role of 
the entity that must process the header in question. Per SOAP 1.1, if the 
value of the URI is http://schemas.xmlsoap.org/soap/actor/next, then 
whatever entity next receives the message should process the header. In SOAP 
1.2, if the value of the URI is 
http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver, then only the 
ultimate receiver should process the header. The specs do not predefine any 
other URIs, so you should choose a name that reflects the intermediary role. 
The URI does not in any way indicate routing, nor does the URI indicate the 
endpoint of a particular intermediary or service. 

In order for your intermediary to intercept the message, you must direct the 
message to the intermediary. You can do that by specifying the intermediary 
URL as the service endpoint in your WSDL (in which case your intermedairy 
must figure out how to forward the message to the appropriate service 
endpoint), or you can use WS-Addressing. 

Anne

On 9/16/05, Ottinger, Michael <MD...@pge.com> wrote:
> 
>  Hi Folks
> 
> I've created a simple web service that I want to have act as an 
> intermediary. In my client code I've added a header element to the 
> requesting soap with a soapenv:role (also tried soapenv:actor) attribute 
> value set to the url endpoint of my web service; no luck. I've read up on 
> intermediaries as much as possible and I feel I'm missing something here. 
> What does it take to target a soap message to an intermediary? How does an 
> intermediary "intercept" a message? I also set the soapenv:role attribute 
> value to a role uri I declared in the service's wsdd entry; no luck either. 
> Does the service method in my interdiary need to follow a certain signature, 
> or implement an interface? Finally, is there any sample code out there that 
> could get me pointed in the right direction? Thanks in advance.
> 
> Mike Ottinger
>