通过调用一个的wsHttpBinding WCF web服务在PHP [英] Calling a WCF WebService in PHP via wsHttpBinding

查看:173
本文介绍了通过调用一个的wsHttpBinding WCF web服务在PHP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个WCF web服务我可以通过basicHttp连接到它,但不wsHttp。我试着通过wshttp通过以下来conenct吧:

I have a WCF webservice I can connect to it via basicHttp, but not wsHttp. I try to conenct to it via wshttp via the following:

$service = new SoapClient
("http://service.companyname.local:6666/Service/?wsdl",
 array(
         "location" => "http://service.companyname.local:6666/Service/WCF",

	"trace" => true,
	'soap_version' => SOAP_1_2
     )
);

到SoapClient的构造函数的调用返回的罚款。当我尝试调用一个使用的客户端 - $>函数名,页面只是坐在那里装了好一阵子,最终返回错误错误获取HTTP标头。究竟是什么这个应该是说,如何解决呢? (消费从.Net客户端的作品完美的服务。)

The call to the SoapClient constructor returns fine. When I try to call one using $client->FunctionName, the page just sits there loading for quite a while, and eventually returns the error "Error Fetching http headers". What exactly is this supposed to mean and how do I fix it? (Consuming the service from .Net client works perfectly.)

推荐答案

默认配置上的wsHttpBinding采用先进的WS-Security和未用香草PHP SoapClient的理解的WS-Addressing功能。有迹象表明,也许能工作(的Apache Axis2的+壁垒/ C,例如)其他PHP访问的SOAP客户端,或者你可以尝试关闭一些不兼容的wsHttpBinding功能(邮件安全性可能是第一个)。不是说这是行不通的,但你可能需要一些试验和错误,以得到这一切工作的权利。

The default config on wsHttpBinding uses advanced WS-Security and WS-Addressing features that aren't understood by the vanilla PHP SoapClient. There are other PHP-accessible SOAP clients that might be able to work (Apache Axis2+Rampart/C, for instance), or you can try to shut off some of the incompatible wsHttpBinding features (message security is probably the first). Not to say that it won't work, but you'll probably need some trial-and-error to get it all working right.

这篇关于通过调用一个的wsHttpBinding WCF web服务在PHP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