This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Web Services and the fly likes weblogic.xml.saaj.VersionMismatchException: unable to locate Envelope in namespace Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "weblogic.xml.saaj.VersionMismatchException: unable to locate Envelope in namespace" Watch "weblogic.xml.saaj.VersionMismatchException: unable to locate Envelope in namespace" New topic
Author

weblogic.xml.saaj.VersionMismatchException: unable to locate Envelope in namespace

SaravanaKumar Venugopal
Greenhorn

Joined: May 12, 2012
Posts: 16
All,
When I am trying to consume a webservice I am getting the below exception, can any of you please help me in ressolving the issue.



Caused by: weblogic.xml.saaj.VersionMismatchException: unable to locate Envelope in namespace http://schemas.xmlsoap.org/soap/envelope/. Root element is "http://schemas.xmlsoap.org/wsdl/" in namespace "definitions"
at weblogic.xml.saaj.SaajDocument.getEnvelope(SaajDocument.java:107)
at weblogic.xml.saaj.SOAPPartImpl.envelope(SOAPPartImpl.java:77)
at weblogic.xml.saaj.SOAPPartImpl.getEnvelope(SOAPPartImpl.java:72)
at weblogic.xml.saaj.SOAPMessageImpl.<init>(SOAPMessageImpl.java:156)
at weblogic.xml.saaj.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:76)
at weblogic.wsee.connection.soap.SoapClientConnection.createSOAPMessage(SoapClientConnection.java:134)
at weblogic.wsee.connection.soap.SoapConnection.receive(SoapConnection.java:515)
... 9 more
Caused by: weblogic.xml.saaj.VersionMismatchException: unable to locate Envelope in namespace http://schemas.xmlsoap.org/soap/envelope/. Root element is "http://schemas.xmlsoap.org/wsdl/" in namespace "definitions"
at weblogic.xml.saaj.SaajDocument.getEnvelope(SaajDocument.java:107)
at weblogic.xml.saaj.SOAPPartImpl.envelope(SOAPPartImpl.java:77)
at weblogic.xml.saaj.SOAPPartImpl.getEnvelope(SOAPPartImpl.java:72)
at weblogic.xml.saaj.SOAPMessageImpl.<init>(SOAPMessageImpl.java:156)
at weblogic.xml.saaj.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:76)
at weblogic.wsee.connection.soap.SoapClientConnection.createSOAPMessage(SoapClientConnection.java:134)
at weblogic.wsee.connection.soap.SoapConnection.receive(SoapConnection.java:515)
at weblogic.wsee.ws.dispatch.client.ConnectionHandler.handleResponse(ConnectionHandler.java:179)
at weblogic.wsee.handler.HandlerIterator.handleResponse(HandlerIterator.java:287)
at weblogic.wsee.handler.HandlerIterator.handleResponse(HandlerIterator.java:271)
at weblogic.wsee.ws.dispatch.client.ClientDispatcher.handleResponse(ClientDispatcher.java:213)
at weblogic.wsee.ws.dispatch.client.ClientDispatcher.dispatch(ClientDispatcher.java:150)
at weblogic.wsee.ws.WsStub.invoke(WsStub.java:87)
at weblogic.wsee.jaxrpc.StubImpl._invoke(StubImpl.java:339)
at com.qwest.rdb.wsdl.ants.LegalEntityCode_V1PortType_Stub.opGet(Unknown Source)
at com.qwest.odb.tester.AntsDemoHandler.main(AntsDemoHandler.java:71)
</bea_fault:stacktrace></detail>]; nested exception is:
weblogic.wsee.jaxrpc.soapfault.WLSOAPFaultException: Failed to receive message java.io.IOException: Could not parse SOAP message. Remaining stream ...
-> Could not parse SOAP message. Remaining stream ...

at com.qwest.rdb.wsdl.ants.LegalEntityCode_V1PortType_Stub.opGet(Unknown Source)
at com.qwest.odb.tester.AntsDemoHandler.main(AntsDemoHandler.java:71)
Caused by: weblogic.wsee.jaxrpc.soapfault.WLSOAPFaultException: Failed to receive message java.io.IOException: Could not parse SOAP message. Remaining stream ...
-> Could not parse SOAP message. Remaining stream ...

