开发者

Debug mock services generated by soapUI

开发者 https://www.devze.com 2023-02-21 18:57 出处:网络
preconditions: 1. response(generated as mock service) in soupUI 2. web-client, that knows about running mock service by address:

preconditions:

1. response(generated as mock service) in soupUI

2. web-client, that knows about running mock service by address:

http://localhost:8091/cps/axis2/services/

Mock services are running OK.

When perform request from web-client,I expect to get response as specified in soapUI.

Instead of this I got general error:

org.apache.axiom.soap.SOAPProcessingException: First Element must contain the local name, Envelope , but found html

That mea开发者_如何学Cns there are problems with response,thus html with 500 code returned.

The question is ,how can I debug what is the cause of problem?

I suspect namespaces and abstract types.


It's probably a bad endpoint on the client. i.e. it's not using the right URI. Or, the mockservice may be configured but not running. In this situation, SoapUI responds with an HTML page that says something like:

"There are currently 0 running soapUI MockServices" or some such.

Take a look at your WSDL that SoapUI produces. Consume that in SoapUI and you should be able to send yourself a request, see it in the mockservice log, and get a response. Once you get that working, THEN try a client. And it should work. If it doesn't, check its endpiont vs the one that the SoapUI request (built from the SoapUI mock) used. Adjust for localhost vs IP address.


I might not be able to answer your question in general but in this case it looks like instead of returning fully specified response from soapUI mock (i.e. with soap:Envelope included) you only specify message body. The official documentation has samples that specify responses.

P.S. I hope I got your question correctly

0

精彩评论

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

关注公众号