function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
BBeairdBBeaird 

SOAP Issues: Unable to parse callout response. Apex type not found for element

We are trying to set up integration with an external webservice.  We seem to be getting pretty close, but it looks like something is still off in our WSDL.  When I try to do the callout, I get this:

 

FATAL_ERROR|System.CalloutException: Web service callout failed: Unable to parse callout response. Apex type not found for element http://ILRequestService/ILRequestServiceResponse=ILRequest

 

I suspect it has to do with the 4th line of the response.  It's like the APEX parsing doesn't know what to do with that line.  Seems like it might be namespace-related, but I don't know what to change.  I've tried messing around with the WSDL to make elements "qualified" instead of "unqualified", but that did not seem to help.  If anyone could give some insight on this, it would be much appreciated.

 

The actual method I'm using is getILRequestObject.

 

Below is the relevant info:

 

XML Request

<?xml version="1.0" encoding="UTF-8"?>
<ILRequest sourceEnvironment="UAT" sourceSystem="AE">
<parameters>
<dataSet>US</dataSet>
<methods>
<method>amort</method>
</methods>
<requests type="contract">
<key>001-0580963-000</key>
</requests>
</parameters>
</ILRequest>


 

XML Response

<?xml version="1.0" encoding="UTF-8" ?>
 <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
 <soapenv:Body>
 <se:getILRequestObjectResponse xmlns:re="http://ILRequestService/ILRequestServiceResponse" xmlns:se="http://ILRequestService/ILRequestService">
 <re:ILRequest sourceEnvironment="AE" sourceSystem="UAT">
 <parameters>
<dataSet>US</dataSet>
<ApplicationName />
<companyCode />
<financeType />
</parameters>
 <requests>
 <key id="12345" type="contact">
 <amort currency="" id="123456" interestRate="5.090062">
 <amortDetail cnt="1">
<paymentAmt>0.00</paymentAmt>
<principalAmt>-99.99</principalAmt>
<interestAmt>99.99</interestAmt>
<balanceAmt>12345.00</balanceAmt>
<dueDate>12/29/2009</dueDate>
<paymentNum>0</paymentNum>
<vatAmt>0.00</vatAmt>
<miscAmt>0.00</miscAmt>
<bookedInterest>0.00</bookedInterest>
<totPayAmt>0.00</totPayAmt>
<specialMiscAmt>0.00</specialMiscAmt>
<specialVatAmt>0.00</specialVatAmt>
<rentAmt>0.00</rentAmt>
</amortDetail>
</amort>
</key>
</requests>
</re:ILRequest>
</se:getILRequestObjectResponse>
</soapenv:Body>
</soapenv:Envelope>



 

 

WSDL

 