at weblogic.wsee.codec.soap11.SoapCodec.decodeFault(SoapCodec.java:357)
at weblogic.wsee.ws.dispatch.client.CodecHandler.decodeFault(CodecHandler.java:118)
at weblogic.wsee.ws.dispatch.client.CodecHandler.decode(CodecHandler.java:103)
at weblogic.wsee.ws.dispatch.client.CodecHandler.handleFault(CodecHandler.java:91)
at weblogic.wsee.handler.HandlerIterator.handleFault(HandlerIterator.java:309)
at weblogic.wsee.handler.HandlerIterator.handleResponse(HandlerIterator.java:269)
at weblogic.wsee.ws.dispatch.client.ClientDispatcher.handleResponse(ClientDispatcher.java:213)
at weblogic.wsee.ws.dispatch.client.ClientDispatcher.dispatch(ClientDispatcher.java:150)
at weblogic.wsee.ws.WsStub.invoke(WsStub.java:87)
at weblogic.wsee.jaxrpc.StubImpl._invoke(StubImpl.java:339)
... 2 more
Caused by: weblogic.wsee.handler.InvocationException: Failed to receive message java.io.IOException: Could not parse SOAP message. Remaining stream ...
at weblogic.wsee.ws.dispatch.client.ConnectionHandler.handleResponse(ConnectionHandler.java:181)
at weblogic.wsee.handler.HandlerIterator.handleResponse(HandlerIterator.java:287)
at weblogic.wsee.handler.HandlerIterator.handleResponse(HandlerIterator.java:271)
... 6 more
Caused by: java.io.IOException: Could not parse SOAP message. Remaining stream ...
at weblogic.wsee.connection.soap.SoapConnection.receive(SoapConnection.java:521)
at weblogic.wsee.ws.dispatch.client.ConnectionHandler.handleResponse(ConnectionHandler.java:179)
... 8 more
Caused by: weblogic.xml.saaj.VersionMismatchException: unable to locate Envelope in namespace http://schemas.xmlsoap.org/soap/envelope/. Root element is "http://schemas.xmlsoap.org/wsdl/" in namespace "definitions"
at weblogic.xml.saaj.SaajDocument.getEnvelope(SaajDocument.java:107)
at weblogic.xml.saaj.SOAPPartImpl.envelope(SOAPPartImpl.java:77)
at weblogic.xml.saaj.SOAPPartImpl.getEnvelope(SOAPPartImpl.java:72)
at weblogic.xml.saaj.SOAPMessageImpl.<init>(SOAPMessageImpl.java:156)
at weblogic.xml.saaj.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:76)
at weblogic.wsee.connection.soap.SoapClientConnection.createSOAPMessage(SoapClientConnection.java:134)
at weblogic.wsee.connection.soap.SoapConnection.receive(SoapConnection.java:515)
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3816

What is your scenario, you need to provide more details on about your code etc...


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
SaravanaKumar Venugopal
Greenhorn

Joined: May 12, 2012
Posts: 16
I am trying to consume a remedy web service, for which I have used ant clientgen task to generate jar file. After jar file generation I have added in classpath and called the function of the remedy web service, on calling the service I am getting the below given exception. Below given is the sample example by calling service,


HelloService_PortType port = null;
HelloService_PortType_Stub stub = null;

String wsdl = "http://localhost/WSDL/public/HelloService?wsdl";

HelloService_V1Service_Impl locator = new HelloService_V1Service_Impl(wsdl);

port = locator.HelloService_V1Soap("username", "password");
stub = (HelloService_V1PortType_Stub) port;

String endPt = wsdl.substring(0,
wsdl.length() - "?wsdl".length());

stub._setProperty(HelloService_PortType_Stub.ENDPOINT_ADDRESS_PROPERTY, endPt);

GetInputMap map = new GetInputMap();
map.setID("TestUser");

//System.out.println(locator);
GetOutputMap OMap = port.opGet(map); // Place where the exception got trigerred
SaravanaKumar Venugopal
Greenhorn

Joined: May 12, 2012
Posts: 16
Issue has been ressoved by having an handler class for WSDl file, since the remedy SOAP header has not been identified for JAX-RPC, so we had added an handler class which has fixed the issue.
 
Don't get me started about those stupid light bulbs.
 
subject: weblogic.xml.saaj.VersionMismatchException: unable to locate Envelope in namespace
 
Similar Threads
SOAP message
Question regarding MZ notes
Mock exam question: SOAP doubt
Question: WS-I Profile Basic 1.0a R1005
Boundary of Multi part message is getting changed whenever message is written on output stream