开发者

WCF service with wsHttpBinding and x509 Certificate - can I consume/connect using VB/C# WITH PHP?

We connect to a web service hosted by another company. We send a customer's basic info to the service, and it replies with rates/prices for that customer.

I am a PHP guy -- started out playing with basic HTML, then delved into PHP about 8 years ago, and my entire web app is PHP with javascrtipt/ajax mixed in as needed. I'm a learn-as-I-go guy.

For the last two years, the service has been an aspx web service, which was easy -- just connect with PHP's SoapClient. Now, the company hosting the service has changed it to WCF, and the binding is wsHttpBinding, and authentication is done via x509 certification.

I've determined that PHP's SoapClient can't handle wsHttpBinding. So my first roadblock - how the heck do I connect to this service? I went as far as to install MS Visual Web Developer 2010 Express, and then I used svcutil.exe to create .config and .cs files for the service. But understand, I've never written anything in C# or VB. I've done a few little VBScripts in the past, and I can handle javascript... but I'm looking at these .conf开发者_JS百科ig and .cs files and thinking, now what the heck do I do with these??

Basically, I just want to connect to this service using PHP and javascript. But since it seems that's impossible (correct?), is there a way I can invoke a VB/C# operation from within my PHP script? For instance, pull the customer's info from mysql and prepare the data for the service using PHP, then use VB/C# to connect to and communicate with the service? Or any better ideas?

All hints/ideas/suggestions are greatly appreciated!


Interesting. You are connecting to web service hosted by another company and they probably know that you are using PHP. Despite it they modified the service in the way which is not fully compatibile with PHP.

I'm .NET guy. I have already done some projects where WS-Security an PHP was involved. I was in opposite situation. My service was written in PHP and I had to consume it in .NET. The situation was much easier because .NET supports much bigger set of WS-* protocols.

I know that PHP team used WSO2 Web Services Framework to create the service. You can try to use it in your case to consume .NET service.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