You need to sign in to do that
Don't have an account?
Sachin Bhalerao 17
How to call APEX SOAP services through Workbench ?
Dear Team ,
Greetings !!!
Thank you for your support . I have created one APEX class for SOAP service it contains one method to insert data into Account Standard object . Plz let me know how i call this class and metod through Workbench tool . This is my code
class name : accSOAPint
global class accSOAPint {
webservice static Account dopost(String Name){
Account acc = new Account();
acc.Name = Name;
insert acc;
return acc;
}
}
Thanks & Regards
Sachin Bhalerao
Greetings !!!
Thank you for your support . I have created one APEX class for SOAP service it contains one method to insert data into Account Standard object . Plz let me know how i call this class and metod through Workbench tool . This is my code
class name : accSOAPint
global class accSOAPint {
webservice static Account dopost(String Name){
Account acc = new Account();
acc.Name = Name;
insert acc;
return acc;
}
}
Thanks & Regards
Sachin Bhalerao
How to consume a soap web service using workbench?
https://salesforce.stackexchange.com/questions/126564/how-to-consume-a-soap-web-service-using-workbench
I have this code :
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:partner.soap.sforce.com/class/dopost">
<soapenv:Header>
<urn:CallOptions>
<urn:client></urn:client>
<urn:defaultNamespace></urn:defaultNamespace>
</urn:CallOptions>
<urn:LoginScopeHeader>
<urn:organizationId></urn:organizationId>
ID : 00D2v000001wLx1!AQUAQCyEYtQRhwkPWPXCno5R4K7G6wdN2E2TKh27ftBsxmu9PMI.LgSe_wCPs3UpCcS.JYZOpaAhF_Q8pG29lCp29VSQdt_z
Plz share proper code
Thanks & Regards
Sachin Bhalerao
The last step is very easy by just replacing MyWebService with accSOAPint
1) Button : Generate WSDL : check for the target URLs
<definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://soap.sforce.com/schemas/class/MyWebService" targetNamespace="http://soap.sforce.com/schemas/class/MyWebService">
<types>
<xsd:schema elementFormDefault="qualified" targetNamespace="http://soap.sforce.com/schemas/class/MyWebService">
2)
sarojkberais useless by default. It is an org Namespace. If you’re not creating managed packages for distribution then registering a namespace prefix isn’t required, but it’s a best practice for all but the smallest organizations./services/Soap/class/MyWebService
xmlns:myw can be reused like above but be careful because you are using dopost instead of makeContact (Name instead of firstName ...)
https://salesforce.stackexchange.com/questions/126564/how-to-consume-a-soap-web-service-using-workbench