doubi2145 2015-09-20 23:48
浏览 180

PHP __SoapCall问题

I have a simple service using php and Soap
There's a function named getPrice in my SOAP SERVER

This is getPrice :

    function getPrice($productISBN, $param)
    {

        return $productISBN;
    }

$kks = new SoapServer(null, array('uri' => "urn://my/webservice/shop"));

    $kks->addFunction( array(
                    'getPrice',
                    'reserveProduct',
                    'inquiryPostPrice',
                    'registerPostOrder'

                 ) );

    $kks->addFunction(SOAP_FUNCTIONS_ALL);

$kks->handle();

and this is my client file -This is in /kkc folder :

$client = new SoapClient(null, array(
      'location' => "http://example.com/webservice/kks/shop.php",
      'uri'      => "urn://my/webservice/shop"
    ) );

var_dump( $client->__soapCall('getPrice', array(123456789, $param) ) );

//$param is a string

but I'll get this error in client :

 Fatal error: Uncaught SoapFault exception: [HTTP] Internal Server
 Error in /example.com/webservice/kkc/client.php:28 Stack trace:
 #0 [internal function]: SoapClient->__doRequest('__soapCall('getPrice', Array)
 #2 {main}   thrown in /example.com/public_html/webservice/kkc/client.php on line 28

I have two other files like this and there's everything is fine...
Would you please let me know what's wrong here?
Thanks in Advance

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
    • ¥15 gdf格式的脑电数据如何处理matlab
    • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
    • ¥100 监控抖音用户作品更新可以微信公众号提醒
    • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
    • ¥70 2048小游戏毕设项目
    • ¥20 mysql架构,按照姓名分表
    • ¥15 MATLAB实现区间[a,b]上的Gauss-Legendre积分
    • ¥15 delphi webbrowser组件网页下拉菜单自动选择问题
    • ¥15 linux驱动,linux应用,多线程