WLS 10.3.3 - Client got null values from the response (Doc ID 1309418.1)

Last updated on JUNE 09, 2016

Applies to:

Oracle Weblogic Server - Version: 10.3.3 to 10.3.3
Information in this document applies to any platform.

Goal


In WLS 10.3.3- User-defined types are NOT parsed correctly in JAX-RPC web services using the RPC/ENCODED SOAPBinding.

The web service client code generates requests that do not include the java: namespace, so user-defined types are not parsed correctly.


In the attached test case- you will find a JAX-RPC webservice using the RPC/Encoded SOAP Binding.

Deploy drewservice.ear using the weblogic console.

Then check for Service Request and Service Response for ComplexRPCImpl web service entry.

Below is the output  of a RPC/ENCODED SOAP Request generated in WLS 10.3.3


Service Request
-----
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<target:echoComplexType xmlns:target="http://example.org">
<struct xmlns:java="java:examples.webservices.complex"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="java:BasicStruct">
<IntValue>3</IntValue>
<StringValue>string</StringValue>
<!--Zero or more repetitions:-->
<StringArray>string</StringArray>
</struct>
</target:echoComplexType>
</soapenv:Body>
</soapenv:Envelope>
-----

Service Response to above request is as below

-----
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<env:Header />
<env:Body>
<m:echoComplexTypeResponse xmlns:m="http://example.org">
<EchoStructReturnMessage>
<java:IntValue xmlns:java="java:examples.webservices.complex">0</java:IntValue>
<java:StringValue xmlns:java="java:examples.webservices.complex" xsi:nil="true" />
</EchoStructReturnMessage>
</m:echoComplexTypeResponse>
</env:Body>
</env:Envelope>
-----

The expected result would be to have the StringValue in the response
equal to 'string' and the intValue equal to 3.All the values in the client code comes as null.

Modifying the request to include the java: namespace in front of each of the values causes the proper response to be generated.[i.e <java:IntValue>3</IntValue>]


Solution

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