+ Start a Discussion
ganesh jadhavganesh jadhav 

webservice wsdl generation

hi iam new in salesforce.com,

i have to create webservice for inserting one record in my custom object, i cant able to generate WSDL  plz help me .....

i have creted class, hit the generate from wsdl still not working

 

AJSFDCAJSFDC

If you would like to create record with out any complex logic then you can do it via Enterprise WSDL.

 

Setup--> Develop --> API

 

If your logic is complex then you can do it with Apex class. Class need to be global and webservice keyword need to be present in your method. See the example below.

 

 global class MyWebService {

webService static Id makeContact(String lastName, Account a) {

Contact c = new Contact(lastName = 'Weissman', AccountId = a.Id);

insert c;

return c.id;

}

_Prasu__Prasu_
Generate from WSDL is for generation classes from the WSDL. In your case you want to generate WSDL. You can use the Partner or Enterprise WSDL provided by Salesforce. Or you can write webservices on your own and generate its WSDL.