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
Maf_007Maf_007 

Using WSDL class to make outside web service call

Hi All,

 

I am trying to build an integration with an outside website to send some data and get result back using web service. I have been given their WSDL file along with a security token. Now, I have consumed the WSDL file in apex and created a class from that. Now my question is:

 

  1. How do I make the web service call (e.g. provide security token, provide xml file which needs to be passed over to other system. From same class or a different class)
  2. If it's from a different class which methods I call and where do I put the credentials i.e. security token

Could someone please provide a simple example as Salesforce docs didn't help me much to get the grasp of it

 

M

Maf_007Maf_007

Hi I have created my web service class which returns an xml file with a lot of fields in it. I was wondering how would I be able to map certain fields in salesforce. In my WSDL class the return type is a class which is a list of strings. Also is there any way I can create an XML file from existing fields and send it as string for my web service??