like a few times before i'm stuck with a problem. this time it hes everything to do with webservices or WCF.
in the end, i want to convert an xml/access/SQL database (depends on what the user uploads) to a simple multi-dimentional array.
but it isn't what i was trying to do now since i'm rather new to WCF. so, i started with a simple 'hello world'
coding the webservice wasn't difficult, but now i tried to use it in php using the next code:
Expand|Select|Wrap|Line Numbers
- <?php
- header('Content-Type: text/plain');
- echo "WCF Test\n";
- $client = new SoapClient('webservice try 1/webservice try 1/Service1.svc?wsdl');
- $retval = $client->Test();
- echo $retval;
- ?>
-------------------------------------------------------------------------------------------------------------------
WCF Test
<br />
<b>Warning</b>: SoapClient::SoapClient() [<a href='soapclient.soapclient'>soapclient.soapclient </a>]: I/O warning : failed to load external entity "webservice try 1/webservice try 1/Service1.svc?wsdl" in <b>C:\xampp\htdocs\page\testWCF.php</b> on line <b>6</b><br />
<br />
<b>Fatal error</b>: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'webservice try 1/webservice try 1/Service1.svc?wsdl' : failed to load external entity "webservice try 1/webservice try 1/Service1.svc?wsdl"
in C:\xampp\htdocs\page\testWCF.php:6
Stack trace:
#0 C:\xampp\htdocs\page\testWCF.php(6): SoapClient->SoapClient('webservice try ...')
#1 {main}
thrown in <b>C:\xampp\htdocs\page\testWCF.php</b> on line <b>6</b><br />
-------------------------------------------------------------------------------------------------------------------
can anyone tell me how this should be done properly?