cancel
Showing results for 
Search instead for 
Did you mean: 

Invalid Response code (400) on web service

Former Member
0 Kudos

Hi.

I have created an asynchronous web service.

When i test it I get the following response.

Invalid Response code (400). Server [_URL to the web service_] returned message [Bad Request]. Http proxy info: none

I'm sure that I send a valid payload.

Tested it in the mapping performed befor the message get sent to the target system

Can anybody have an idea why my web service gets bad request?

BR

Kalle

Accepted Solutions (0)

Answers (2)

Answers (2)

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

have created an asynchronous web service. When i test it I get the following response. Invalid Response code (400).

Make sure that the request sent to your webservice matches exactly the request message that is declared in the WSDL. You can do this by loading your WSDL in SOAP UI and you will see what structure your request should look like.

Hope this helps,

Mark

Former Member
0 Kudos

I'm loading the wsdl in the test tool provided with PI.

I gets the whole structure and fields to fill in some data in.

Still it tells me that that the XML is not valid.

The same if I try to load a test message from file with a message that should be correct.

If I load it in the mapping in the design everything looks ok and works.

BR

Kalle

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

Probably the cause of your error is that you are testing the payload without a SOAP Envelope. Your scenario is WS to PI right? This is why we are advising you to use a third-party tool such SOAP UI so that the SOAP Envelope automatically gets generated when you load the WSDL in it.

Hope this helps,

Mark

Former Member
0 Kudos

When I see the payload there is a soap envelope in it.

But I can't see a trace of the message in the sxmb_moni or in the workbench.

The adapter has been activated på not been used.

<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <SOAP-ENV:Body>
    <yq1:SAPCloseWBS xmlns:yq1="namespace">
      <contactReferences>
        <ourReference>123</ourReference>
        <spoolReceiver1>123</spoolReceiver1>
        <spoolReceiver2>123</spoolReceiver2>
      </contactReferences>
      <wbsItems>
        <WINPATCaseNo>123</WINPATCaseNo>
      </wbsItems>
    </yq1:SAPCloseWBS>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

The payload above is taken from the test tool WSNavigator.

BR

Kalle

Former Member
0 Kudos

Looks as it's the ports that has been corupted when we installed a patch or something.

Upto my Basis team to fix and then we hopfully are on the way towards the goal.

BR

Kalle

Former Member
0 Kudos

This tread solved my problem.

[;

BR

Kalle

Former Member
0 Kudos

Hi Kalle,

hope the below info will be helpful for u

HTTP 400- Bad Request- ICM_HTTP_CONNECTION_FAILED Description: The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications. Possible Tips: May be because of huge message flow. Related SAP Notes-824554, 906435, 783515, 910649, 706563 If it is because of Queue problems have a look into SMQ2 and then go thru this blog- How to Re-Process failed XI Messages Automatically

Thanks,

Amar

Former Member
0 Kudos

The WS that you call is not reachable, or you have set a wrong address

Former Member
0 Kudos

I also get this message.

400 - Bad Request

The syntax of the request was not understood by the server.

But when I test the web service the interface gets read from the wsdl file.

This should refer to the interface I used when i created the wsdl connected to the web service.

When I paste the URL in an explorer window I get this.

Message Servlet is in Status OK

Status information:

Servlet com.sap.aii.adapter.soap.web.MessageServlet (Version $Id: //tc/xpi.adapters/NW711_06_REL/src/_soap_application_web_module/webm/api/com/sap/aii/adapter/soap/web/MessageServlet.java#2 $) bound to /MessageServlet

Classname ModuleProcessor: null

Lookupname for localModuleProcessorLookupName: localejbs/ModuleProcessorBean

Lookupname for remoteModuleProcessorLookupName: null

ModuleProcessorClass not instantiated

ModuleProcessorLocal is Instance of $Proxy378

ModuleProcessorRemote not instantiated

I think this is telling me that the web service is reachebal.

BR

Kalle