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
venkatSanthanamvenkatSanthanam 

WebService CallOut Exception

Hi Guyz,

 

I have a WSDL and generated Apex code from it. Actually, WSDL2Apex itself took a long time as I had to remove Soap12 information, multiple binding, multiple port, etc.But, I have the Apex codegenerated succesfully.

 

Now the problem is, when I make a call to the Service, I find the following in the debug log. Please help me get past this issue.

 

System.CalloutException: Web service callout failed: Unable to parse callout response. Apex type not found for element FacilityResults

 

Thanks

Venkat

 

Richie DRichie D

Hi,

 

Firstly have a look in your generated apex code to see if a class and/or methods exist for the type FacilityResults. If it doesn't then thats your problem - you may have taken out too much WSDL information. If SF doesn't know what a FacilityResults object looks like then it can't do anything with it.

 

If it is there then compare it to any other method calls and types that do work( or compare with tutorial examples) to see if there are any major differences.

 

Good luck!

R. 

 

venkatSanthanamvenkatSanthanam

The WSDL has response defined as

<s:complexType mixed="true">
                      <s:sequence>
                        <s:any />
                      </s:sequence>
                    </s:complexType>

 

Salesforce does not support s:any I suppose.

The response I get back from the service is an xml. Can anyone tell me how I ca handle a xml file in place of s:any ?

 

Thanks

Venkat