RegOnline의 개발자 페이지에서 우리 서버에 대한 API 호출을 설정하고 있습니다. 그들은 핸드 셰이크 (PHP, C#, JS, SOAP)에 대한 다양한 예제를 제공하며 마지막에는 메서드 호출의 일부로 API 토큰을 포함하는 방법에 대한 가장 어려운 예가 있습니다.ColdFusion SOAP API 호출
http://developer.regonline.com/authentication-basics/
나는 그들의 GetEvent 메소드를 호출하는 것을 시도하고,이 호출은 내가 생성 한 API를 토큰을 포함한다. 그러나 SOAP 예제를 토대로 토큰 값을 포함하는 방법을 추측하고 있습니다. 다음은 그 예입니다.
페이지의 다른 예제에는 토큰을 하드 코딩 할 수있는 곳을 명시 적으로 보여주는 전체 버전이 있습니다. SOAP에 대한 지식이 현재 최소한이라서 인정할 것입니다. 아마도이 예제에서 뭔가 빠졌을 것입니다.
여기에 메소드를 호출하려는 시도가 있습니다. 그것들은 그들의 문서와 200 OK 상태의 페이지를 뱉어 내는데, 이것은 옳지 않습니다.
<cfset apiToken = "xxxxx" />
<cfset eventID = "xxxxxx" />
<cfsavecontent variable="soapBody">
<cfoutput>
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GetEvent xmlns="http://www.regonline.com/api">
<eventID>#eventID#</eventID>
</GetEvent>
</s:Body>
</s:Envelope>
<s:complexType name="TokenHeader">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="APIToken" type="s:string">
#apiToken#
</s:element>
</s:sequence>
<s:anyAttribute/>
</s:complexType>
</cfoutput>
</cfsavecontent>
<cfhttp url="https://www.regonline.com/api" method="get" result="theCFHTTP" redirect="true">
<cfhttpparam type="HEADER" name="Content-Type" value="text/xml; charset=utf-8">
<cfhttpparam type="HEADER" name="Accept" value="application/soap+xml, multipart/related, text/*">
<cfhttpparam type="HEADER" name="User-Agent" value="Axis/1.1">
<cfhttpparam type="HEADER" name="Cache-Control" value="no-cache">
<cfhttpparam type="HEADER" name="Pragma" value="no-cache">
<cfhttpparam type="HEADER" name="SOAPAction" value="https://www.regonline.com/api/default.asmx/GetEvent">
<cfhttpparam type="HEADER" name="Content-Length" value="#len(soapBody)#">
<cfhttpparam type="xml" name="body" value="#soapBody#">
</cfhttp>
<cfdump var="#theCFHTTP#">
제공 한 문서 URL을 놓친 이유를 모르겠지만 큰 도움이되었습니다. 출력물에는 문서 페이지 콘텐츠 만 표시되지만 그 문제는 다른 게시물을 필요로합니다. –