You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-user@axis.apache.org by Patrick Duflot <pd...@gmail.com> on 2010/05/03 17:58:04 UTC

ws-addressing question

Hi list,

Is there a way to specify two distinct information for the physical
addressing and the logical address ?

For example, I want to send a request to an url, let's say http://172.
.22.13.3/axis2/services/MyService.
And I want that the wsa:To field contains this logical name : queueXT23.

Thank you

Patrick

Re: ws-addressing question

Posted by Patrick Duflot <pd...@gmail.com>.
Thanks for your suggestion.
I gave it a try but found that it was quite difficut to call
msg_ctx_set_transport_url from my client call and moreover I think that it
will influence other parts of the axis2c code.

So, I added another field to the axis2_end_point_ref struct to set the
logical address.
If this field is set it is mapped to the wsa:To soap header filed. If not,
it backs to the former behaviour. Works fine.

Is it possible to add this modification to the axis2 code base ? I not
familiar with open source projects.

Regards,
Patrick

On Thu, May 13, 2010 at 10:53 AM, Damitha Kumarage <da...@wso2.com> wrote:

> Patrick Duflot wrote:
>
>>
>> We have a message broker that acts as a gateway between our client and our
>> service.
>>
>> This broker sends in-only message to our service. Our service is supposed
>> to asynchronously send a response to the broker IP address (which is known
>> by configuration) and move the wsa:replyto of the incoming message to the
>> wsa:to header of the outgoing message. This original wsa:replyto is a
>> logical queue name of the broker.
>>
>> One obvious workaround is to use queue names of the form
>> http://broker_address/queue_name, but this would require to modify the
>> broker code and I am not supposed to do that.
>>
>> Any suggestion would be greatly appreciated.
>>
> In Axis2/C http_transport_sender code there is a code block like this
>
> /    transport_url = axis2_msg_ctx_get_transport_url(msg_ctx, env);
>   if(transport_url)
>   {
>       AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "transport_url:%s",
> transport_url);
>       epr = axis2_endpoint_ref_create(env, transport_url);
>   }
>   else
>   {
>       /* when transport url is not available in msg_ctx */
>       axis2_endpoint_ref_t *ctx_epr = axis2_msg_ctx_get_to(msg_ctx, env);
>
> /If you somehow manage to call msg_ctx_set_transport_url from your client
> then message will be sent to transport_url while maitaining addressing:to in
> the message.(As apparent from above code)
>
> If you use op_client instead of service client you may be able to obtain
> the message context so that you can set transport url. I don't remember
> exact detail but you can try
>
> Thanks,
> Damitha
>
>> Thank you
>>
>> Patrick
>>
>>
>>
>> On Thu, May 6, 2010 at 10:05 AM, Damitha Kumarage <damitha@wso2.com<mailto:
>> damitha@wso2.com>> wrote:
>>
>>    Patrick Duflot wrote:
>>
>>        Hi list,
>>
>>        Is there a way to specify two distinct information for the
>>        physical addressing and the logical address ?
>>
>>        For example, I want to send a request to an url, let's say
>>        http://172..22.13.3/axis2/services/MyService.
>>        And I want that the wsa:To field contains this logical name :
>>        queueXT23.
>>
>>    Why you need to do this?. Perhaps we may be able to suggest a
>>    workaround.
>>
>>    Thanks,
>>    Damitha
>>
>>
>>        Thank you
>>
>>        Patrick
>>
>>
>>
>>    --
>> __________________________________________________________________
>>
>>    Damitha Kumarage
>>    Technical Lead; WSO2 Inc.
>>    "Oxygenating the Web Service Platform; " http://www.wso2.com/
>>
>>    blog: " http://damithakumarage.wordpress.com/
>>
>>    __________________________________________________________________
>>
>>    ---------------------------------------------------------------------
>>    To unsubscribe, e-mail: c-user-unsubscribe@axis.apache.org
>>    <ma...@axis.apache.org>
>>
>>    For additional commands, e-mail: c-user-help@axis.apache.org
>>    <ma...@axis.apache.org>
>>
>>
>>
>
> --
> __________________________________________________________________
>
> Damitha Kumarage
> Technical Lead; WSO2 Inc.
> "Oxygenating the Web Service Platform; " http://www.wso2.com/
>
> blog: " http://damithakumarage.wordpress.com/
> __________________________________________________________________
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: c-user-help@axis.apache.org
>
>

Re: ws-addressing question

Posted by Damitha Kumarage <da...@wso2.com>.
Patrick Duflot wrote:
>
> We have a message broker that acts as a gateway between our client and 
> our service.
>
> This broker sends in-only message to our service. Our service is 
> supposed to asynchronously send a response to the broker IP address 
> (which is known by configuration) and move the wsa:replyto of the 
> incoming message to the wsa:to header of the outgoing message. This 
> original wsa:replyto is a logical queue name of the broker.
>
> One obvious workaround is to use queue names of the form 
> http://broker_address/queue_name, but this would require to modify the 
> broker code and I am not supposed to do that.
>
> Any suggestion would be greatly appreciated.
In Axis2/C http_transport_sender code there is a code block like this

/    transport_url = axis2_msg_ctx_get_transport_url(msg_ctx, env);
    if(transport_url)
    {
        AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "transport_url:%s", 
transport_url);
        epr = axis2_endpoint_ref_create(env, transport_url);
    }
    else
    {
        /* when transport url is not available in msg_ctx */
        axis2_endpoint_ref_t *ctx_epr = axis2_msg_ctx_get_to(msg_ctx, env);

/If you somehow manage to call msg_ctx_set_transport_url from your 
client then message will be sent to transport_url while maitaining 
addressing:to in the message.(As apparent from above code)

If you use op_client instead of service client you may be able to obtain 
the message context so that you can set transport url. I don't remember 
exact detail but you can try

Thanks,
Damitha
> Thank you
>
> Patrick
>
>
> On Thu, May 6, 2010 at 10:05 AM, Damitha Kumarage <damitha@wso2.com 
> <ma...@wso2.com>> wrote:
>
>     Patrick Duflot wrote:
>
>         Hi list,
>
>         Is there a way to specify two distinct information for the
>         physical addressing and the logical address ?
>
>         For example, I want to send a request to an url, let's say
>         http://172..22.13.3/axis2/services/MyService.
>         And I want that the wsa:To field contains this logical name :
>         queueXT23.
>
>     Why you need to do this?. Perhaps we may be able to suggest a
>     workaround.
>
>     Thanks,
>     Damitha
>
>
>         Thank you
>
>         Patrick
>
>
>
>     -- 
>     __________________________________________________________________
>
>     Damitha Kumarage
>     Technical Lead; WSO2 Inc.
>     "Oxygenating the Web Service Platform; " http://www.wso2.com/
>
>     blog: " http://damithakumarage.wordpress.com/
>
>     __________________________________________________________________
>
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: c-user-unsubscribe@axis.apache.org
>     <ma...@axis.apache.org>
>     For additional commands, e-mail: c-user-help@axis.apache.org
>     <ma...@axis.apache.org>
>
>


-- 
__________________________________________________________________

Damitha Kumarage
Technical Lead; WSO2 Inc.
"Oxygenating the Web Service Platform; " http://www.wso2.com/

blog: " http://damithakumarage.wordpress.com/
__________________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: c-user-unsubscribe@axis.apache.org
For additional commands, e-mail: c-user-help@axis.apache.org


Re: ws-addressing question

Posted by Patrick Duflot <pd...@gmail.com>.
We have a message broker that acts as a gateway between our client and our
service.

This broker sends in-only message to our service. Our service is supposed to
asynchronously send a response to the broker IP address (which is known by
configuration) and move the wsa:replyto of the incoming message to the
wsa:to header of the outgoing message. This original wsa:replyto is a
logical queue name of the broker.

One obvious workaround is to use queue names of the form
http://broker_address/queue_name, but this would require to modify the
broker code and I am not supposed to do that.

Any suggestion would be greatly appreciated.

Thank you

Patrick


On Thu, May 6, 2010 at 10:05 AM, Damitha Kumarage <da...@wso2.com> wrote:

> Patrick Duflot wrote:
>
>> Hi list,
>>
>> Is there a way to specify two distinct information for the physical
>> addressing and the logical address ?
>>
>> For example, I want to send a request to an url, let's say http://172.
>> .22.13.3/axis2/services/MyService.
>> And I want that the wsa:To field contains this logical name : queueXT23.
>>
> Why you need to do this?. Perhaps we may be able to suggest a workaround.
>
> Thanks,
> Damitha
>
>>
>> Thank you
>>
>> Patrick
>>
>>
>
> --
> __________________________________________________________________
>
> Damitha Kumarage
> Technical Lead; WSO2 Inc.
> "Oxygenating the Web Service Platform; " http://www.wso2.com/
>
> blog: " http://damithakumarage.wordpress.com/
>
> __________________________________________________________________
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: c-user-help@axis.apache.org
>
>

Re: ws-addressing question

Posted by Damitha Kumarage <da...@wso2.com>.
Patrick Duflot wrote:
> Hi list,
>
> Is there a way to specify two distinct information for the physical 
> addressing and the logical address ?
>
> For example, I want to send a request to an url, let's say 
> http://172..22.13.3/axis2/services/MyService.
> And I want that the wsa:To field contains this logical name : queueXT23.
Why you need to do this?. Perhaps we may be able to suggest a workaround.

Thanks,
Damitha
>
> Thank you
>
> Patrick
>


-- 
__________________________________________________________________

Damitha Kumarage
Technical Lead; WSO2 Inc.
"Oxygenating the Web Service Platform; " http://www.wso2.com/

blog: " http://damithakumarage.wordpress.com/
__________________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: c-user-unsubscribe@axis.apache.org
For additional commands, e-mail: c-user-help@axis.apache.org


Re: ws-addressing question

Posted by Samisa Abeysinghe <sa...@wso2.com>.
On Mon, May 3, 2010 at 9:28 PM, Patrick Duflot <pd...@gmail.com> wrote:

> Hi list,
>
> Is there a way to specify two distinct information for the physical
> addressing and the logical address ?
>
> For example, I want to send a request to an url, let's say http://172.
> .22.13.3/axis2/services/MyService.
> And I want that the wsa:To field contains this logical name : queueXT23.
>

WS-Addressing spec does not  have such support.

Samisa...


> Thank you
>
> Patrick
>
> --
Samisa Abeysinghe
Director, Engineering - WSO2 Inc.

http://wso2.com/ - "lean . enterprise . middleware"