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 Tejas Sumant <te...@gmail.com> on 2011/03/08 15:34:26 UTC

Preserve SOAP header received in SOAP request

Hello,

I have written service using Axis2c, and I get SOAP header as part of SOAP
request. I need to resend the same SOAP header unmodified to client in
response.
I formed a response in _invoke callback and sent to client. This response
contains only SOAP body. How can I preserve the header received and send it
back to client?

Thanks.

-- 
Tejas Sumant

Re: Preserve SOAP header received in SOAP request

Posted by Nandika Jayawardana <ja...@gmail.com>.
There were few discussions regarding the static linking of Axis2/C. However,
it was not implemented and  in the current code base, you cannot link
statically without modifying the source.

Regards
Nandika

On Sun, Mar 13, 2011 at 3:57 AM, John Pararas <jp...@schedsys.com> wrote:

> Does anyone have any information on how to statically link an axis2c client
> on windows?
> I removed all the dll's from the path, linked using the .lib's the linker
> is happy but the executable still needs the DLL's.
>
> I have seen some bug reports/ discussions on the axis2c website about
> settings for the AXIS2C_EXPORT AXIS2C_IMPORT and AXIS2_DECLARE_STATIC but
> nothing seems to work for me.
>
> Thanks,
>
> John
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: c-user-help@axis.apache.org
>
>

Re: Preserve SOAP header received in SOAP request

Posted by John Pararas <jp...@schedsys.com>.
Does anyone have any information on how to statically link an axis2c 
client on windows?
I removed all the dll's from the path, linked using the .lib's the 
linker is happy but the executable still needs the DLL's.

I have seen some bug reports/ discussions on the axis2c website about 
settings for the AXIS2C_EXPORT AXIS2C_IMPORT and AXIS2_DECLARE_STATIC 
but nothing seems to work for me.

Thanks,

John


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


Re: Preserve SOAP header received in SOAP request

Posted by Tejas Sumant <te...@gmail.com>.
I have written handler module to get header from envelope in Transport phase
using axiom_soap_envelope_get_header.
Now I need to put this extracted header into out envelope. As per my
understanding there is following API
    AXIS2_EXTERN axiom_soap_header_t *AXIS2_CALL
    axiom_soap_header_create_with_parent(
        const axutil_env_t * env,
        struct axiom_soap_envelope *envelope);
which adds new header to existing envelope. is there any API in axis2c to
add existing header to existing envelope?

Thanks,
Tejas

On Sat, Mar 12, 2011 at 8:13 PM, Nandika Jayawardana <ja...@gmail.com>wrote:

> If you are doing this thing in the service, it  would not work, since in
> the message receiver, the soap envelope you set will get replaced. Hence
> either you have to write a message receiver or a module.
>
> Regards
> Nandika
>
>
> On Thu, Mar 10, 2011 at 12:09 PM, Tejas Sumant <te...@gmail.com>wrote:
>
>> I saw an API axis2_msg_ctx_set_response_soap_envelope() which I expect to
>> set response envelope.
>> I created new envelope and the created header with new envelope as parent.
>> Then created header block in header with some name.
>> And I set this envelope as response envelope using the above mentioned API
>> in _invoke callback. However the newly created header block doesnt show up
>> in the response.
>>
>> Is this method incorrect?
>>
>> Having described this procedure, I would explore how to implement the
>> module.
>>
>> Thanks,
>> Tejas
>>
>>
>>
>> On Thu, Mar 10, 2011 at 11:54 AM, Nandika Jayawardana <jayawark@gmail.com
>> > wrote:
>>
>>> Since you want to access soap headers, you will need to implement either
>>> a message receiver, a handler as a module. You can implement a module and
>>> engage it to your service.
>>>
>>> The module will pickup the incoming header and insert it to the outgoing
>>> soap message.
>>>
>>> Regards
>>> Nandika
>>>
>>>
>>> On Tue, Mar 8, 2011 at 5:34 AM, Tejas Sumant <te...@gmail.com>wrote:
>>>
>>>> Hello,
>>>>
>>>> I have written service using Axis2c, and I get SOAP header as part of
>>>> SOAP request. I need to resend the same SOAP header unmodified to client in
>>>> response.
>>>> I formed a response in _invoke callback and sent to client. This
>>>> response contains only SOAP body. How can I preserve the header received and
>>>> send it back to client?
>>>>
>>>> Thanks.
>>>>
>>>> --
>>>> Tejas Sumant
>>>>
>>>
>>>
>>
>>
>> --
>> Tejas Sumant
>>
>
>


-- 
Tejas Sumant

Re: Preserve SOAP header received in SOAP request

Posted by Nandika Jayawardana <ja...@gmail.com>.
If you are doing this thing in the service, it  would not work, since in the
message receiver, the soap envelope you set will get replaced. Hence either
you have to write a message receiver or a module.

Regards
Nandika

On Thu, Mar 10, 2011 at 12:09 PM, Tejas Sumant <te...@gmail.com>wrote:

> I saw an API axis2_msg_ctx_set_response_soap_envelope() which I expect to
> set response envelope.
> I created new envelope and the created header with new envelope as parent.
> Then created header block in header with some name.
> And I set this envelope as response envelope using the above mentioned API
> in _invoke callback. However the newly created header block doesnt show up
> in the response.
>
> Is this method incorrect?
>
> Having described this procedure, I would explore how to implement the
> module.
>
> Thanks,
> Tejas
>
>
>
> On Thu, Mar 10, 2011 at 11:54 AM, Nandika Jayawardana <ja...@gmail.com>wrote:
>
>> Since you want to access soap headers, you will need to implement either a
>> message receiver, a handler as a module. You can implement a module and
>> engage it to your service.
>>
>> The module will pickup the incoming header and insert it to the outgoing
>> soap message.
>>
>> Regards
>> Nandika
>>
>>
>> On Tue, Mar 8, 2011 at 5:34 AM, Tejas Sumant <te...@gmail.com>wrote:
>>
>>> Hello,
>>>
>>> I have written service using Axis2c, and I get SOAP header as part of
>>> SOAP request. I need to resend the same SOAP header unmodified to client in
>>> response.
>>> I formed a response in _invoke callback and sent to client. This response
>>> contains only SOAP body. How can I preserve the header received and send it
>>> back to client?
>>>
>>> Thanks.
>>>
>>> --
>>> Tejas Sumant
>>>
>>
>>
>
>
> --
> Tejas Sumant
>

Re: Preserve SOAP header received in SOAP request

Posted by Tejas Sumant <te...@gmail.com>.
I saw an API axis2_msg_ctx_set_response_soap_envelope() which I expect to
set response envelope.
I created new envelope and the created header with new envelope as parent.
Then created header block in header with some name.
And I set this envelope as response envelope using the above mentioned API
in _invoke callback. However the newly created header block doesnt show up
in the response.

Is this method incorrect?

Having described this procedure, I would explore how to implement the
module.

Thanks,
Tejas


On Thu, Mar 10, 2011 at 11:54 AM, Nandika Jayawardana <ja...@gmail.com>wrote:

> Since you want to access soap headers, you will need to implement either a
> message receiver, a handler as a module. You can implement a module and
> engage it to your service.
>
> The module will pickup the incoming header and insert it to the outgoing
> soap message.
>
> Regards
> Nandika
>
>
> On Tue, Mar 8, 2011 at 5:34 AM, Tejas Sumant <te...@gmail.com>wrote:
>
>> Hello,
>>
>> I have written service using Axis2c, and I get SOAP header as part of SOAP
>> request. I need to resend the same SOAP header unmodified to client in
>> response.
>> I formed a response in _invoke callback and sent to client. This response
>> contains only SOAP body. How can I preserve the header received and send it
>> back to client?
>>
>> Thanks.
>>
>> --
>> Tejas Sumant
>>
>
>


-- 
Tejas Sumant

Re: Preserve SOAP header received in SOAP request

Posted by Nandika Jayawardana <ja...@gmail.com>.
Since you want to access soap headers, you will need to implement either a
message receiver, a handler as a module. You can implement a module and
engage it to your service.

The module will pickup the incoming header and insert it to the outgoing
soap message.

Regards
Nandika

On Tue, Mar 8, 2011 at 5:34 AM, Tejas Sumant <te...@gmail.com> wrote:

> Hello,
>
> I have written service using Axis2c, and I get SOAP header as part of SOAP
> request. I need to resend the same SOAP header unmodified to client in
> response.
> I formed a response in _invoke callback and sent to client. This response
> contains only SOAP body. How can I preserve the header received and send it
> back to client?
>
> Thanks.
>
> --
> Tejas Sumant
>