Thanks Kasun, It worked.

Sameera.

On Fri, May 25, 2012 at 5:27 AM, Kasun Indrasiri <[email protected]> wrote:

> Hi Sameera,
>
> You can do something like this.
>
> <proxy name="HeaderEnrichProxy" transports="https http" startOnLoad="true"
> trace="disable">
>         <target>
>             <inSequence>
>                 <log level="full"/>
>                 <header xmlns:urn="urn:FOOBAR_WS" name="urn:AuthInf"
> value="foo"/>
>                 <enrich>
>                     <source type="inline">
>                         <urn:AuthInf xmlns:urn="urn:FOOBAR_WS">
>                             <urn:userName>foo</urn:userName>
>                             <urn:password>bar</urn:password>
>                         </urn:AuthInf>
>                     </source>
>                     <target xmlns:urn="urn:FOOBAR_WS" xmlns:soapenv="
> http://schemas.xmlsoap.org/soap/envelope/";
> xpath="/soapenv:Envelope/soapenv:Header/urn:AuthInf"/>
>                 </enrich>
>                 <log level="full"/>
>                 <drop/>
>             </inSequence>
>         </target>
>      </proxy>
>
> On Fri, May 25, 2012 at 10:28 AM, Hasini Gunasinghe <[email protected]>wrote:
>
>> Hi Sameera,
>>
>> Can you please also mention the use case where you need to send user
>> credentials in a custom header?
>> Just wondering whether you could send them in security header as user
>> name token? If not, I hope this communication happens over TLS since the
>> custom header contains credentials.
>>
>> Thanks,
>> Hasini.
>>
>> On Fri, May 25, 2012 at 9:52 AM, Sameera Jayasoma <[email protected]>wrote:
>>
>>> Hi Devs,
>>>
>>> How do you do subject? I heard that only simple valued headers can be
>>> added using using the header mediator. But my requirement is to add a
>>> header like following to the outgoing request.
>>>
>>> <soapenv:Header>
>>>       <urn:AuthenticationInfo>
>>>          <urn:userName>temp</urn:userName>
>>>          <urn:password>temp123</urn:password>
>>>       </urn:AuthenticationInfo>
>>>    </soapenv:Header>
>>>
>>> AFAIK, only way to achieve this is to write a custom mediatory. Please
>>> let me know, if there is a better way to do this.
>>>
>>> Thanks,
>>> Sameera.
>>>
>>> --
>>> Sameera Jayasoma
>>> Technical Lead
>>>
>>> WSO2, Inc. (http://wso2.com)
>>> email: [email protected]
>>> blog: http://tech.jayasoma.org
>>>
>>> Lean . Enterprise . Middleware
>>>
>>> _______________________________________________
>>> Dev mailing list
>>> [email protected]
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Kasun Indrasiri
> Associate Technical Lead
> WSO2, Inc.; http://wso2.com
> lean.enterprise.middleware
>
> cell: +94 71 536 4128
> Blog : http://kasunpanorama.blogspot.com/
>



-- 
Sameera Jayasoma
Technical Lead

WSO2, Inc. (http://wso2.com)
email: [email protected]
blog: http://tech.jayasoma.org

Lean . Enterprise . Middleware
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to