Hi Nuwan,

Thanks for the suggestion. I was able to get the requirement working using
the method suggested by you.

Thanks
Shenavi

*Shenavi de Mel*
Software Engineer
WSO2 Inc: http://wso2.com
email: [email protected]
mobile:+94771244470


On Wed, Dec 9, 2015 at 10:35 PM, Shenavi de Mel <[email protected]> wrote:

> Hi Nuwan,
>
> I was not aware that we are able to specify the production endpoint in
> this parameterized manner. I will go through the docs to understand how to
> populate them dynamically This is a customer requirement and we have raised
> the concerns mentioned by you to the customer as well in going for this
> approach but then he mentions that they need to have the support for a
> version specific endpoint with designing a single API with endpoints of
> various versions. (User will be specifying the version in the header and
> the request should be made accordingly).
>
> Thanks
> Shenavi
>
> *Shenavi de Mel*
> Software Engineer
> WSO2 Inc: http://wso2.com
> email: [email protected]
> mobile:+94771244470
>
>
> On Wed, Dec 9, 2015 at 7:37 PM, Nuwan Dias <[email protected]> wrote:
>
>> Why would you want the send mediator to send the request and not execute
>> the rest? That design would introduced problems such as response stats not
>> being available, swagger console issues, etc.
>>
>> It looks like you're trying to achieve the use case of sending the
>> request to a dynamic endpoint. If that is the case, you can design your
>> endpoint url with parameters at the time of API Publishing.
>>
>> Ex: http://host:port/{resource_path}/{param}
>>
>> Then using custom mediation policies (sequences) you could execute your
>> logic and populate the values for these parameters accordingly. Read more
>> about the "HTTP Endpoint" on the ESB docs to understand how to populate the
>> values of those parameters dynamically.
>>
>> Thanks,
>> NuwanD.
>>
>> On Wed, Dec 9, 2015 at 4:59 PM, Shenavi de Mel <[email protected]> wrote:
>>
>>> Hi APIM Team,
>>>
>>> When i was trying to invoke a custom endpoint which dynamically changes
>>> with a header value using a send mediator in my custom sequence, i
>>> experienced a behavior where the request will go first to the endpoint of
>>> my custom sequence after that it will send a request to the endpoint
>>> specified when creating the API (Production endpoint) . I am trying to
>>> understand the reason for two requests being sent in this scenario? I would
>>> be grateful if you could explain to me why this is happening.
>>>
>>> When API is invoked which uses the custom in sequence following was seen
>>> on the wire logs. I have also attached the complete wire logs received to
>>> the mail.
>>>
>>>  DEBUG - wire << "GET
>>> /t/backstage/webapps/customerservice-1.1.0/services/customers/customerservice/customerservice/customers/123
>>> HTTP/1.1[\r][\n]"
>>>
>>> DEBUG - wire << "GET
>>> /t/backstage/webapps/customerservice-default-SNAPSHOT/services/customers/customerservice/customerservice/customers/123
>>> HTTP/1.1[\r][\n]"
>>>
>>> I have attached my custom sequences as well. Your help will be much
>>> appreciated on this matter.
>>>
>>> Thanks and Regards
>>> Shenavi
>>>
>>>
>>>
>>>
>>
>>
>> --
>> Nuwan Dias
>>
>> Technical Lead - WSO2, Inc. http://wso2.com
>> email : [email protected]
>> Phone : +94 777 775 729
>>
>
>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to