PQ91357: Web service with DII call creates a message with namespace of ""

 Fixes are available

5.1.1.8: WebSphere Application Server 5.1.1 Cumulative Fix 8 for AIX
5.1.1.8: WebSphere Application Server 5.1.1 Cumulative Fix 8 for Windows
5.1.1.8: WebSphere Application Server 5.1.1 Cumulative Fix 8 for HP-UX
5.1.1.8: WebSphere Application Server 5.1.1 Cumulative Fix 8 for Solaris
5.1.1.6: WebSphere Application Server Version 5.1.1 Cumulative Fix 6
5.1.1.7: WebSphere Application Server Version 5.1.1 Cumulative Fix 7
5.1.1.4: WebSphere Application Server Version 5.1.1 Cumulative Fix 4
5.1.1.8: WebSphere Application Server 5.1.1 Cumulative Fix 8 for Linux



APAR status
Closed as program error.

Error description
Namespace is empty when using a DII call object to invoke a
web service.

For example, see the following code snippet to
instantiate a DII call object and invoke a simple
web service that takes in a string and returns a string:

================================================================

ServiceFactory sf = ServiceFactory.newInstance();

Service service = sf.createService(new QName(m_serviceNamespace,
                                             m_serviceName));
Call m_call = service.createCall();

System.out.println("isParameterAndReturnSpecRequired: " +
              m_call.isParameterAndReturnSpecRequired(new QName
                     (m_serviceNamespace, m_operation)));

m_call.addParameter("callTXLifeRequest", new
QName(m_dataNamespace,"callTXLifeRequest"), ParameterMode.IN);

m_call.setOperationName(new
QName(m_serviceNamespace,m_operation));

m_call.setProperty("javax.xml.rpc.soap.operation.style",
"document");


m_call.setProperty("javax.xml.rpc.encodingstyle.namespace.uri",
"");

m_call.setReturnType(new QName(m_dataNamespace,
"callTXLifeResponse"),java.lang.String.class);

m_call.setTargetEndpointAddress(m_serviceUrl);

String[] params = {inputDoc};

String response = "";

response = (String)m_call.invoke(params);

System.out.println(response);

================================================================

The callTXLifeRequest element looks like in the
request:

<callTXLifeRequest xsi:type="xsd:string" xmlns="">

A tcpmon trace shows that the message created by the IBM
implementation has a namespace "" for the callTXLifeRequest
element.
Local fix
Workaround:
==========

This problem can be circumvented by using WebSphere supplied
tooling to generate the WSDL file.

Use the Java2WSDL tool to generate the WSDL file.

You should then be able to invoke the service via DII with a
normal client.

For documentation on WebSphere's tooling (java2WSDL and
WSDL2Java commands) see the link below:
commands) see the link below:


http://publib.boulder.ibm.com/infocenter/ws51help/topic/com.ibm.
websphere.nd.doc/info/ae/ae/rwbs_map.html
Problem summary
****************************************************************
* USERS AFFECTED: Anyone using the setProperty method          *
*                 available on the javax.xml.rpc.Call object.  *
****************************************************************
* PROBLEM DESCRIPTION: When a user set the standard property:  *
*                      javax.xml.rpc.soap.operation.style to   *
*                      "document", the appropriate style       *
*                      and use was not propagated to the       *
*                      MessageContext.                         *
****************************************************************
* RECOMMENDATION:                                              *
****************************************************************
The setProperty method was missing a set in the propagation of
the specific property for the operation style.
Problem conclusion
A fix was made to the logic in the javax.xml.rpc.Call class
that sets the operation style on the internal operation
itself.
Temporary fix Comments
APAR information
APAR number PQ91357
Reported component name WAS BASE 5.0
Reported component ID 5630A3600
Reported release 00W
Status CLOSED PER
PE NoPE
HIPER NoHIPER
Special Attention NoSpecatt
Submitted date 2004-07-13
Closed date 2004-10-07
Last modified date 2004-10-07

APAR is sysrouted FROM one or more of the following:

APAR is sysrouted TO one or more of the following:

Modules/Macros
WEBSVCS          

Publications Referenced

Fix information

Applicable component levels
R003 PSY    UP
R00A PSY    UP
R00H PSY    UP
R00I PSY    UP
R00P PSY    UP
R00S PSY    UP
R00W PSY    UP
R103 PSY    UP
R10A PSY    UP
R10H PSY    UP
R10I PSY    UP
R10P PSY    UP
R10S PSY    UP
R10W PSY    UP


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > General
Operating system(s):
Software version: 00W
Software edition:
Reference #: PQ91357
IBM Group: Software Group
Modified date: Oct 7, 2004