02-26-2016 04:27 AM
Hello,
I have created a Web Service element, successfully loaded a WSDL and configured the request and response. When I run the application
the Web Service call reaches the web server, is correctly processed and the web server responds. The Web Service element always
exits on the Java Exception-error path. I have selected the Store Full Response XML check box and I can see the returned XML, which
is what the server sends back. The Web Service does not parse the returned XML into the configured variables.
Here is the response format I see when clicking the Response: Configure button:
Here is the XML response:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header/>
<soapenv:Body>
<p654:vxmlResponse xmlns:p654="http://queryAccountBasicInfoInitialLookup.services.odcic.ibm.com/QueryAccountBasicInfoInitialLookupService/">
<ServletCallResponseMessage>success</ServletCallResponseMessage>
<ServletResponse><?xml version='1.0'?>
<AccountBasicInfoInitialLookup>
<accountValue>000</accountValue>
<activeSubsCount>1</activeSubsCount>
</AccountBasicInfoInitialLookup>
</ServletResponse>
<Transaction>
<BeginTimestamp>2016-02-25-15.18.13.000884</BeginTimestamp>
<EndTimestamp>2016-02-25-15.18.14.000529</EndTimestamp>
</Transaction>
</p654:vxmlResponse>
</soapenv:Body>
</soapenv:Envelope>
The response XML format looks correct, my assumption is that the problem is caused by the namespace value (p654:) on the vxmlResponse element. The WSDL that was loaded into the Web Service element is:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://queryAccountBasicInfoInitialLookup.services.odcic.ibm.com/QueryAccountBasicInfoInitialLookupService/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="QueryAccountBasicInfoInitialLookupService" targetNamespace="http://queryAccountBasicInfoInitialLookup.services.odcic.ibm.com/QueryAccountBasicInfoInitialLookupService/">
<wsdl:types>
<xsd:schema targetNamespace="http://queryAccountBasicInfoInitialLookup.services.odcic.ibm.com/QueryAccountBasicInfoInitialLookupService/">
<xsd:element name="vxmlResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ServletCallResponseMessage" type="xsd:string"/>
<xsd:element name="ServletResponse" type="xsd:string"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="Transaction">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="BeginTimestamp" type="xsd:string"/>
<xsd:element name="EndTimestamp" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="QueryAccountBasicInfoInitialLookupRequest">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ApplId" type="xsd:string"/>
<xsd:element name="CallId" type="xsd:string"/>
<xsd:element minOccurs="0" name="ban">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="9"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element minOccurs="0" name="ptn">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="10"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element minOccurs="0" name="TIMEOUT">
<xsd:simpleType>
<xsd:restriction base="xsd:integer">
<xsd:minInclusive value="0"/>
<xsd:maxInclusive value="300"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</wsdl:types>
<wsdl:message name="QueryAccountBasicInfoInitialLookupRequest">
<wsdl:part element="tns:QueryAccountBasicInfoInitialLookupRequest" name="QueryAccountBasicInfoInitialLookupRequest"/>
</wsdl:message>
<wsdl:message name="vxmlResponse">
<wsdl:part element="tns:vxmlResponse" name="vxmlResponse"/>
</wsdl:message>
<wsdl:portType name="QueryAccountBasicInfoInitialLookupService">
<wsdl:operation name="QueryAccountBasicInfoInitialLookup">
<wsdl:input message="tns:QueryAccountBasicInfoInitialLookupRequest"/>
<wsdl:output message="tns:vxmlResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="QueryAccountBasicInfoInitialLookupServiceSOAP" type="tns:QueryAccountBasicInfoInitialLookupService">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="QueryAccountBasicInfoInitialLookup">
<soap:operation soapAction="http://queryAccountBasicInfoInitialLookup.services.odcic.ibm.com/QueryAccountBasicInfoInitialLookupService/QueryAccountBasicInfoInitialLookup"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="QueryAccountBasicInfoInitialLookupService">
<wsdl:port binding="tns:QueryAccountBasicInfoInitialLookupServiceSOAP" name="QueryAccountBasicInfoInitialLookupServiceSOAP">
<soap:address location="http://localhost:8080/XXXX/services/QueryAccountBasicInfoInitialLookupServiceSOAP"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Is there a problem with the Web Service processing of the XML response, or could it be something in the WSDL and are there any suggestions as to how we can get around the issue?
Thank you!
Michael Beers
Solved! Go to Solution.
03-15-2016 10:20 AM
Could you mention the exact error message?
Sometimes, the XML might need to be parsed. For example, ! and ? are often not allowed by some standard parsers. So they need to be removed, before you process the XML.
02-26-2016 10:19 AM
I pointed the Web Service element at another web server that is running the web service from a re-generated framework using the same WSDL as above. The response xml from that no longer has the namespace value in it, but it still fails the same way.
Here is the latest response_xml:
<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:Header/>
<soapenv:Body>
<vxmlResponse xmlns="http://queryAccountBasicInfoInitialLookup.services.odcic.ibm.com/QueryAccountBasicInfoInitialLookupService/">
<ServletCallResponseMessage xmlns="">failure</ServletCallResponseMessage>
<ServletResponse xmlns=""><?xml version='1.0'?>
<FaultInfo>
<faultCode>701</faultCode>
<faultString>The Nextel Hub was unable to locate a record for the
given input.</faultString>
</FaultInfo>
</ServletResponse>
<Transaction xmlns="">
<BeginTimestamp>2016-02-26-11.38.37.000209</BeginTimestamp>
<EndTimestamp>2016-02-26-11.38.37.000470</EndTimestamp>
</Transaction>
</vxmlResponse>
</soapenv:Body>
</soapenv:Envelope>
Again, none of the specific variables are set when the failure path is taken, only the complete response_xml has
data, so it looks like its failing attempting to unmarshall the XML to java.
Regards,
Michael Beers
03-15-2016 10:20 AM
Could you mention the exact error message?
Sometimes, the XML might need to be parsed. For example, ! and ? are often not allowed by some standard parsers. So they need to be removed, before you process the XML.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide