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
SebastianBraunSebastianBraun 

Gernate Generic WSDL from Apex Webservice

Hi,

 

my Example WS Methode is quite simple:

 

webService static String hello(FeedItem feedItem) 
    {
        insert feedItem;      
        return 'CREATED: '+feedItem.iD;
    }

 

My Problem is that the generated WSDL contains all Types, which are related to FeedItem, but i want to keep this interface generic. So i change the Method as follows:

 

 

webService static String hello(SObject feedItem) 
    {
        If (feedItem instanceof FeedItem) 
        {
            insert feedItem;    
            return 'CREATED: '+feedItem.Id;
        } 
        Else 
        {
            return 'Error';
        }
    }

 

Unfortunately the generated WSDL contains all SObject-Types. Is there any possibility to make this generic like the Partner-WSDL?

 

Greetings Sebastian