cancel
Showing results for 
Search instead for 
Did you mean: 

HttpAdapterException: STATUS_CODE_NOT_OK

Former Member
0 Kudos

i am trying to deliver message content to HMRC website using PI7.31 SP8 HTTP_AAE adapter and i am getting the error:

com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.aii.adapter.http.api.HttpAdapterException: STATUS_CODE_NOT_OK-Internal Server Error at com.sap.aii.adapter.soap.web.SOAPHandler.processSOAPtoXMB(SOAPHandler.java:746) at com.sap.aii.adapter.soap.web.MessageServlet.doPost(MessageServlet.java:505) at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) at com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.runServlet(FilterChainImpl.java:202) at com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.doFilter(FilterChainImpl.java:103) at .......

it worked in Development and Test but it is failing in production.

the message trace shows an HTTP 500:

<Trace level="1" type="B" name="CL_XMS_PLSRV_IE_ADAPTER-ENTER_PLSRV">

  <Trace level="1" type="T">URL for integration server read from global configuration</Trace>

  <Trace level="1" type="T">URL= dest://PDP_PIP_CONNECTION</Trace>

  <Trace level="1" type="B" name="CL_XMS_PLSRV_CALL_XMB-CALL_XMS_HTTP" />

- <!--  ************************************

  -->

  <Trace level="1" type="T">---------------------------------------------------</Trace>

  <Trace level="1" type="T">SSL not active</Trace>

  <Trace level="1" type="T">---------------------------------------------------</Trace>

  <Trace level="1" type="T">HTTP Multipart document length: 4381</Trace>

  <Trace level="1" type="T">HTTP-client: request sent</Trace>

  <Trace level="1" type="T">HTTP-client: response received</Trace>

  <Trace level="1" type="T">HTTP-client: status code = 500</Trace>

  <Trace level="1" type="T">HTTP-client: parsed & response message object created</Trace>

  <Trace level="1" type="System_Error">SOAP fault message received</Trace>

  <Trace level="1" type="System_Error">SOAP fault code: Client</Trace>

  <Trace level="1" type="System_Error">SOAP fault string: Server Error</Trace>

  </Trace>

i have checked the forum.  i have altered the URL and i get a different error.  i am not sure if it is PI or the Receiver system causing this error.

we cutover from PI7.1 using HTTP_DESTINATION which was successful to PI7.31 today which then fails.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

three weeks on and SAP still have not worked out the issue.

this has occured at another client site this weekend after they went live with the new HTTP_AAE adapter on the same scenario....

hmmm.  Coincidence???  i think not!

Former Member
0 Kudos

Hi Barry,

Were you able to solve this issue? Any suggestions?

rgds

aditya

Former Member
0 Kudos

If you set the content type in the adapter to text/xml it should work.

0 Kudos

Hi Barry,

I am also facing similar issue. But already content type in adapter is set to text/xml but still we are getting error.

Any idea how can we resolve the issue.

Regards,

Sudha

Former Member
0 Kudos

Hi Barry,

We're getting the same response 500 Internal Server Error from https://dps.ws.hmrc.gov.uk:443/dpsauthentication/service using HTTPS.


PO 7.4 HTTP_AAE

Adapter configuration:

Zoom this image to see the error log from the PO server.

I am able to successfully ping the communication channel, so the address is being reached.

Do you have any info on how to get more detail from the HMRC server as to why a 500 error is being raised?

Thanks,

Paul

Former Member
0 Kudos

Hi Paul

This is a tricky one. 
you could try using a tool like this to extend the HTTP trace

http://service.sap.com/sap/support/notes/1904944

Former Member
0 Kudos

Thanks Barry,

Unfortunately at present the tracing is only available for the SOAP receiver. We'll explore other sniffing tools.

Thanks

Paul

former_member550907
Participant
0 Kudos
Paul, hello!
We can not solve the same error. Please tell me you were able to solve the error?


Regards,

Rinaz

Answers (6)

Answers (6)

0 Kudos

Hi Experts ,

Kindly suggest me steps to resolve the http 500 internal server error while accessing https://dps.ws.hmrc.gov.uk/dpsauthentication/service url .

