该公司的另一组开发商向Ive提供了一份分类文件,这些开发商在一个单独的案例中开展工作,产生一个基于WSDL的SOAP。 我已经进口了这一类档案,并且以我们为例产生了WSDL。 网络服务非常基本,它只是回归一套价值(当然是XML),不需要任何理由来收回这些价值。
仅测试妇女发展论坛正在工作,Ive从我们的手脚下载到我的当地人民民主力量,将其带入社会倡议,并成功地归还了一套价值观。
NOW ONTO THE ISSUE - CONSUMING VIA THE URL
采用冷聚式聚氯乙烯,因此我有两条CFHTTP电话,第一个电话是用我们这个案例的标识,该记录是一次有效的会议。 The session ID is used in my second calls which is below:
<!--- token from from first cfhttp --->
<cfset variables.access_token_node = xmlSearch(XMLContent, "//*[name()= sessionId ]") />
<cfset variables.access_token = variables.access_token_node[1].xmlText>
<cfset variables.wsdl_url2 = "https://cs12.salesforce.com/services/wsdl/class/WS_FAKE_WSDL">
<cfset packet = CreateObject("java", "java.lang.StringBuffer") />
<cfset packet.append( <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://soap.sforce.com/schemas/class/WS_FAKE_WSDL"> ) />
<cfset packet.append( <soapenv:Header> ) />
<cfset packet.append( <ws:SessionHeader> ) />
<cfset packet.append( <ws:sessionId>#variables.access_token#</ws:sessionId> ) />
<cfset packet.append( </ws:SessionHeader> ) />
<cfset packet.append( </soapenv:Header> ) />
<cfset packet.append( <soapenv:Body> ) />
<cfset packet.append( <ws:DescribesObjectFields/> ) />
<cfset packet.append( </soapenv:Body> ) />
<cfset packet.append( </soapenv:Envelope> ) />
<cfhttp method="post" url="#variables.wsdl_url2#" result="findResponse2">
<cfhttpparam type="HEADER" name="Accept" value="application/soap+xml, application/xml, multipart/related, text/*">
<cfhttpparam type="HEADER" name="ACCEPT-ENCODING" value="application/soap+xml">
<cfhttpparam type="HEADER" name="CONNECTION" value="Keep-Alive">
<cfhttpparam type="HEADER" name="SOAPAction" value="dummy">
<cfhttpparam type="HEADER" name="Content-Type" value="text/xml; charset=utf-8">
<cfhttpparam type="HEADER" name="Must-Understand" value="1">
<cfhttpparam type="Header" name="Content-Length" value="#len(trim(packet.ToString()))#">
<cfhttpparam type="body" value="#packet.ToString()#" encoded="yes">
</cfhttp>
Below is what I am receiving from the WSDL..that code just takes me back to the login screen. With a Session ID I would assume I wouldn t need to log back in, correct?
感谢所有建议。