You need to sign in to do that
Don't have an account?
Sparky Jane
How to parse WSDL from the code that was developed?
Hi,
The code that I've written is stated below:
global class MyWebService{
webService static Id makeContact(String lastname, Account a){
Contact c = new Contact(lastname = 'Sai Teja', AccountId = a.Id);
insert c;
return c.id;
}
}
-> I have generated WSDL for the above code.
-> I have saved the WSDL code as "web.wsdl"
-> And next I have clicked "Generate from WSDL" and I choose the file "web.wsdl"
-> Step-1: I have parsed the apex code from wsdl
-> Step-2: I have clicked on generate apex code
"There an errror raised like this:
Can Some one please help me out?
The code that I've written is stated below:
global class MyWebService{
webService static Id makeContact(String lastname, Account a){
Contact c = new Contact(lastname = 'Sai Teja', AccountId = a.Id);
insert c;
return c.id;
}
}
-> I have generated WSDL for the above code.
-> I have saved the WSDL code as "web.wsdl"
-> And next I have clicked "Generate from WSDL" and I choose the file "web.wsdl"
-> Step-1: I have parsed the apex code from wsdl
-> Step-2: I have clicked on generate apex code
"There an errror raised like this:
Can Some one please help me out?
James Loghry
Looks like it could be a Salesforce issue with generating the wsdl. A few things you could try are:
- Updating your API version of your Apex class (or try reverting to say, version 18) to see if it will allow you to general the wsdl. You can always set it back to the current API version after the wsdl is generated.
- Changing your method to accept an Id for the account, rather than the whole account record. This is proably the better approach, especially if you're only using it to set the AccountId on a new contact.