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
BHASKAR GANGULYBHASKAR 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;
}
}