Home

Spacebug open source initiative

Primary links

  • Get involved
Home Blogs Amir Shevat's blog

Navigation

  • Documentation
  • Projects
    • Ajaxdo
    • JComet
    • MantaRay
    • Spring-Dashboard
    • JNI.NET
  • Blogs
  • Downloads

Tag cloud

Architecture Ant Drupal eclipse JSP .NET Reviews JavaScript AJAX Tips Open source Java
more tags


Add to Google Reader or Homepage

Poll

Best for web dev:

Recent blog posts

  • Silverlight 2.0 Calculator Example Application
  • Useful tool - Vista Battery Saver
  • Does the open source professional services business model suck?
  • PHP calling .NET - PHP to WCF calls with parameters
  • Adding Spacebug to Technorati.
  • PHP calling .NET - PHP to WCF communication
  • Language syntax's, performance, PHP, Ruby, Java and who's better? Ahhhh!
  • Does Google want us to switch from Internet Explorer to Firefox?
  • PHP calling .NET - Running WCF service with basicHttpBinding
  • Tip: Visual Studio 2008 fails to debug WCF web service
more

User login

  • Create new account
  • Request new password

PHP calling .NET - Running WCF service with basicHttpBinding

Submitted by Amir Shevat on Wed, 07/23/2008 - 11:30
  • .NET
  • Interoperability
  • PHP
  • Tips
  • WCF
  • web services

I am Writing a PHP application that needs to run a back end .NET application. When creating a running the WCF web service out of the box, the PHP could not connect to the web service.

The problem:

The PHP returns "Caught exception: Cannot process the message because the content type 'text/xml; charset=utf-8' was not the expected type 'application/soap+xml; charset=utf-8'."

 

The reason:

WCF is running a new version of web services than expected by the PHP.

 

The solution:

Change the binding type of the WCF service from binding="wsHttpBinding" to binding="basicHttpBinding".

This insures that your .NET web service would support clients and other services that conform to the WS-I standards.

 

You can see an example of such configuration in my blog posts named:

PHP calling .NET - PHP to WCF communication

and

PHP calling .NET - PHP to WCF calls with parameters

  • Amir Shevat's blog

Thanks!

Submitted by Anonymous on Fri, 07/25/2008 - 22:17.

I was working on this for a long time, this post solved it.
Thanks!!

  • reply

Post new comment

Input format
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.

More information about formatting options

Powered by Drupal, an open source content management system
Spacebug.com (c)2006
RoopleTheme