当我在给出预期响应的Coldfusion服务器中调用canadaPost api时。但是当我在Lucee服务器中使用相同的调用时,它会引发消息失败。这两个服务器的响应标题为“Oracle-iPlanet-Web-Server/7.0”。但是在Lucee服务器中,响应mimetype是“application/octet-stream”,在coldfusion服务器中是“application/vnd.cpc.ship.rate-v3 + xml”。API响应文件内容在Lucee服务器上为空
这是问题的原因吗?请给出你的建议。
这里是我的代码:
<cfset local.url = "https://ct.soa-gw.canadapost.ca/rs/ship/price">
<cfhttp url="#local.url#" method="post" result="httpResponse" username="#variables.username#" password="#variables.password#">
<cfhttpparam type="header" name="Accept" value="application/vnd.cpc.ship.rate-v3+xml"/>
<cfhttpparam type="xml" value="#trim(xmlRequest)#"/>
<cfhttpparam type="header" name="Content-type" value="application/vnd.cpc.ship.rate-v3+xml">
</cfhttp>
附截图被采取Lucee服务器上:
感谢
是否调用成功,即200 OK或者你得到一个错误?你可以发布回复的转储吗? – Leigh
@Leigh附上lucee服务器响应截图。 –
作为cfSimplicity提到的SSL调用吗? (转储建议否..) – Leigh