Coldfusion 404通过CFHTTP在SOAP web服务请求中未找到错误

Coldfusion 404通过CFHTTP在SOAP web服务请求中未找到错误,coldfusion,Coldfusion,我在与会员数据库的web服务通信时遇到很多问题。当使用SoapUI时,我从SOAP信封中得到一个有效的结果。但是,当我尝试使用CFHTTP和CF9(我知道,我知道)发送相同的信封时,无论我尝试做什么,都会得到一个“404NotFound”错误。在浏览器中访问URL时会出现“访问被拒绝”错误 以下是我在cfsavecontent中的内容: <cfsavecontent variable="soapBody"> <cfoutput> <?xml vers

我在与会员数据库的web服务通信时遇到很多问题。当使用SoapUI时,我从SOAP信封中得到一个有效的结果。但是,当我尝试使用CFHTTP和CF9(我知道,我知道)发送相同的信封时,无论我尝试做什么,都会得到一个“404NotFound”错误。在浏览器中访问URL时会出现“访问被拒绝”错误

以下是我在cfsavecontent中的内容:

<cfsavecontent variable="soapBody">
    <cfoutput>
    <?xml version=“1.0” encoding=“utf-8”?>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sch="http://membersuite.com/schemas" xmlns:con="http://membersuite.com/contracts">
       <soapenv:Header>
         <sch:ConciergeRequestHeader>
         <!--Optional:-->
         <sch:BrowserId></sch:BrowserId>
         <!--Optional:-->
         <sch:SessionId></sch:SessionId>
         <sch:AccessKeyId>MyAccessKey</sch:AccessKeyId>
         <!--Optional:-->
         <sch:AssociationId>MyAssociationID</sch:AssociationId>
         <sch:Signature>MySignature</sch:Signature>
         </sch:ConciergeRequestHeader>
       </soapenv:Header>
       <soapenv:Body>
          <con:LoginToPortal>
            <!--Optional:-->
            <con:portalUserName>username</con:portalUserName>
            <!--Optional:-->
            <con:portalPassword>password</con:portalPassword>
          </con:LoginToPortal>
       </soapenv:Body>
    </soapenv:Envelope>
    </cfoutput>
</cfsavecontent>

MyAccessKey
MyAssociationID
自我签名
用户名
密码
这是我的cfhttp:

<cfhttp url="https://soap.membersuite.com/mex" method="post" useragent="#CGI.http_user_agent#">
  <cfhttpparam type="header" name="charset" value="utf-8">
  <cfhttpparam type="header" name="mimetype" value="application/xml" /> 
  <cfhttpparam type="header" name="content-type" value="text/xml">
  <cfhttpparam type="header" name="SOAPAction" value="http://membersuite.com/contracts/IConciergeAPIService/LoginToPortal" />
  <cfhttpparam type="header" name="accept-encoding" value="no-compression" />
  <cfhttpparam type="header" name="content-length" value="#len(trim(soapBody))#">
  <cfhttpparam type="xml" name="soapenv" value="#trim(soapBody)#" /> 
</cfhttp>

转储cfhttp会导致以下错误:

很明显,远程服务器告诉我它找不到我要的东西。但它是正确的端点,我可以在WSDL中看到它:

<wsdl:operation name="LoginToPortal">
    <wsdl:input wsaw:Action="http://membersuite.com/contracts/IConciergeAPIService/LoginToPortal" message="tns:IConciergeAPIService_LoginToPortal_InputMessage"/>
    <wsdl:output wsaw:Action="http://membersuite.com/contracts/IConciergeAPIService/LoginToPortalResponse" message="tns:IConciergeAPIService_LoginToPortal_OutputMessage"/>
</wsdl:operation>


我还将web服务页面中的SSL证书添加到我的CF keystone中;错误消息中没有更改。我束手无策,如有任何建议,我将不胜感激!同样,我通过SoapUI获得了预期的结果。非常感谢大家

严格脱离SoapUI请求,如果将目标URL更改为,它似乎可以工作。使用伪造凭据,响应将更改为“指定的访问密钥ID无效”,而不是404

<cfhttp url="https://soap.membersuite.com/" method="post" useragent="#CGI.http_user_agent#">
  <cfhttpparam type="header" name="Content-Type" value="text/xml; charset=utf-8" /> 
  <cfhttpparam type="header" name="SOAPAction" value="http://membersuite.com/contracts/IConciergeAPIService/LoginToPortal" />
  <cfhttpparam type="header" name="Accept-Encoding" value="no-compression" />
  <cfhttpparam type="header" name="Content-Length" value="#len(trim(soapBody))#">
  <cfhttpparam type="body" value="#trim(soapBody)#" /> 
</cfhttp>


LOL!就这样?所以我尝试了你的建议,但我得到了一个400错误的请求——进展!我的SOAP测试请求中还剩下一些东西。我删除了它,更新了我的凭证,它成功了!!太棒了,非常感谢你!我真的(再次)感谢你的帮助!祝你周末愉快!标题可以稍微调整一下,但是。。。是的,就是这样。今天我自己也吃了一个。喜欢这样小的东西会让人头疼;-)好吧,我肯定会开始仔细观察,因为我应该更清楚地了解这些事情。李,非常感谢你提供了这个“可教的时刻”。我不想承认我在这里发帖之前花了多少时间试图弄明白这一点!:-)我非常感谢你的耐心和帮助!嘿,不客气。有时候,这只是第二双眼睛,或者记得离开一会儿。昨天我终于做到了这一点,我自己缺乏睡眠的愚蠢行为立刻变得清晰起来;-)无论如何,至少现在我们可以享受周末了!我们确实可以!我希望你有一个伟大的。干杯再次非常感谢你。我真的很感激。