如何从codeigniter调用wcf webserice方法?

时间:2015-12-02 13:58:11

标签: php json wcf codeigniter

任何人帮助我 如何从codeigniter框架调用WCF Webservice(http://subdomain.mydomain.org/mywcfservice/mywcfservice.svc)方法(mymethod) 我用过这段代码

try{ 
    $client = new 
        SoapClient( 
            "http://subdomain.mydomain.org/mywcfservice/mywcfservice.svc" 
        );
    $params = array('UserId'=>"1", 'UserAuth'=>"123456"); 
    $webService = $client->GetData($params); 
    $wsResult = $webService->Data; 
    print  $wsResult; 
} catch (Exception $e) { 
    print  'Caught exception: '.  $e->getMessage(). "\n"; 
}

但我有这个错误

Caught exception: SOAP-ERROR: Parsing WSDL: Couldn't find in 'http://subdomain.mydomain.org/mywcfservice/mywcfservice.svc'

知道这个方法返回我要解析的JSON对象(myjsonobject)

感谢您的帮助

0 个答案:

没有答案