Regards,

Rushabh Kothari

Former Member
0 Kudos

HI ,

I am facing the same issue now? Can anyone help me on this?

com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.aii.adapter.http.api.HttpAdapterException: STATUS_CODE_NOT_OK-Internal Server Error.

This exception  I am facing when I am giving the correct input data and when I am giving  incorrect input data I am not getting the exception.

Is this a Data issue or Adapter Issue?

paul_abrahamson_sap
Active Participant
0 Kudos

The root cause could be a business error as described above. Either Login credentials may be invalid if it's the DPSRequestToken message that's failing. Or it could be a server timeout at HMRC or a business / data error.

Using an HTTP test tool like SOAPUI or Postman you can replay the failed DPS message and see the SOAP fault in the HTTP 500 response body. This may tell you what went wrong at HMRC's and if not clear at least this fault message should include an incident number for support from HMRC.

SAP have told me that handling of SOAP Fault envelopes from within the HTTP 500 response is not supported in the HTTP_AAE adapter as of 7.4 SP10. Adding support for this is on the backlog for future development of the adapter. No timescale is known yet. I would suggest you raise an OSS message as we will be doing to ensure this gets priority in their roadmap.

Former Member
0 Kudos

Hi Barry,

we use the PI 7.31 SP9 with HTTP_AAE adapter to transfer the data to hmrc and we have the same error. You wrote: "If you set the content type in the adapter to text/xml it should work." But i can not find any filed in the adapter to configure the content type. Can you please help me?

Regrads,

Daniel

Former Member
0 Kudos

Hi Daniel

if you tick the Specify Content Details on the Communications Channel, add text/xml in the Content Type field.

Barry

Former Member
0 Kudos

Hi Barry,

should I put into the field 'Character Encoding' the value UTF-8? What you have entered in the field?


Daniel

nageswararao_v2
Participant
0 Kudos

Hello Daniel/Barry,

Were you able to solve this?

I have similar requirement where I need to send a HTTP request using HTTP_AAE - GET method, capture the response back. Can you please guide me and provide me some links how to proceed with this kind of development.

Any kind of help would be highly appreciated.

Error in receiver CC:

com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.aii.adapter.http.api.HttpAdapterException: STATUS_CODE_NOT_OK-Internal Server Error

Tanks & Regards,

NageshwaraRao.V

paul_abrahamson_sap
Active Participant
0 Kudos

Hi Daniel, any joy on your solution? We're only seeing this error with the DPSrequestToken message to HMRC. The other Scenarios are working.

paul_abrahamson_sap
Active Participant
0 Kudos

In PO 7.4 the HTTP_AAE Adapter doesn't seem to parse the SOAP Fault returned when the receiver returns an HTTP 500 Internal Server Error response. DPS includes the fault detail in the body of the HTTP 500 response as a SOAP Fault.

Using an HTTP Test tool like Postman, you can resend the failed message to see the SOAP Fault response.

In our case it was due to invalid credentials.

But other business errors can also be the reason for the fault e.g. requesting an invalid Form type etc.

We have an open query with SAP about the behaviour of the HTTP_AAE adapter and the parsing of HTTP 500 responses....

bravon33
Explorer
0 Kudos

I know this was a long time ago, but do we know if SAP are changing the behaviour of the HTTP_AEE adapter to pass HTTP 500 responses back?

Former Member
0 Kudos

thank you both for your repsonses.

the message is triggered from a standard SAP program that is generating at 12KB file so i do not believe it to be either format or size of the message.

former_member189354
Contributor
0 Kudos

Hi,

   When you post large messages over http where target http server node down/ time outs will result HTTP_STATUS_CODE_NOT_OK wich results other than http status code 200. Target HTTP Server needs to be fine tuned to accept large files from clients i.e. from SAP PI. Target http server needs have cluster where http service nodes tied together.

baskar_gopalakrishnan2
Active Contributor
0 Kudos

This error seems causing during the message processing at the target system. The error due to invalid data or the target system has some issues to execute the logic. Work closely with target system to identify the cause.