views:

10074

answers:

2

I am hosting a WCF service in a Windows Service on one of our servers. After making it work in basicHttpBinding and building a test client in .NET (which finally worked) I went along and try to access it from PHP using the SoapClient class. The final consumer will be a PHP site so I need to make it consumable in PHP.

I got stumped when I had to enter the WSDL url in the constructor of the SoapClient class in the PHP code. Where is the WSDL? All I have is :

http://172.27.7.123:8000/WordService and http://172.27.7.123:8000/WordService/mex

None of these do not expose WSDL.

Being a newbie in WCF I might have asked a dumb thing (or I might have a wrong assumption somewhere). Please be gentle :D

And no, http://172.27.7.123:8000/WordService?wsdl does not show anything different than http://172.27.7.123:8000/WordService :(

Am I forced to host it in IIS? Am I forced to use a regular WebService?

+1  A: 

Please see this link:

Exposing a WCF Service With Multiple Bindings and Endpoints

Unlike previous ASMX services, the WSDL (web service definition language) for WCF 
services is not automatically generated.  The previous image even tells us that 
"Metadata publishing for this service is currently disabled.".  
This is because we haven't configured our service to expose any meta data about it. 
 To expose a WSDL for a service we need to configure our service to provide meta information.  Note:  
The mexHttpBinding is also used to share meta information about a service.  While 
the name isn't very "gump" it stands for Meta Data Exchange.
DaveK
Thank you too :) - the document you pointed out also shows the httpGetEnabled set to true.
Andrei Rinea
+7  A: 

This might help:

http://msdn.microsoft.com/en-us/library/ms734765.aspx

Kev
I am sorry but the link seems to be broken
Andrei Rinea
@Andrei: link seems fine, MSDN might have been on one of their weekend upgrades or something.
Kev
Thanks, now it works :)
Andrei Rinea