Hi Aman,

Please confirm whether you put the real value of the token in the *value*
attribute of property mediator as below.

<property name="accessToken" scope="default" type="STRING"
value="qwMq12371BndncuP!HJk2387PkDggsjakbjcd1ha4_kHJgfnj_JsGwWub9z"/>

Thanks

On Tue, Jul 31, 2018 at 9:49 AM, Aman Singh <amansingh0...@gmail.com> wrote:

> Dear Shakila,
>
> I tried it in my WSO2, but when I am running my proxy service it is saying
> "This service has been secured with UTOverTransport".
>
> Below is my sample code:-
>
> <?xml version="1.0" encoding="UTF-8"?>
> <proxy name="AzureProxy1" startOnLoad="true" transports="http https"
> xmlns="http://ws.apache.org/ns/synapse";>
>     <target>
>         <inSequence>
>             <log description="LOG" level="custom">
>                 <property name="property name" value="=================="/>
>             </log>
>             <property name="accessToken" scope="default" type="STRING"
> value="{access_token_value}"/>
>             <property description="OAuth Property"
> expression="fn:concat('Bearer  ', $ctx:accessToken)" name="Authorization"
> scope="transport" type="STRING"/>
>             <send>
>                 <endpoint key="azureEP1"/>
>             </send>
>         </inSequence>
>         <outSequence>
>             <respond/>
>         </outSequence>
>         <faultSequence/>
>     </target>
> </proxy>
>
>
> And my HTTP Endpoint is :-
>
> <endpoint name="azureEP1" xmlns="http://ws.apache.org/ns/synapse";>
>     <http method="get" uri-template="https://manageme
> nt.azure.com/subscriptions/{subscription_id}/resourceGroups/
> {resource_group_name}/providers/Microsoft.EventHub/
> namespaces/{namespace_name}/eventhubs/{event_hub_name}?
> api-version=2017-04-01"/>
> </endpoint>
>
> Thank you,
> Aman.
>
> On Thu, Jul 26, 2018 at 2:22 PM, Aman Singh <amansingh0...@gmail.com>
> wrote:
>
>> Thank you Shakila, will try it.
>>
>> Thank you,
>> Aman.
>>
>> On Thu, 26 Jul 2018, 14:20 Shakila Sasikaran, <shak...@wso2.com> wrote:
>>
>>> Hi Aman,
>>>
>>> Please set the following property before the send or call mediator in
>>> your proxy service configuration.
>>>
>>> <property name="accessToken" value="<ACCESS_TOKEN>"/>
>>> <property name="Authorization" expression="fn:concat('Bearer  ',
>>> $ctx:accessToken)" scope="transport"/>
>>>
>>> Note: Replace the <ACCESS_TOKEN> by the actual token.
>>>
>>> Thanks
>>>
>>> On Thu, Jul 26, 2018 at 2:13 PM, Aman Singh <amansingh0...@gmail.com>
>>> wrote:
>>>
>>>> Hi team,
>>>>
>>>> I have created an Event Hub in Azure. To call the Event Hub we use
>>>> simple GET request as mentioned in Event Hub docs. We also need an "Bearer
>>>> Token" {authentication key}, to call the request with POSTMAN.
>>>>
>>>> If I am calling that Event Hub via WSO2 ESB, using proxy service and
>>>> attaching a "HTTP Endpoint" inside a SEND mediator, where my HTTP Endpoint
>>>> contain the 'request' to call Event Hub. Where and how can I use/attach the
>>>> "bearer token" in my WSO2 ESB.
>>>>
>>>> Any help would be appreciated.
>>>>
>>>> Thank you,
>>>> Aman
>>>>
>>>>
>>>> _______________________________________________
>>>> Dev mailing list
>>>> Dev@wso2.org
>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>
>>>>
>>>
>>>
>>> --
>>> Shakila Sasikaran
>>> Software Engineer
>>> Mobile :+94 (0) 77 526 6848
>>> shak...@wso2.com
>>> WSO2, Inc.
>>> lean . enterprise . middleware
>>> http://www.wso2.com/
>>>
>>
>


-- 
Shakila Sasikaran
Software Engineer
Mobile :+94 (0) 77 526 6848
shak...@wso2.com
WSO2, Inc.
lean . enterprise . middleware
http://www.wso2.com/
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to