I'm sure this has been done deliberately in synapse. If so we need to know
why exactly. Will it break proxying SOAP 1.1 services if we allow these to
be passed to the back-end?

The defined standards for the Content-Type are as follows

SOAP 1.1 - text/xml
SOAP 1.2 - application/soap+xml
POX - application/xml

So naturally REST on XML would be application/xml. But AFAIK there's no
specification saying its wrong to send text/xml to REST services.

The REST service you are trying out with supports only text/xml and expects
POX content. Which is a kind of a special case IMO.

Thanks,
NuwanD.




On Thu, May 1, 2014 at 7:27 PM, Nirodha Pramod <[email protected]> wrote:

> Hi Nuwan,
>
> Isn't this a bug?  When we tested this we used a RESTful service
> (starbucks sample) as the back end. And you can't expect the client would
> always send application/xml as the Content-Type when calling a rest
> backend. Sending a text/xml is totally valid when calling a RESTful backend.
>
> regards,
> Nirodha
>
>
> On Thu, May 1, 2014 at 12:35 PM, Nuwan Dias <[email protected]> wrote:
>
>> Its not that it alters request urls, it drops the request parameters from
>> the outgoing request when the Content-Type is text/xml.
>>
>> If the API context is:  /stockquote/1.0.0
>>
>> Endpoint is: http://host:port/StockQuoteService
>>
>> Request url is:  /stockquote/1.0.0/getQuote
>>
>> In the case of applcation/xml, the outgoing request is http://host:port
>> /StockQuoteService/getQuote
>>
>> In the case of text/xml, the outgoing request is http://host:port
>> /StockQuoteService
>>
>> As you see, in the case of text/xml, 'getQuote' is not sent to the back
>> end.
>>
>> I presume this is the correct behavior since text/xml is normally used
>> for SOAP?
>>
>> Thanks,
>> NuwanD.
>>
>>
>> On Thu, May 1, 2014 at 11:37 AM, Asanthi Kulasinghe <[email protected]>wrote:
>>
>>> Hi,
>>>
>>> Context path of POST request URLs of APIs get dropped at the gateway
>>> when  invoked with the content-type 'text/xml'.
>>> I have reported the issue under [1].
>>> Please look into this.
>>>
>>> [1] - https://wso2.org/jira/browse/APIMANAGER-2256
>>>
>>>
>>> Regards
>>>  *Asanthi Kulasinghe*
>>> WSO2 Inc; http://www.wso2.com/.
>>> Mobile: +94777355522
>>>
>>>
>>>
>>
>>
>> --
>> Nuwan Dias
>>
>> Associate Tech 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
>>
>>
>
>
> --
>
> *Nirodha Gallage*
> Senior Software Engineer, QA.
> WSO2 Inc.: http://wso2.com/
> Mobile: +94716429078
>



-- 
Nuwan Dias

Associate Tech 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