dtsnx44260 2012-11-05 12:31
浏览 461
已采纳

肥皂错误:请求时出现XML验证错误:cvc-complex-type.4:属性'Id'必须出现在元素上

i am requesting the java soap web services from the php program. My code is like follow

<?php
 $options = array('features' => 
    SOAP_USE_XSI_ARRAY_TYPE + SOAP_SINGLE_ELEMENT_ARRAYS);
try{
     $sClient = new SoapClient('http://192.168.1.101:8080/person/Person.wsdl');
    //  $sClient = new SoapClient('http://192.168.1.11:8080/DNAHMS/webservice/onlineBooking/Hotel.wsdl',$options);
        //$params = array('Id'=> '1');
        echo "<pre>";
        print_r($sClient->__getFunctions());
        echo "</pre>";

        $parms  = array("Id"=>1);
        $response = $sClient->__call('getPerson',$parms);
        echo "<pre>";
        print_r($response);
        echo "</pre>";





    } catch(SoapFault $e){
        echo "<pre>";
            var_dump($e);
        echo "<pre>";
    }
    ?>

here i am Person.wsdl when i call directly to browser it has no error and aslo this is valid xml file. when i run this i will get soap fault like below :

cvc-complex-type.4: Attribute 'Id' must appear on element 'ns1:GetPersonRequest' Any help will appreciate by hearty

  • 写回答

1条回答 默认 最新

报告相同问题?

悬赏问题

  • ¥15 dev运行环境,c语言,报错是为什么?怎么改
  • ¥15 如何解决蓝牙通话音频突发失真问题
  • ¥15 安装opengauss数据库报错
  • ¥15 【急】在线问答CNC雕刻机的电子电路与编程
  • ¥60 在mc68335芯片上移植ucos ii 的成功工程文件
  • ¥15 笔记本外接显示器正常,但是笔记本屏幕黑屏
  • ¥15 Python pandas
  • ¥15 蓝牙硬件,可以用哪几种方法控制手机点击和滑动
  • ¥15 生物医学数据分析。基础课程就v经常唱课程舅成牛逼
  • ¥15 云环境云开发云函数对接微信商户中的分账功能