Web service description: WSDL

A WSDL (Web Service Description Library) file is available for each service. This XML file uses a metalanguage to describe the service and to specify the available methods, parameters, and the server to contact for executing the service.

WSDL file generation

To generate a WSDL file, you must enter the following URL from a Web browser:

https://<server>/nl/jsp/schemawsdl.jsp?schema=<schema>

With:

  • <server>: the Adobe Campaign application server (nlserver web)
  • <schema>: schema identification key (namespace:schema_name)

Example on the ‘ExecuteQuery’ method of schema ‘xtk:queryDef’

The WSDL file is generated from the URL:

https://localhost/nl/jsp/schemawsdl.jsp?schema=xtk:queryDef

A WSDL description starts by defining the types used to form messages, associated in “ports”, connected to a protocol by “bindings” forming Web services.

Types

Type definitions are based on XML schemas. In our example, the “ExecuteQuery” method takes an “s:string” string and an XML document (<s:complextype>) as parameters. The return value of the method (“ExecuteQueryResponse”) is an XML document ( <s:complextype>).

<types>
<s:schema elementFormDefault="qualified" targetNamespace="urn:xtk:queryDef">
  <s:element name="ExecuteQuery">
    <s:complexType>
      <s:sequence>
        <s:element maxOccurs="1" minOccurs="1" name="sessiontoken" type="s:string"/>
        <s:element maxOccurs="1" minOccurs="1" name="entity">
          <s:complexType>
            <s:sequence>
              <s:any/>
            </s:sequence>
          </s:complexType>
        </s:element>
      </s:sequence>
    </s:complexType>
  </s:element>
  <s:element name="ExecuteQueryResponse">
    <s:complexType>
      <s:sequence>
        <s:element maxOccurs="1" minOccurs="1" name="pdomOutput">
          <s:complexType mixed="true">
            <s:sequence>
              <s:any/>
            </s:sequence>
          </s:complexType>
        </s:element>
      </s:sequence>
    </s:complexType>
  </s:element>

Messages

The <message> describes the names and types of a set of fields to be sent. The method uses two messages to pass as a parameter (“ExecuteQueryIn”) and the return value (“ExecuteQueryOut”).

<message name="ExecuteQueryIn">
  <part element="tns:ExecuteQuery" name="parameters"/>
</message>

<message name="ExecuteQueryOut">
  <part element="tns:ExecuteQueryResponse" name="parameters"/>
</message>

PortType

The <porttype> associates the messages on the “ExecuteQuery” operation triggered by the query (“input”) generating a response (“output”).

<portType name="queryDefMethodsSoap">
  <operation name="ExecuteQuery">
    <input message="tns:ExecuteQueryIn"/>
    <output message="tns:ExecuteQueryOut"/>
  </operation>
</portType>

Binding

The <binding> part specifies the SOAP communication protocol ( <soap:binding> ), data transport in HTTP (value of the “transport” attribute) and the data format for the “ExecuteQuery” operation. The body of the SOAP envelope contains the message segments directly without transformation.

<binding name="queryDefMethodsSoap" type="tns:queryDefMethodsSoap">
  <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
  <operation name="ExecuteQuery">
    <soap:operation soapAction="xtk:queryDef#ExecuteQuery" style="document"/>
    <input>
      <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:xtk:queryDef" use="literal"/>
    </input>
    <output>
      <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:xtk:queryDef" use="literal"/>
    </output>
  </operation>
</binding>

Service

The <service> part describes the “XtkQueryDef” service with its URI on the URL of the Adobe Campaign application server.

<service name="XtkQueryDef">
  <port binding="tns:queryDefMethodsSoap" name="queryDefMethodsSoap">
    <soap:address location="https://localhost/nl/jsp/soaprouter.jsp"/>
  </port>
</service>

Connectivity

Adobe Campaign has increased security for authentication mechanisms by introducing security zones and session management settings.

There are two authentication modes available:

  • via a call to logon method(). This mode generates a session token and a security token. It is the most secure mode and therefore the most recommended.

or

  • via the Adobe Campaign login + password that creates a session token. The session token automatically expires after a set period. This mode is not recommended and requires reducing the application security settings for some zone settings (allowUserPassword=“true” and sessionTokenOnly=“true”).

Session token characteristics

The session token has the following characteristics:

  • a X hour life cycle (the life cycle is configurable in the ‘serverConf.xml’ file, the default period is 24 hours)

  • a random construction (it no longer contains the user login and password)

  • when accessed via the Web:

    • the session token becomes a permanent token, it is not destroyed once the browser closes
    • it is placed in an HTTP-ONLY cookie (cookies must be activated for operators)