Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Calling weblogic webservice error

 
rao gary
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Calling weblogic webservice error:

Hello Forum,

So interestingly enough if I send the message like this with no xml tags I get a SUCCESS

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:aims="http://AIMS_TA_OUTBOUND_WS/AIMS_TA_OUTBOUND_WS.wsdl">
<soapenv:Header/>
<soapenv:Body>
<aims:main>
<String_1>test</String_1>
</aims:main>
</soapenv:Body>
</soapenv:Envelope>

If I send this it fails with the stack trace below

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:aims="http://AIMS_TA_OUTBOUND_WS/AIMS_TA_OUTBOUND_WS.wsdl">
<soapenv:Header/>
<soapenv:Body>
<aims:main>
<String_1><test>aaa</test></String_1>
</aims:main>
</soapenv:Body>
</soapenv:Envelope>

but if I wrap the xml in CDATA it returns SUCCESS

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:aims="http://AIMS_TA_OUTBOUND_WS/AIMS_TA_OUTBOUND_WS.wsdl">
<soapenv:Header/>
<soapenv:Body>
<aims:main>
<String_1><![CDATA[<test>aaa</test>]]></String_1>
</aims:main>
</soapenv:Body>
</soapenv:Envelope>

For some reason the weblogic webservice is not able to handle the xml that is coming from the standard web service call from SAP MII

