Is it possible to generate a single WSDL for multiple outbound messages? Receiving messages for leads and Opportunities is proving challenging for our receiving service with the overlapping names of classes etc.
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.Sign up to join this community
No, I do not believe it will be possible to merge the outbound message WSDLs.
Each WSDL will have an element named "notifications" which in turn will have a "Notification" element. This latter element will have a type that is customised to the outbound message payload.
<element name="notifications"> <complexType> <sequence> <element name="OrganizationId" type="ent:ID" /> <element name="ActionId" type="ent:ID" /> <element name="SessionId" type="xsd:string" nillable="true" /> <element name="EnterpriseUrl" type="xsd:string" /> <element name="PartnerUrl" type="xsd:string" /> <element name="Notification" maxOccurs="100" type="tns:Custom__cNotification" /> </sequence> </complexType> </element> <!-- This will differ with each WSDL for the outbound payload --> <complexType name="Custom__cNotification"> <sequence> <element name="Id" type="ent:ID" /> <element name="sObject" type="ens:Custom__c" /> </sequence> </complexType>
Instead, see if you can separate out the implementations that handle the SOAP requests.
For example, with .NET I can generate classes into separate namespaces for each WSDL. With the
INotificationBinding interfaces in different namespaces it avoids conflicts around the
notificationsResponse classes plus any other generated classes.
wsdl /language:CS /out:..\Interfaces\ICustomNotificationService.cs /namespace:Acme.WebServices.Interfaces.CustomNotification /serverInterface CustomNotification.wsdl
Then you can create a web service that implements that interface to handle the notifications and send back the response.