You need to sign in to do that
Don't have an account?
BHASKAR GANGULY
Wrapper Class issue in Inbound webservice
Hi,
I am new to Salesforce.
I am creating a Apex Soap Inbound WSDL where i want to inserrt multiple Account and its Child Comtacts in a single Request.
I trired with Wrapper class.But as i did not mentioned the Account and List<Contact> as Webservice i am getting error while calling through SOAP UI.
I was also can't make Account and Contact as Webservice as the size of the WSDL was extremly huge.I want to make this WSDL generic.
Can anyone please guide me here.
i want to make my webservice generic.
This is my Code below :
global class createaccountcontact{
global class Wrapperaccountcon{
Account acc1;
List<Contact> con;
}
webservice static list<string> createacc(list<Wrapperaccountcon> acc)
{
list<string> app = new list<String>();
for(Wrapperaccountcon accon : acc)
{
Account a = new Account();
a.name = accon.acc1.name;
insert a;
for(Contact c:accon.con)
{
Contact conc = new Contact();
//conc.lastname=accon.con.lastname;
insert conc;
conc.accountid= a.Id;
update conc;
}
app.add(a.Id);
}
return app;
}
}
I am new to Salesforce.
I am creating a Apex Soap Inbound WSDL where i want to inserrt multiple Account and its Child Comtacts in a single Request.
I trired with Wrapper class.But as i did not mentioned the Account and List<Contact> as Webservice i am getting error while calling through SOAP UI.
I was also can't make Account and Contact as Webservice as the size of the WSDL was extremly huge.I want to make this WSDL generic.
Can anyone please guide me here.
i want to make my webservice generic.
This is my Code below :
global class createaccountcontact{
global class Wrapperaccountcon{
Account acc1;
List<Contact> con;
}
webservice static list<string> createacc(list<Wrapperaccountcon> acc)
{
list<string> app = new list<String>();
for(Wrapperaccountcon accon : acc)
{
Account a = new Account();
a.name = accon.acc1.name;
insert a;
for(Contact c:accon.con)
{
Contact conc = new Contact();
//conc.lastname=accon.con.lastname;
insert conc;
conc.accountid= a.Id;
update conc;
}
app.add(a.Id);
}
return app;
}
}