Debug mock services generated by soapUI

axis2debuggingfaultsoapuiweb services

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 means 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.

Best Answer

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.

Related Topic