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

肥皂错误:请求时出现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 Oracle中如何从clob类型截取特定字符串后面的字符
  • ¥15 想通过pywinauto自动电机应用程序按钮,但是找不到应用程序按钮信息
  • ¥15 MATLAB中streamslice问题
  • ¥15 如何在炒股软件中,爬到我想看的日k线
  • ¥15 51单片机中C语言怎么做到下面类似的功能的函数(相关搜索:c语言)
  • ¥15 seatunnel 怎么配置Elasticsearch
  • ¥15 PSCAD安装问题 ERROR: Visual Studio 2013, 2015, 2017 or 2019 is not found in the system.
  • ¥15 (标签-MATLAB|关键词-多址)
  • ¥15 关于#MATLAB#的问题,如何解决?(相关搜索:信噪比,系统容量)
  • ¥500 52810做蓝牙接受端