Author Message
cshrivastava.radial.com
Joined: Apr 23, 2018
Messages: 4
Offline
Hello team,

AOD version:7.1.0.1202
AAEP version: 7.0.2
Tomcat: 7.0.57

I am using rest operation to connect with the web services but getting error on the Content-Type header. I am able to run these services on google's rest client just fine with the URL, Key and content-Type: application/xml
Not sure whether its the web services that are expecting a different header value in content-Type or is it the rest web service operation.

Here are the trace logs:
08/06/2018 18:56:22:316 INFO - 426C9F7CC015404ECB179B48DCB03004:/SF_EBayOrderStatus_ver_2_4 : Starting REST web service operation [ExternalEcbOrderStatus]
08/06/2018 18:56:22:378 DEBUG - 426C9F7CC015404ECB179B48DCB03004:/SF_EBayOrderStatus_ver_2_4 : Collecting [frSL1l59R4uTihQKYWAEo0l0dL5] from:getConfigForVdn:ecp_api_key
08/06/2018 18:56:22:378 DEBUG - 426C9F7CC015404ECB179B48DCB03004:/SF_EBayOrderStatus_ver_2_4 : Adding HTTP header [apikey: frSL1l59R4uTihQKYWAEo0l0dL5]
08/06/2018 18:56:22:378 DEBUG - 426C9F7CC015404ECB179B48DCB03004:/SF_EBayOrderStatus_ver_2_4 : Web Service Request -> https://dev02-epapi-na.us.gspt.net/v1.0/external-ivr-service/orders/ASHSTSTG.xml?storeId=TMSUS
08/06/2018 18:56:22:425 INFO - 426C9F7CC015404ECB179B48DCB03004:/SF_EBayOrderStatus_ver_2_4 : Response had content type: application/xml. Retrying call with new type...
08/06/2018 18:56:22:472 DEBUG - 426C9F7CC015404ECB179B48DCB03004:/SF_EBayOrderStatus_ver_2_4 : Storing [<FaultType>MissingHeader</FaultType><TimeStamp>2018-06-08T22:56:27Z</TimeStamp><FaultCode>400_MissingContentTypeException</FaultCode><Description>Content-Type header is either not sent or is invalid. Please validate your request and try again.</Description>
] to: orderStatusReturnXml
08/06/2018 18:56:22:472 DEBUG - 426C9F7CC015404ECB179B48DCB03004:/SF_EBayOrderStatus_ver_2_4 : Web Service Reply <- <FaultType>MissingHeader</FaultType><TimeStamp>2018-06-08T22:56:27Z</TimeStamp><FaultCode>400_MissingContentTypeException</FaultCode><Description>Content-Type header is either not sent or is invalid. Please validate your request and try again.</Description>


Please advice.

Thank you,
Chani Shrivastava
WilsonYu
Joined: Nov 6, 2013
Messages: 3950
Offline
For some reason, you get an exception from the Axis stub code when making the request. Did you have some headers configured for the request? They shouldn't be necessary though. Maybe try enable more tracing in the log by setting localsoaptrace=enabled in the data/ddrt.properties to show more detail in the request and response.
cshrivastava.radial.com
Joined: Apr 23, 2018
Messages: 4
Offline
The trace logs I has shared earlier was with soap localtrace enabled.
Is there a way to find what is the content-type sent in the request? On the rest web service operation content-type is not a variable that is set, so what is the default value for this header?
WilsonYu
Joined: Nov 6, 2013
Messages: 3950
Offline
There is an existing post on a similar issue that might be helpful to you.

https://www.devconnectprogram.com/forums/posts/list/21101.page#p149717
Go to:   
Mobile view