cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Invalid Response code (400) on web service

Former Member
0 Likes
1,770

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

View Entire Topic
markangelo_dihiansan
Active Contributor
0 Likes

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 Likes

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 Likes

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 Likes

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 Likes

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 Likes

This tread solved my problem.

[;

BR

Kalle