Search code examples
.netweb-servicescoldfusionwsdlasmx

ColdFusion Web Services wsdl elements


I am working on an exchange of data via web services with another organization that is using ColdFusion. We will both be sending and receiving data. In the sample below, we will be sharing "emails" with each other. My WSDL (generated based on my .NET classes) defines the elements (many more than in the sample) and ComplexTypes that will come back in the response. Their WSDL defines that they will be sending back a string (that string does return back the data formatted as I would expect). Is there a technical reason that their WSDL doesn't define the elements that will be coming back in the response? If they could technically do it, how much of an effort is it to implement in a ColdFusion environment?

Note: I am a .NET developer and I have no experience with ColdFusion, so I have no idea what their limitations are.

Below is the relevant parts of a dumbed down version of our WSDLs, with the sample changed to "email" to protect the innocent.

The relevant parts of the .NET WSDL:

 <s:element name="EmailResponse">
    <s:complexType>
      <s:sequence>
        <s:element minOccurs="0" maxOccurs="1" name="EmailResult" type="tns:Emails" />
      </s:sequence>
    </s:complexType>
  </s:element>

  <s:complexType name="Emails">
    <s:sequence>
      <s:element minOccurs="0" maxOccurs="1" name="Email" type="tns:ArrayOfEmailObject" />
    </s:sequence>
  </s:complexType>
  <s:complexType name="ArrayOfEmailObject">
    <s:sequence>
      <s:element minOccurs="0" maxOccurs="unbounded" name="EmailObject" nillable="true" type="tns:EmailObject" />
    </s:sequence>
  </s:complexType>

  <s:complexType name="EmailObject">
    <s:sequence>
      <s:element minOccurs="1" maxOccurs="1" name="ID" type="s:int" />
      <s:element minOccurs="0" maxOccurs="1" name="subject" type="s:string" />
    </s:sequence>
  </s:complexType>

The relevant part of the ColdFusion WSDL:

<wsdl:message name="displayEmailsResponse">
    <wsdl:part name="displayEmailsReturn" type="xsd:string" /> 
</wsdl:message>

Solution

  • Yes I think they could do it.

    How much of an effort is it to implement in a ColdFusion environment?

    Just need to define the CFC's and <cfproperty>'s properly to mirror your Java objects.

    see: http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec22c24-78b2.html