Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/278.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
php soap传递complextype参数的complextype_Php_Soap_Xsd_Wsdl - Fatal编程技术网

php soap传递complextype参数的complextype

php soap传递complextype参数的complextype,php,soap,xsd,wsdl,Php,Soap,Xsd,Wsdl,我在这个soap wsdl上传递数据时遇到问题,我的complextype为complextype <xs:schema elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/LibIf"> <xs:complexType name="RuleParams"> <xs:sequence> <xs:element

我在这个soap wsdl上传递数据时遇到问题,我的complextype为complextype

<xs:schema elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/LibIf">
<xs:complexType name="RuleParams">
    <xs:sequence>
        <xs:element name="Parameters" nillable="true" type="tns:ArrayOfRuleParameter"/>
        <xs:element name="Result" type="xs:boolean"/>
    </xs:sequence>
</xs:complexType>
<xs:element name="RuleParams" nillable="true" type="tns:RuleParams"/>
<xs:complexType name="ArrayOfRuleParameter">
    <xs:sequence>
        <xs:element minOccurs="0" maxOccurs="unbounded" name="RuleParameter" nillable="true" type="tns:RuleParameter"/>
    </xs:sequence>
</xs:complexType>
<xs:element name="ArrayOfRuleParameter" nillable="true" type="tns:ArrayOfRuleParameter"/>
<xs:complexType name="RuleParameter">
    <xs:sequence>
        <xs:element name="Name" nillable="true" type="xs:string"/>
        <xs:element name="Value" nillable="true" type="xs:anyType"/>
    </xs:sequence>
</xs:complexType>
<xs:element name="RuleParameter" nillable="true" type="tns:RuleParameter"/>
通常我使用的是数据较少的简单web服务。 在这种情况下,我可以为数据发送一个xml结构吗

$params = new \stdClass();
$params->RuleParams = new \stdClass();
$params->Parameters = new \stdClass();
$params->Result = true;
$RuleParameter1 = new \stdClass();
$RuleParameter1->Name = 'name';
$RuleParameter1->Value = 'value';
$RuleParameter2 = new \stdClass();
$RuleParameter2->Name = 'name2';
$RuleParameter2->Value = 'value2';
$ArrayOfRuleParameter = array($RuleParameter1,$RuleParameter2);
$params->RuleParams->Parameters->ArrayOfRuleParameter = (object) $ArrayOfRuleParameter;