Author Message
Bala012024
Joined: Mar 17, 2014
Messages: 59
Offline
Hi,
Getting Transport error: 415 Error: Unsupported Media Type , when i call Restful Web Services.

The URL is working in browser and other other REST tools with/without headers.


02/06/2016 16:12:00:498 DEBUG - : Collecting [application/xml] from:BodiVariables:Accept
02/06/2016 16:12:00:499 DEBUG - : Adding HTTP header [Accept: application/xml]
02/06/2016 16:12:00:505 DEBUG - : Web Service Request -> <URL>
02/06/2016 16:12:00:565 ERROR - : HTTP TRANSPORT, 415 ERROR: UNSUPPORTED MEDIA TYPE
02/06/2016 16:12:00:565 ERROR - : EXCEPTION: Transport error: 415 Error: Unsupported Media Type

This is the content type i am getting from server, which is mentioned as IN Variable. Accept Variable is set at OUT.


02/06/2016 16:12:00:571 DEBUG - Variables:ContentType : application/xml

i tried with and with out headers , still getting this 415 error. can any one help here ?

This is just HTTP GET and i had attached the screenshots.


thanks in advance,
bala.
  • [Thumb - screen_2.png]
[Disk] Download
  • [Thumb - screen_1.png]
[Disk] Download
RossYakulis
Joined: Nov 6, 2013
Messages: 2652
Offline
maybe try text/xml? The error is coming from the server side.
Bala012024
Joined: Mar 17, 2014
Messages: 59
Offline
Ross,
As suggested, i had set the accept as text/xml and got same error.

any other suggestions pls ?


thanks
bala.
RossYakulis
Joined: Nov 6, 2013
Messages: 2652
Offline
Why not skip the accept header?
Bala012024
Joined: Mar 17, 2014
Messages: 59
Offline
hi Ross,
i tried removing the Accept header and still same result.


03/06/2016 12:39:06:132 DEBUG - E8ECC2078FE0DC0D8A3BB48D270F67BD: BodiVariables:ContentType : text/xml


This is the content type i am getting as in variable.Also tried with adding User-Agent : Mozilla/5.0, still same error.

Still could not understand what i have to do make it work ..


thanks
bala.


RossYakulis
Joined: Nov 6, 2013
Messages: 2652
Offline
can you post the actual xxx.rest file or your sample application?
RossYakulis
Joined: Nov 6, 2013
Messages: 2652
Offline
Are you doing a POST or a GET? It should be a get.
RossYakulis
Joined: Nov 6, 2013
Messages: 2652
Offline
TO do any more analysis you would need to

"get an AVB trace and Session manager trace with MRCP turned on. Turn on FINEST."
Bala012024
Joined: Mar 17, 2014
Messages: 59
Offline
it is a GET Operation

i cannot post the data here...

URL: <url>+params

The Response in a browser is of XML Format,

<parent1>
..lot of childs
</parent1>

let me turn on finest and check the session manager logs...

thanks
bala.
RossYakulis
Joined: Nov 6, 2013
Messages: 2652
Offline
can you email (yakulis@avaya.com) me your sample app?
Bala012024
Joined: Mar 17, 2014
Messages: 59
Offline
Sure, will email you on june 7,2016.
BaoNgo
Joined: Mar 12, 2019
Messages: 1
Offline
Hi,

Have you solved this problem yet?

If yes, then may i ask the solution for this problem?

I'm getting the same problem but didn't know how to solve it.

Thank you very much.
Go to:   
Mobile view