You need to sign in to do that
Don't have an account?
eyewell
How to work with a WSDL that returns an array of anyType
Hello,
I need to figure out how to adjust my wsdl2apex generated class, or my apex code, so that I can interact with a web service that returns an array of anyType objects.
The wsdl2apex converter didn't like the occurrence of anyType, as a type in the WSDL file. So just to get the WSDL imported, I changed xnyType to "XAnyType", which allowed me to proceed with the import and generate the class.
No when I try to access that webservice, I get an error message that says the following
Here is the relevant parts of the WSDL for the web services response:
I imagine I can create a new class in my Apex Classes so i can handle anyType records...
Can anyone point me in the right direction?
Thanks!
Erik
I need to figure out how to adjust my wsdl2apex generated class, or my apex code, so that I can interact with a web service that returns an array of anyType objects.
The wsdl2apex converter didn't like the occurrence of anyType, as a type in the WSDL file. So just to get the WSDL imported, I changed xnyType to "XAnyType", which allowed me to proceed with the import and generate the class.
No when I try to access that webservice, I get an error message that says the following
Code:
20081007014451.061:Class.EDY2007.GetCompanyDetails_Controller.getAccountDetail:
line 57, column 13: **getAccountDetail(): GetCompanyInfo() Failed:
System.CalloutException: Web service callout failed: Unable to parse callout
response. Apex type not found for element
http://<URL deleted>/.../Company/GetCompanyInfo=anyType
Here is the relevant parts of the WSDL for the web services response:
Code:
...
<s:complexType name="ArrayOfAnyType">
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded" name="anyType" nillable="true"/>
</s:sequence>
</s:complexType>
...
<s:element name="GetCompanyInfoResponse">
<s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="GetCompanyInfoResult"
type="tns:ArrayOfAnyType"/>
</s:sequence>
</s:complexType>
</s:element>
...
<wsdl:message name="GetCompanyInfoSoapOut">
<wsdl:part name="parameters" element="tns:GetCompanyInfoResponse"/>
</wsdl:message>
...
<wsdl:portType name="GetCompanyInfoSoap">
<wsdl:operation name="GetCompanyInfo">
<wsdl:input message="tns:GetCompanyInfoSoapIn"/>
<wsdl:output message="tns:GetCompanyInfoSoapOut"/>
</wsdl:operation>
</wsdl:portType>
I imagine I can create a new class in my Apex Classes so i can handle anyType records...
Can anyone point me in the right direction?
Thanks!
Erik