PQ91357: Web service with DII call creates a message with namespace of "" | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() 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.htmlProblem 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 is sysrouted FROM one or more of the following: APAR is sysrouted TO one or more of the following: Modules/Macros
Publications Referenced
|
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
(C) Copyright IBM Corporation 2000, 2008. All Rights Reserved.