<?xml version="1.0" encoding="UTF-8"?><wsdl:definitions name="ILRequestService" targetNamespace="http://ILRequestService/ILRequestService" xmlns:bons1="http://ILRequestService/ILRequestServiceRequest" xmlns:bons2="http://ILRequestService/ILRequestServiceResponse" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://ILRequestService/ILRequestService" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<xsd:schema targetNamespace="http://ILRequestService/ILRequestService">
<xsd:import namespace="http://ILRequestService/ILRequestServiceResponse"/>
<xsd:import namespace="http://ILRequestService/ILRequestServiceRequest"/>
<xsd:element name="getILRequest">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="request" nillable="true" type="xsd:string"/>
<xsd:element name="source" nillable="true" type="xsd:string"/>
<xsd:element name="country" nillable="true" type="xsd:string"/>
<xsd:element name="currency" nillable="true" type="xsd:string"/>
<xsd:element name="method" nillable="true" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="getILRequestResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="response" nillable="true" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="getILRequestObject">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="bons1:ILRequest"/>
<xsd:element name="country" nillable="true" type="xsd:string"/>
<xsd:element name="currency" nillable="true" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="getILRequestObjectResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="bons2:ILRequest"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://ILRequestService/ILRequestServiceResponse" xmlns="http://ILRequestService/ILRequestServiceResponse" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType name="keyType">
<xs:sequence>
<xs:element minOccurs="0" name="amort" type="amortType"/>
<xs:element minOccurs="0" name="contract" type="contractType"/>
</xs:sequence>
<xs:attribute name="type" type="xs:string"/>
<xs:attribute name="id" type="xs:string"/>
</xs:complexType>
<xs:element name="ILRequest" type="ILRequest"/>
<xs:complexType name="methodsType">
<xs:sequence>
<xs:element maxOccurs="unbounded" name="method" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="errorMessagesType">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="ErrorMessage" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="contractType">
<xs:sequence>
<xs:element name="customerName" type="xs:string"/>
<xs:element name="invDeliveryFlag" type="xs:string"/>
<xs:element name="ddFlag" type="xs:string"/>
</xs:sequence>
<xs:attribute name="id" type="xs:string"/>
</xs:complexType>
<xs:complexType name="ILRequest">
<xs:sequence>
<xs:element name="parameters" type="parametersType"/>
<xs:element name="requests" type="requestsType"/>
<xs:element name="Error" type="errorType"/>
</xs:sequence>
<xs:attribute name="sourceSystem" type="xs:string"/>
<xs:attribute name="sourceEnvironment" type="xs:string"/>
</xs:complexType>
<xs:complexType name="requestsType">
<xs:sequence>
<xs:element name="key" type="keyType"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="amortDetailType">
<xs:sequence>
<xs:element name="paymentAmt" type="xs:string"/>
<xs:element name="principalAmt" type="xs:string"/>
<xs:element name="interestAmt" type="xs:string"/>
<xs:element name="balanceAmt" type="xs:string"/>
<xs:element name="dueDate" type="xs:string"/>
<xs:element name="paymentNum" type="xs:string"/>
<xs:element name="vatAmt" type="xs:string"/>
<xs:element name="miscAmt" type="xs:string"/>
<xs:element name="bookedInterest" type="xs:string"/>
<xs:element name="totPayAmt" type="xs:string"/>
<xs:element name="specialMiscAmt" type="xs:string"/>
<xs:element name="specialVatAmt" type="xs:string"/>
<xs:element name="rentAmt" type="xs:string"/>
</xs:sequence>
<xs:attribute name="cnt" type="xs:string"/>
</xs:complexType>
<xs:complexType name="parametersType">
<xs:sequence>
<xs:element minOccurs="0" name="dataSet" type="xs:string"/>
<xs:element minOccurs="0" name="methods" type="methodsType"/>
<xs:element minOccurs="0" name="ApplicationName" type="xs:string"/>
<xs:element minOccurs="0" name="companyCode" type="xs:string"/>
<xs:element minOccurs="0" name="financeType" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="errorType">
<xs:sequence>
<xs:element minOccurs="0" name="ErrorCode" type="xs:string"/>
<xs:element minOccurs="0" name="ErrorMessages" type="errorMessagesType"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="amortType">
<xs:sequence>
<xs:element maxOccurs="unbounded" name="amortDetail" type="amortDetailType"/>
</xs:sequence>
<xs:attribute name="id" type="xs:string"/>
<xs:attribute name="interestRate" type="xs:string"/>
<xs:attribute name="currency" type="xs:string"/>
</xs:complexType>
</xs:schema>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://ILRequestService/ILRequestServiceRequest" xmlns="http://ILRequestService/ILRequestServiceRequest" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType name="methodsType">
<xs:sequence>
<xs:element maxOccurs="unbounded" name="method" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="requestsType">
<xs:sequence>
<xs:element maxOccurs="unbounded" name="key" type="xs:string"/>
</xs:sequence>
<xs:attribute name="type" type="xs:string"/>
</xs:complexType>
<xs:element name="ILRequest">
<xs:complexType>
<xs:sequence>
<xs:element name="parameters" type="parametersType"/>
</xs:sequence>
<xs:attribute name="sourceSystem" type="xs:string"/>
<xs:attribute name="sourceEnvironment" type="xs:string"/>
</xs:complexType>
</xs:element>
<xs:complexType name="parametersType">
<xs:sequence>

<xs:element minOccurs="0" name="dataSet" type="xs:string"/>
<xs:element minOccurs="0" name="methods" type="methodsType"/>
<xs:element name="requests" type="requestsType"/>
<xs:element minOccurs="0" name="ApplicationName" type="xs:string"/>
<xs:element minOccurs="0" name="companyCode" type="xs:string"/>
<xs:element minOccurs="0" name="financeType" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
</wsdl:types>
<wsdl:message name="getILRequestRequestMsg">
<wsdl:part element="tns:getILRequest" name="getILRequestParameters"/>
</wsdl:message>
<wsdl:message name="getILRequestResponseMsg">
<wsdl:part element="tns:getILRequestResponse" name="getILRequestResult"/>
</wsdl:message>
<wsdl:message name="getILRequestObjectRequestMsg">
<wsdl:part element="tns:getILRequestObject" name="getILRequestObjectParameters"/>
</wsdl:message>
<wsdl:message name="getILRequestObjectResponseMsg">
<wsdl:part element="tns:getILRequestObjectResponse" name="getILRequestObjectResult"/>
</wsdl:message>
<wsdl:portType name="ILRequestService">
<wsdl:operation name="getILRequest">
<wsdl:input message="tns:getILRequestRequestMsg" name="getILRequestRequest"/>
<wsdl:output message="tns:getILRequestResponseMsg" name="getILRequestResponse"/>
</wsdl:operation>
<wsdl:operation name="getILRequestObject">
<wsdl:input message="tns:getILRequestObjectRequestMsg" name="getILRequestObjectRequest"/>
<wsdl:output message="tns:getILRequestObjectResponseMsg" name="getILRequestObjectResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="ILRequestServiceExport2_ILRequestServiceHttpBinding" type="tns:ILRequestService">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="getILRequest">
<soap:operation soapAction=""/>
<wsdl:input name="getILRequestRequest">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="getILRequestResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getILRequestObject">
<soap:operation soapAction=""/>
<wsdl:input name="getILRequestObjectRequest">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="getILRequestObjectResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="ILRequestServiceExport2_ILRequestServiceHttpService">
<wsdl:port binding="tns:ILRequestServiceExport2_ILRequestServiceHttpBinding" name="ILRequestServiceExport_ILRequestServiceHttpPort">
<soap:address location="**endpoint**"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>