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 <[email protected]>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 <[email protected]>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 <[email protected]
>> > 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 <[email protected]>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

Reply via email to