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
ChunWuChunWu 

"Unable to parse callout response" error

Got the following error when invoking a web service callout by using the generated apex code from wsdl (wsdl2apex)

 

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

It seems that the generated code does not recognize the element <Client> in the response message. In the wsdl file there is no specific definition for this <Client> element. Instead, the schema defines a complex type containing the <any> element which is the XML representation for a wildcard schema component. So the response can have any arbitrary tags. But in the generated Apex class, it even has no corresponding field for the content starting from <Client> element (The ‘any' part). It seems that the wsdl2apex cannot handle this <any> element properly.

 

Has anyone come across the same issue? Any suggestions to work this around?

Thanks.

 

ChunWuChunWu

Any idea on how wsdl2apex handles the <any> element in the XML schema?