Adobe Campaign 애플리케이션 서버는 점차 다양하고 복잡한 회사 정보 시스템과의 개방성과 간편한 통합을 위해 설계되었습니다.
Adobe Campaign API는 애플리케이션 내의 JavaScript와 애플리케이션 외부의 SOAP에서 사용됩니다. 이들은 보강될 수 있는 일반적인 기능의 라이브러리를 구성합니다. 자세한 내용은 SOAP 메서드 구현.
Adobe Campaign API를 사용하려면 먼저 다음 주제를 숙지해야 합니다.
Adobe Campaign에서는 두 가지 유형의 API를 사용합니다.
API를 개발하고 Adobe Campaign과 상호 작용하려면 데이터 모델을 숙지해야 합니다. Adobe Campaign에서 베이스에 대한 전체 설명을 생성할 수 있습니다. 을(를) 참조하십시오. 모델에 대한 설명.
SOAP 프로토콜을 사용하면 기본적으로 리치 클라이언트, 웹 서비스를 사용하는 타사 애플리케이션 또는 JSP를 통해 API 메서드를 호출할 수 있습니다.
SOAP 메시지의 구조는 다음과 같습니다.
다음 스키마는 Adobe Campaign API 사용과 관련된 다양한 리소스를 보여줍니다.
이 예제에서 SOAP 쿼리는 문자열을 인증(세션 토큰)의 매개 변수로 사용하고 실행할 쿼리 설명에 대한 XML 콘텐츠로 가져오는 "ExecuteQuery" 메서드를 호출합니다.
자세한 내용은 ExecuteQuery(xtk:queryDef).
이 서비스에 대한 WSDL 설명은 여기에 표시된 예제에서 완료됩니다. 웹 서비스 설명: WSDL.
<?xml version='1.0' encoding='ISO-8859-1'?>
<SOAP-ENV:Envelope xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:ns='http://xml.apache.org/xml-soap' xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'>
<SOAP-ENV:Body>
<ExecuteQuery xmlns='urn:xtk:queryDef' SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
<__sessiontoken xsi:type='xsd:string'/>
<entity xsi:type='ns:Element' SOAP-ENV:encodingStyle='http://xml.apache.org/xml-soap/literalxml'>
<queryDef firstRows="true" lineCount="200" operation="select" schema="nms:rcpGrpRel" startLine="0" startPath="/" xtkschema="xtk:queryDef">
...
</queryDef>
</entity>
</ExecuteQuery>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
다음 <soap-env:envelope>
요소는 SOAP 봉투를 나타내는 메시지의 첫 번째 요소입니다.
다음 <soap-env:body>
요소는 봉투의 첫 번째 하위 요소입니다. 여기에는 메시지의 설명, 즉 쿼리의 콘텐츠 또는 응답이 포함됩니다.
호출할 메서드는 <executequery>
SOAP 메시지 본문의 요소입니다.
SOAP에서 매개 변수는 모양새 순서로 인식됩니다. 첫 번째 매개 변수, <__sessiontoken>
를 사용하여 인증 체인을 가져오고 두 번째 매개 변수는 <querydef>
요소를 생성하지 않습니다.
<?xml version='1.0' encoding='ISO-8859-1'?>
<SOAP-ENV:Envelope xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:ns='http://xml.apache.org/xml-soap' xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'>
<SOAP-ENV:Body>
<ExecuteQueryResponse xmlns='urn:xtk:queryDef' SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
<pdomOutput xsi:type='ns:Element' SOAP-ENV:encodingStyle='http://xml.apache.org/xml-soap/literalxml'>
<rcpGrpRel-collection><rcpGrpRel group-id="1872" recipient-id="1362"></rcpGrpRel></rcpGrpRel-collection>
</pdomOutput>
</ExecuteQueryResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
쿼리 결과는 <pdomoutput>
요소를 생성하지 않습니다.
SOAP 오류 응답 예:
<?xml version='1.0' encoding='ISO-8859-1'?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'>
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server</faultcode>
<faultstring>Error while executing 'Write' of the 'xtk:persist'.</faultstring> service
<detail>ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert duplicate key row in object 'XtkOption' with unique index 'XtkOption_name'. SQLSTate: 23000
ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]The statement has been terminated. SQLSTate: 01000 Cannot save the 'Options (xtk:option)' document </detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
다음 <soap-env:fault>
SOAP 메시지 본문의 요소는 웹 서비스를 처리하는 동안 발생하는 오류 신호를 전달하는 데 사용됩니다. 다음은 다음 하위 요소로 구성됩니다.
<faultcode>
: 오류 유형을 나타냅니다. 오류 유형은 다음과 같습니다.
<faultstring>
: 오류를 설명하는 메시지
<detail>
: 긴 오류 메시지
서비스 호출의 성공 또는 실패는 <faultcode>
요소가 확인되었습니다.
모든 Adobe Campaign 웹 서비스는 오류를 처리합니다. 따라서 반환된 오류를 처리하기 위해 각 호출을 테스트하는 것이 좋습니다.
C#의 오류 처리 예:
try
{
// Invocation of method
...
}
catch (SoapException e)
{
System.Console.WriteLine("Soap exception: " + e.Message);
if (e.Detail != null)
System.Console.WriteLine(e.Detail.InnerText);
}
웹 서비스를 제출하려면 해당 서비스 방법을 구현하는 Adobe Campaign 서버에 연결해야 합니다.
서버 URL은 다음과 같습니다.
https://serverName/nl/jsp/soaprouter.jsp
사용 <server>
Adobe Campaign 애플리케이션 서버(nlserver 웹).