InvocationException:Failed To Decode When Invoking a WebService (Doc ID 1298585.1)

Last updated on JUNE 09, 2016

Applies to:

Oracle WebLogic Server - Version 10.3.3 and later
Information in this document applies to any platform.

Symptoms

When invoking a webservice using external client which is migrated from wls 10.30 to 10.3.3 it is failing to decode soap message.


For Eg:
====
Let assume we have wsdl file which has the following element

<xs:element name="Sample">
<xs:complexType>
<xs:sequence>
<xs:element name="userId" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>

When generating the request, instead if sending userId it is sending with a different attribute name

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ns1:Sample soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://sample/ns">
<ns1:arg0 xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">XXXX</ns1:arg0>
</ns1:Sample></soapenv:Body></soapenv:Envelope>

This is failing with below exception

weblogic.wsee.handler.InvocationException: [Server CodecHandler] Failed to decode
at weblogic.wsee.ws.dispatch.server.CodecHandler.decode(CodecHandler.java:143)
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:118)
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:45)
at weblogic.wsee.server.servlet.BaseWSServlet$AuthorizedInvoke.run(BaseWSServlet.java:286)
at weblogic.wsee.server.servlet.BaseWSServlet.service(BaseWSServlet.java:169)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:821)
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.ServletStubImpl.execute(ServletStubImpl.java:184)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3686)
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: weblogic.wsee.codec.CodecException: Unable to find xml element for parameter: userId
at weblogic.wsee.codec.soap11.SoapDecoder.checkNullElement(SoapDecoder.java:397)
at weblogic.wsee.codec.soap11.SoapDecoder.decodeParams(SoapDecoder.java:285)
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)

Changes

The same web service client is working fine on 10.3.0

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms