Ate*_*eik 15 c# coldfusion web-services
我正在尝试使用端点的Web服务https://services.example.com/ASP_SecureWebServices.cfc?wsdl.
在文档中我有这个:
<authorise>
<site>xxx</site>
<login>xxx</login>
<password>xxx</password>
<partnerid>xxx</partnerid>
<wstype>xpt_exhibitors</wstype>
</authorise>
Run Code Online (Sandbox Code Playgroud)
<authorisation>
<service>getAuthToken</service>
<authorised>OK</authorised>
<authtoken>255461</authtoken>
</authorisation>
Run Code Online (Sandbox Code Playgroud)
我之前从未使用过ColdFusion,所以我不明白如何提出请求.有人可以帮忙吗?
我添加了这样的服务引用:

但我没有得到这种方法:

Sha*_*son 11
你实际上直接点击了CFC,但你最后添加?wsdl实际让它返回WSDL.
此外,您想要访问的CFC中的所有方法都需要access="remote".
所以你的实际端点会更接近这个:
https://services.example.com/ASP_SecureWebServices.cfc?wsdl
Run Code Online (Sandbox Code Playgroud)
想要走出困境,但我从文档中猜到,你需要访问的方法被调用authorise.考虑到这一点,您可以按如下方式调用Web服务:
https://services.example.com/ASP_SecureWebServices.cfc?method=authorise&site=xxx&login=xxx&password=xxx&partnerid=xxx&wstype=xpt_exhibitors
Run Code Online (Sandbox Code Playgroud)
默认情况下,ColdFusion将返回一个WDDX数据包; 如果您想要JSON,请添加&returnformat=json.