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
Alok_NagarroAlok_Nagarro 

System.CalloutException: Web service callout failed: Unable to parse callout response

Hi,

 

I am making a callout to external webservice and getting following exception.

 

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

 

I guess i am able to make callout and also getting response but salesforce not able to parse response.

Please help and tell me where is the problem or am i misiing something..?

 

 

SaxonSaxon

Hi Alok,

 

Could you post your code so that I can have a look?

 

Regards,

Saxon.

Alok_NagarroAlok_Nagarro

Hi Saxon,

 

Thanks for quick reply. I am not able to post all code since it's exceeding max char limit.

So am posting  class that making callout.

 

 

 Class that makes callout:

 

public class TestWebServiceCallout
{
 
 @Future(callout=true)
 public Static void TestMethodWebServiceCallout()
 {
     NewqqouteLifelinkcorpComOpenflexservice.OpenFlexSoap tempSer=new NewqqouteLifelinkcorpComOpenflexservice.OpenFlexSoap();
     
     String temp='<?xml version="1.0" encoding="UTF-8" standalone="yes"?><!DOCTYPE ProposalInfoIN>'+
     '<ProposalInfoIN> <Clients> <Client> <Company> <Code>WCL</Code></Company>'+
     '<Product><Code>WCLULXM</Code></Product>'+
     '<Keyword/><Keyword id="Insured.Sex" type="normal"><Answer>M</Answer></Keyword>'+
     '<Keyword id="Insured.Age" type="normal"><Answer>25</Answer></Keyword>'+
     '<Keyword id="Insured.State" type="normal"><Answer>VA</Answer></Keyword>'+
     '<Keyword id="Insured.Class" type="normal"><Answer>QN</Answer></Keyword>'+
     '<Keyword id="FCOL.LengthGuar" type="normal"><Answer>C40</Answer></Keyword>'+
     '<Keyword id="FCOL.LengthGuar2" type="normal"><Answer>C105</Answer></Keyword>'+
     '<Keyword id="FCOL.LengthGuar3" type="normal"><Answer>C121</Answer></Keyword>'+
     '<Keyword id="Policy.FaceAmount" type="Yearly"><Yearly><Start>1</Start><End>99</End><Answer>5645445</Answer></Yearly></Keyword>'+
     '<Keyword id="Policy.PremiumMode" type="normal"><Answer>A</Answer></Keyword>'+
     '<Keyword id="FCOL.RunComparisons" type="normal"><Answer>Y</Answer></Keyword>'+
     '<Keyword id="PolicyRiders" type="normal"><Answer>N</Answer></Keyword>'+
     '<Keyword id="FCOL.PrintOpts" type="normal"><Answer>C</Answer></Keyword>'+
     '</Client></Clients></ProposalInfoIN>';
     
     NewqqouteLifelinkcorpComOpenflexservice.quoteResult_element qe=tempSer.quote(temp);
     system.debug('Result 4 -------> '+qe);
 }
}

 

 

 

SaxonSaxon

Hi Alok,

 

Well I see your xml string is ok,

Could you send me your wsdl generated class their modification needs to be done.

 

Regards,

Saxon.

Alok_NagarroAlok_Nagarro

Hi,

 

Could you please give me your email id ? So i can send to that, as max char limit is exceeding if i post here.

SaxonSaxon

Hi,

 

You can reach me at saxoncloud@gmail.com.

 

Regards,

Saxon.

Alok_NagarroAlok_Nagarro

Hi Saxon,

 

Just want to be confirm, have u got the mail ?

NebexForceNebexForce

Would you please post your solution to this? Thank you!

Starz26Starz26

It sounds like you are getting a TYPE in the response that is not represented in APEX.

 

https://na2.salesforce.com/help/doc/en/faq_apex_callout_validation.htm

 

The following  link lists what types are supported.

 

http://www.salesforce.com/us/developer/docs/apexcode/index_Left.htm#StartTopic=Content/apex_callouts_wsdl2apex.htm