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

wsdl file genaration gives error?

hi,i wrote a class like this 

global class SoapApiAccountContact {   
    webService static List<Contact> sayContact() {
    List<contact> con=[select Id,LastName from contact where Account.Name='tvarana'];
    return con;

for genarating wsdl file for this class i am getting this error

Apex Generation Failed
Unable to find complexType for {}address

any one please help me how to create a client class to pass list of contacts to server

Surya KiranSurya Kiran

Change the class version to below 30. It may help.
Shri RajShri Raj
I have copied you code and pasted in my org. Its working fine. Give a try again with a new class name . It should work
i changed version also but it is not genareting.same error it is giving.

but i achieved in another way
global class SoapAccountContact {

    global class SoapContact {

        webservice String lastName;

    webService static List<SoapContact> searchByAccount(String name) {

        List<SoapContact> c= new List<SoapContact>();

        list<contact> con = [select LastNAme from contact where Account.Name=:name];

        for (Integer i=0;i<con.size();i++) {
            SoapContact p = new SoapContact();
            p.lastName = con[i].LastName;
        System.debug('Returning people: '+c);

        return c;


thanks for your reply