SoapUI request returns HTTP/1.1 400 Bad Request

load-testingsoapuiweb services

I'm using SoapUI to load test one of our .net webservices.

I'm new to SoapUI, so I've run through the "getting started", using a publicly available service, and had no problems. But when I try to send a request to my webservice I'm getting a HTTP/1.1 400 Bad Request message.

I generate a default request from the schema, and insert the request XML in the tags, but when I submit it, I get the error above.

If I browse to the service and insert the same XML in the test page, it works perfectly.

Here's the XML I'm submitting:

<AccountInformationRequest xmlns="http://RedlineApplicationServices.com/CognitionAI/AccountInformationRequest.xsd">
<Authentication>
    <LoginName>WWWWWW</LoginName>
    <Password>KKKKKKK</Password>
</Authentication>
<Directives>
    <Environment>TRIAL</Environment>
    <RequestedAction>AccountSummary</RequestedAction>
    <CustomerReference>77777</CustomerReference>
    <AccountReference>000000111111</AccountReference>
</Directives></AccountInformationRequest>

Any ideas what I'm doing wrong?

Best Answer

OK, I've found the problem. The webservice is expecting a string not actually XML, so wrapping it in a <![CDATA[ ... ]]> did the trick.

I guess the test page must do something similar in the background?

Related Topic