3

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.

thanks

2

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 notifications and 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.

| improve this answer | |
  • Thanks. My co-developer is responsible for receiving the messages. I will suggest something like this to her. – jaw999 Jan 22 '15 at 13:39
  • In the end I created a new object with a long text for message body which sent the fields from multiple objects and her code parsed out the particular object from this long body. – jaw999 Sep 21 '16 at 16:48
  • @jaw999 that sounds like a clever solution. Could you add an answer providing some more detail? I'm looking at a project involving potentially dozens of outbound messages, and creating the listener sounds like a nightmare right now. – Michael Crenshaw May 10 '18 at 13:47
  • 2
    @mac9416 I am not at that company anymore. What I did was make a trigger to create a new object and then on that obj there was a long text field that contained a csv of all the fields on the object plus object identifiers. The this new object with the text field was the one sent out and the parsing was done in the other service – jaw999 May 30 '18 at 14:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.