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
Karthik11Karthik11 

Null Response from sales force

Hi, I have a scnario where I am trying to push Accounts from a legacy system(Siebel) to Sales force. I have developed a custom web service which would insert and update siebel accounts to salesforce. I generated the wsdl out of it and exposed it to siebel along with the standard enterprise wsdl so, siebel can use the session id generated from salesforce enterprise wsdl to make a call out to my custom webservice. I have also created a response class (the insert and update methods have response class as return type) in my custom web service which would send a response back to siebel with a success or error message.

 

My question is Siebel was successful in hitting sales force and performing insert/update calling my web service. But the response they get when an account is inserted/updated is NULL (the result tag is empty) even though I am sending a string as response.

 

I tried testing this via SOAP UI, the account inserts succesfully but the response says nothing. I know this is a simple one but need help figuring this out. any inputs would be appreciated.  Thank u.

Best Answer chosen by Admin (Salesforce Developers) 
SuperfellSuperfell

Only fields marked as webservice will be serialized into the soap response, so you need to update the class to flag the relevant memebers with the webservice keyword.

All Answers

SuperfellSuperfell

please post the apex method signature of your function, and the capture of the empty response.

Karthik112Karthik112

 

Hi, This is the method signature..
WebService static ResponseClass insertAccount(list<Account_input> input)..
where account_ input is a wrapper class consisting of account data to be inserted and my response class has only two variables.
 ResponseClass resp = new ResponseClass();
        resp.isException = false;
        resp.Description = 'Account Inserted successfully';
This is the response message I m getting.
   <soapenv:Body>
      <insertAccountResponse>
         <result/>
      </insertAccountResponse>
   </soapenv:Body>
</soapenv:Envelope>

 

SuperfellSuperfell

What's the definition of your ResponseClass? looks like you have marked any of its members as WebService

Karthik112Karthik112

 

 global class ResponseClass  {
      Boolean isException ;
      String Description; }

 I havent marked any members of my response class as web service.pls advise. thx,

 

SuperfellSuperfell

Only fields marked as webservice will be serialized into the soap response, so you need to update the class to flag the relevant memebers with the webservice keyword.

This was selected as the best answer
Karthik11Karthik11

Worked..Thanks.