Invalid / Invalid SOAP Envelope

I created an HTTP message message as follows:

<HttpClientRq>
            <header>
                <parameter name="Content-Type" value="text/xml"/>
            </header>
            <body>
                <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sam="http://www.soapui.org/sample/">
                     <soapenv:Header/>
                     <soapenv:Body>
                     <sam:login>
                     <username>Login</username>
                     <password>Login123</password>
                     </sam:login>
                     </soapenv:Body>
                </soapenv:Envelope>
            </body>
        </HttpClientRq>

I use the SOAPUI tool to create the operation of false services, login.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sam="http://www.soapui.org/sample/">
                     <soapenv:Header/>
                     <soapenv:Body>
                     <sam:login>
                     <username>Login</username>
                     <password>Login123</password>
                     </sam:login>
                     </soapenv:Body>
                </soapenv:Envelope>

I am sending a request message above, SOAPUI is able to receive the request message. But unfortunately, it shows the error shown below:

ERROR [SoapUI] An error occurred [org.apache.xmlbeans.XmlException: Missing/Invalid SOAP Envelope, expecting [{http://schemas.xmlsoap.org/soap/envelope/}Envelope]], see error log for details
2016-07-26 17:31:57,943 ERROR [errorlog] com.eviware.soapui.impl.wsdl.mock.DispatchException: org.apache.xmlbeans.XmlException: Missing/Invalid SOAP Envelope, expecting [{http://schemas.xmlsoap.org/soap/envelope/}Envelope]
com.eviware.soapui.impl.wsdl.mock.DispatchException: org.apache.xmlbeans.XmlException: Missing/Invalid SOAP Envelope, expecting [{http://schemas.xmlsoap.org/soap/envelope/}Envelope]
    at com.eviware.soapui.impl.wsdl.mock.WsdlMockDispatcher.dispatchPostRequest(WsdlMockDispatcher.java:241)
    at com.eviware.soapui.impl.wsdl.mock.WsdlMockDispatcher.dispatchRequest(WsdlMockDispatcher.java:113)
    at com.eviware.soapui.impl.wsdl.mock.WsdlMockRunner.dispatchRequest(WsdlMockRunner.java:142)
    at com.eviware.soapui.monitor.JettyMockEngine$ServerHandler.handle(JettyMockEngine.java:604)
    at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.Server.handle(Server.java:326)
    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
    at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
    at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.xmlbeans.XmlException: Missing/Invalid SOAP Envelope, expecting [{http://schemas.xmlsoap.org/soap/envelope/}Envelope]
    at com.eviware.soapui.impl.wsdl.support.soap.SoapUtils.getBodyElement(SoapUtils.java:134)
    at com.eviware.soapui.impl.wsdl.support.soap.SoapUtils.getContentElement(SoapUtils.java:172)
    at com.eviware.soapui.impl.wsdl.support.soap.SoapUtils.findOperationForRequest(SoapUtils.java:200)
    at com.eviware.soapui.impl.wsdl.mock.WsdlMockDispatcher.dispatchPostRequest(WsdlMockDispatcher.java:191)
    ... 15 more

I do not understand. An error log complains about an invalid / missing soap: an envelope, although I included it in my request message. I hope someone can provide me with tips and tricks so appreciated.

+4
source share

Source: https://habr.com/ru/post/1649181/


All Articles