p.s. it looks like weblogic is getting the message because it’s returning a correctly formatted fault message.

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header/>
<env:Body>
<env:Fault>
<faultcode>env:Server</faultcode>
<faultstring>[Server CodecHandler] Failed to decode
-> Failed to decode message</faultstring>
<detail>
<bea_fault:stacktrace xmlns:bea_fault="http://www.bea.com/servers/wls70/webservice/fault/1.0.0">weblogic.wsee.codec.CodecException: Failed to decode message
at weblogic.wsee.codec.soap11.SoapCodec.decode(SoapCodec.java:188)
at weblogic.wsee.ws.dispatch.server.CodecHandler.decode(CodecHandler.java:139)
at weblogic.wsee.ws.dispatch.server.CodecHandler.handleRequest(CodecHandler.java:40)
at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:141)
at weblogic.wsee.ws.dispatch.server.ServerDispatcher.dispatch(ServerDispatcher.java:114)
at weblogic.wsee.ws.WsSkel.invoke(WsSkel.java:80)
at weblogic.wsee.server.servlet.SoapProcessor.handlePost(SoapProcessor.java:66)
at weblogic.wsee.server.servlet.SoapProcessor.process(SoapProcessor.java:44)
at weblogic.wsee.server.servlet.BaseWSServlet$AuthorizedInvoke.run(BaseWSServlet.java:285)
at weblogic.wsee.server.servlet.BaseWSServlet.service(BaseWSServlet.java:169)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3684)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: com.bea.xml.XmlException: javax.xml.stream.XMLStreamException: Unexpected element 'TIMESTAMP' in text content.
at com.bea.staxb.runtime.internal.UnmarshalResult.getStringValue(UnmarshalResult.java:409)
at com.bea.staxb.runtime.internal.StringTypeConverter.getObject(StringTypeConverter.java:26)
at com.bea.staxb.runtime.internal.BaseSimpleTypeConverter.unmarshal(BaseSimpleTypeConverter.java:39)
at com.bea.staxb.runtime.internal.UnmarshalResult.unmarshalBindingType(UnmarshalResult.java:189)
at com.bea.staxb.runtime.internal.UnmarshalResult.unmarshalType(UnmarshalResult.java:227)
at com.bea.staxb.runtime.internal.UnmarshallerImpl.unmarshalType(UnmarshallerImpl.java:127)
at weblogic.wsee.bind.runtime.internal.LiteralDeserializerContext.unmarshalType(LiteralDeserializerContext.java:72)
at weblogic.wsee.bind.runtime.internal.BaseDeserializerContext.internalDeserializeType(BaseDeserializerContext.java:172)
at weblogic.wsee.bind.runtime.internal.BaseDeserializerContext.deserializeType(BaseDeserializerContext.java:86)
at weblogic.wsee.codec.soap11.SoapDecoder.decodePart(SoapDecoder.java:511)
at weblogic.wsee.codec.soap11.SoapDecoder.decodeParams(SoapDecoder.java:287)
at weblogic.wsee.codec.soap11.SoapDecoder.decodeParts(SoapDecoder.java:172)
at weblogic.wsee.codec.soap11.SoapDecoder.decode(SoapDecoder.java:125)
at weblogic.wsee.codec.soap11.SoapCodec.decode(SoapCodec.java:182)
... 26 more
Caused by: javax.xml.stream.XMLStreamException: Unexpected element 'TIMESTAMP' in text content.
at weblogic.xml.dom.DOMStreamReaderExt.fillContents(DOMStreamReaderExt.java:700)
at weblogic.xml.dom.DOMStreamReaderExt.getCurrentPreserveCharSeq(DOMStreamReaderExt.java:598)
at weblogic.xml.dom.DOMStreamReaderExt.getStringValue(DOMStreamReaderExt.java:63)
at com.bea.staxb.runtime.internal.UnmarshalResult.getStringValue(UnmarshalResult.java:407)
... 39 more
Caused by: com.bea.xml.XmlException: javax.xml.stream.XMLStreamException: Unexpected element 'TIMESTAMP' in text content.
at com.bea.staxb.runtime.internal.UnmarshalResult.getStringValue(UnmarshalResult.java:409)
at com.bea.staxb.runtime.internal.StringTypeConverter.getObject(StringTypeConverter.java:26)
at com.bea.staxb.runtime.internal.BaseSimpleTypeConverter.unmarshal(BaseSimpleTypeConverter.java:39)
at com.bea.staxb.runtime.internal.UnmarshalResult.unmarshalBindingType(UnmarshalResult.java:189)
at com.bea.staxb.runtime.internal.UnmarshalResult.unmarshalType(UnmarshalResult.java:227)
at com.bea.staxb.runtime.internal.UnmarshallerImpl.unmarshalType(UnmarshallerImpl.java:127)
at weblogic.wsee.bind.runtime.internal.LiteralDeserializerContext.unmarshalType(LiteralDeserializerContext.java:72)
at weblogic.wsee.bind.runtime.internal.BaseDeserializerContext.internalDeserializeType(BaseDeserializerContext.java:172)
at weblogic.wsee.bind.runtime.internal.BaseDeserializerContext.deserializeType(BaseDeserializerContext.java:86)
at weblogic.wsee.codec.soap11.SoapDecoder.decodePart(SoapDecoder.java:511)
at weblogic.wsee.codec.soap11.SoapDecoder.decodeParams(SoapDecoder.java:287)
at weblogic.wsee.codec.soap11.SoapDecoder.decodeParts(SoapDecoder.java:172)
at weblogic.wsee.codec.soap11.SoapDecoder.decode(SoapDecoder.java:125)
at weblogic.wsee.codec.soap11.SoapCodec.decode(SoapCodec.java:182)
at weblogic.wsee.ws.dispatch.server.CodecHandler.decode(CodecHandler.java:139)
at weblogic.wsee.ws.dispatch.server.CodecHandler.handleRequest(CodecHandler.java:40)
at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:141)
at weblogic.wsee.ws.dispatch.server.ServerDispatcher.dispatch(ServerDispatcher.java:114)
at weblogic.wsee.ws.WsSkel.invoke(WsSkel.java:80)
at weblogic.wsee.server.servlet.SoapProcessor.handlePost(SoapProcessor.java:66)
at weblogic.wsee.server.servlet.SoapProcessor.process(SoapProcessor.java:44)
at weblogic.wsee.server.servlet.BaseWSServlet$AuthorizedInvoke.run(BaseWSServlet.java:285)
at weblogic.wsee.server.servlet.BaseWSServlet.service(BaseWSServlet.java:169)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3684)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: javax.xml.stream.XMLStreamException: Unexpected element 'TIMESTAMP' in text content.
at weblogic.xml.dom.DOMStreamReaderExt.fillContents(DOMStreamReaderExt.java:700)
at weblogic.xml.dom.DOMStreamReaderExt.getCurrentPreserveCharSeq(DOMStreamReaderExt.java:598)
at weblogic.xml.dom.DOMStreamReaderExt.getStringValue(DOMStreamReaderExt.java:63)
at com.bea.staxb.runtime.internal.UnmarshalResult.getStringValue(UnmarshalResult.java:407)
... 39 more
Caused by: javax.xml.stream.XMLStreamException: Unexpected element 'TIMESTAMP' in text content.
at weblogic.xml.dom.DOMStreamReaderExt.fillContents(DOMStreamReaderExt.java:700)
at weblogic.xml.dom.DOMStreamReaderExt.getCurrentPreserveCharSeq(DOMStreamReaderExt.java:598)
at weblogic.xml.dom.DOMStreamReaderExt.getStringValue(DOMStreamReaderExt.java:63)
at com.bea.staxb.runtime.internal.UnmarshalResult.getStringValue(UnmarshalResult.java:407)
at com.bea.staxb.runtime.internal.StringTypeConverter.getObject(StringTypeConverter.java:26)
at com.bea.staxb.runtime.internal.BaseSimpleTypeConverter.unmarshal(BaseSimpleTypeConverter.java:39)
at com.bea.staxb.runtime.internal.UnmarshalResult.unmarshalBindingType(UnmarshalResult.java:189)
at com.bea.staxb.runtime.internal.UnmarshalResult.unmarshalType(UnmarshalResult.java:227)
at com.bea.staxb.runtime.internal.UnmarshallerImpl.unmarshalType(UnmarshallerImpl.java:127)
at weblogic.wsee.bind.runtime.internal.LiteralDeserializerContext.unmarshalType(LiteralDeserializerContext.java:72)
at weblogic.wsee.bind.runtime.internal.BaseDeserializerContext.internalDeserializeType(BaseDeserializerContext.java:172)
at weblogic.wsee.bind.runtime.internal.BaseDeserializerContext.deserializeType(BaseDeserializerContext.java:86)
at weblogic.wsee.codec.soap11.SoapDecoder.decodePart(SoapDecoder.java:511)
at weblogic.wsee.codec.soap11.SoapDecoder.decodeParams(SoapDecoder.java:287)
at weblogic.wsee.codec.soap11.SoapDecoder.decodeParts(SoapDecoder.java:172)
at weblogic.wsee.codec.soap11.SoapDecoder.decode(SoapDecoder.java:125)
at weblogic.wsee.codec.soap11.SoapCodec.decode(SoapCodec.java:182)
at weblogic.wsee.ws.dispatch.server.CodecHandler.decode(CodecHandler.java:139)
at weblogic.wsee.ws.dispatch.server.CodecHandler.handleRequest(CodecHandler.java:40)
at weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:141)
at weblogic.wsee.ws.dispatch.server.ServerDispatcher.dispatch(ServerDispatcher.java:114)
at weblogic.wsee.ws.WsSkel.invoke(WsSkel.java:80)
at weblogic.wsee.server.servlet.SoapProcessor.handlePost(SoapProcessor.java:66)
at weblogic.wsee.server.servlet.SoapProcessor.process(SoapProcessor.java:44)
at weblogic.wsee.server.servlet.BaseWSServlet$AuthorizedInvoke.run(BaseWSServlet.java:285)
at weblogic.wsee.server.servlet.BaseWSServlet.service(BaseWSServlet.java:169)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3684)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)</bea_fault:stacktrace>
</detail>
</env:Fault>
</env:Body>
</env:Envelope>

 
German Gonzalez-Morris
Ranch Hand
Posts: 265
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Using CDATA is the correct way to handle embedded XML data in the payload.

Anyway, you can use javax.xml.soap.SOAPElement as endpoint's argument to retrieve the XML as payload:

http://devwebcl.blogspot.com/2012/08/how-to-retrieve-xml-sent-into-soap.html

Regards,

Germán
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic