You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by Asanka Abeysinghe <as...@wso2.com> on 2008/12/02 07:55:38 UTC
Issue with setting the wsa headers
Hi All,
I'm trying to set the addressing headers of the response message but it
dose not set with my input values. I'm setting the wsa:Action,
wsa:RelatedTo by using the following code snippet.
String replyAddress =
mc.getOptions().getReplyTo().getAddress();
AddressEndpoint endpoint = new AddressEndpoint();
EndpointDefinition def = new EndpointDefinition();
def.setAddress(replyAddress.trim());
endpoint.setDefinition(def);
org.apache.synapse.MessageContext rmc = new
Axis2MessageContext(mc, synCfg, synEnv);
rmc.setEnvelope(soapEnvelope);
rmc.setTo(new EndpointReference(replyAddress));
*rmc.setWSAAction(responseAction);* //TODO wsa
headers cannot see in the response message, it drops just before
dispatching
rmc.setSoapAction(responseAction);
if (relatesTo!=null){
*rmc.setRelatesTo(new RelatesTo[]{relatesTo});*
}
rmc.setResponse(true);
endpoint.send(rmc);
When I analyze the response message using TCPMON, both wsa:Action and
the wsa:RelatedTo headers are missing and SOAPAction contains the
SOAPAction of the original message (request). Any idea on what is
happening ?
Regards
Asanka
Re: Issue with setting the wsa headers
Posted by Paul Fremantle <pz...@gmail.com>.
Thanks for letting us know what went wrong!
Paul
On Wed, Dec 3, 2008 at 8:39 PM, Asanka Abeysinghe <as...@wso2.com> wrote:
> Problem resolved by enabling 'Addressing' for the endpoint
> (def.setAddressingOn(true)).
> - Asanka
>
> Asanka Abeysinghe wrote:
>
> Hi All,
> I'm trying to set the addressing headers of the response message but it dose
> not set with my input values. I'm setting the wsa:Action, wsa:RelatedTo by
> using the following code snippet.
>
> String replyAddress =
> mc.getOptions().getReplyTo().getAddress();
> AddressEndpoint endpoint = new AddressEndpoint();
> EndpointDefinition def = new EndpointDefinition();
> def.setAddress(replyAddress.trim());
> endpoint.setDefinition(def);
> org.apache.synapse.MessageContext rmc = new
> Axis2MessageContext(mc, synCfg, synEnv);
> rmc.setEnvelope(soapEnvelope);
> rmc.setTo(new EndpointReference(replyAddress));
> rmc.setWSAAction(responseAction); //TODO wsa headers
> cannot see in the response message, it drops just before dispatching
> rmc.setSoapAction(responseAction);
> if (relatesTo!=null){
> rmc.setRelatesTo(new RelatesTo[]{relatesTo});
> }
> rmc.setResponse(true);
> endpoint.send(rmc);
>
> When I analyze the response message using TCPMON, both wsa:Action and the
> wsa:RelatedTo headers are missing and SOAPAction contains the SOAPAction of
> the original message (request). Any idea on what is happening ?
>
> Regards
> Asanka
>
>
>
>
--
Paul Fremantle
Co-Founder and CTO, WSO2
Apache Synapse PMC Chair
OASIS WS-RX TC Co-chair
blog: http://pzf.fremantle.org
paul@wso2.com
"Oxygenating the Web Service Platform", www.wso2.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org
Re: Issue with setting the wsa headers
Posted by Asanka Abeysinghe <as...@wso2.com>.
Problem resolved by enabling 'Addressing' for the endpoint
(def.setAddressingOn(true)).
- Asanka
Asanka Abeysinghe wrote:
> Hi All,
> I'm trying to set the addressing headers of the response message but
> it dose not set with my input values. I'm setting the wsa:Action,
> wsa:RelatedTo by using the following code snippet.
>
> String replyAddress =
> mc.getOptions().getReplyTo().getAddress();
> AddressEndpoint endpoint = new AddressEndpoint();
> EndpointDefinition def = new EndpointDefinition();
> def.setAddress(replyAddress.trim());
> endpoint.setDefinition(def);
> org.apache.synapse.MessageContext rmc = new
> Axis2MessageContext(mc, synCfg, synEnv);
> rmc.setEnvelope(soapEnvelope);
> rmc.setTo(new EndpointReference(replyAddress));
> *rmc.setWSAAction(responseAction);* //TODO wsa
> headers cannot see in the response message, it drops just before
> dispatching
> rmc.setSoapAction(responseAction);
> if (relatesTo!=null){
> *rmc.setRelatesTo(new RelatesTo[]{relatesTo});*
> }
> rmc.setResponse(true);
> endpoint.send(rmc);
>
> When I analyze the response message using TCPMON, both wsa:Action and
> the wsa:RelatedTo headers are missing and SOAPAction contains the
> SOAPAction of the original message (request). Any idea on what is
> happening ?
>
> Regards
> Asanka
>
>