开发者

SoapUI request returns HTTP/1.1 400 Bad Request

开发者 https://www.devze.com 2022-12-10 01:58 出处:网络
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 t

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?


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?


I've seen this problem in Version 2.5.1, what version of SOAP UI are you using?, maybe you could try with 2.5 and see what happens.

Regards

0

精彩评论

暂无评论...
验证码 换一张
取 消