Hi,
I have created an API by specifying HTTP service as a target. The source system will accept the only XML. Since I have added OAuth 2.0 feature in case of Authorization fail the response from Tyk gateway is in JSON format. How to resolve this issue.
<oas:UsernameToken>
<oas:Username>TestUser</oas:Username>
<oas:Password>Welcome123</oas:Password>
<!--You may enter ANY elements at this point-->
</oas:UsernameToken>
</oas:Security>
</soap:Header>
<soapenv:Body>
<GetTrackandTraceRequest >
<tracking_number>27562056007</tracking_number>
</GetTrackandTraceRequest>
</soapenv:Body>
So you want the error response to be in XML? That is not possible without some kind of custom middleware which would hijack the request pre-auth and send back an XML response.