Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/24.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 WSDL验证失败。如何使其有效_Php_.net_Web Services_Soap_Wsdl - Fatal编程技术网

Php WSDL验证失败。如何使其有效

Php WSDL验证失败。如何使其有效,php,.net,web-services,soap,wsdl,Php,.net,Web Services,Soap,Wsdl,我创建了一个小的WSDL文件,但验证失败。 验证者说: 服务“PortalService”:端口“PortalPort”指向未定义的绑定 操作“UpdateKunde”的输入元素的消息未定义 操作“UpdateKunde”的输出元素的消息未定义 绑定“PortalBinding”引用未定义的端口类型 我认为问题一定出在这些方面: <xsd:element name="UpdateKunde"> <xsd:complexType>

我创建了一个小的WSDL文件,但验证失败。 验证者说:

  • 服务“PortalService”:端口“PortalPort”指向未定义的绑定
  • 操作“UpdateKunde”的输入元素的消息未定义
  • 操作“UpdateKunde”的输出元素的消息未定义
  • 绑定“PortalBinding”引用未定义的端口类型
我认为问题一定出在这些方面:

    <xsd:element name="UpdateKunde">
        <xsd:complexType>
           <xsd:sequence>
              <xsd:element name="Kunde" minOccurs="1" maxOccurs="unbounded">
                 <xsd:complexType>
                    <xsd:sequence>
                       <xsd:element name="Lastchange" type="xsd:dateTime" />
                       <xsd:element name="Vorname" minOccurs="0" type="xsd:string" />
                       <xsd:element name="Nachname" minOccurs="0" type="xsd:string" />                 
                    </xsd:sequence>
                 </xsd:complexType>
              </xsd:element>
           </xsd:sequence>
        </xsd:complexType>
     </xsd:element>   
     <xsd:element name="UpdateKundeResponse">
        <xsd:complexType>
           <xsd:sequence>
              <xsd:element name="Kunde" minOccurs="1" maxOccurs="unbounded">
                 <xsd:complexType>
                    <xsd:sequence>
                       <xsd:element name="Kundennummer" type="xsd:unsignedInt" />
                       <xsd:element name="Statuscode" type="xsd:int" />
                       <xsd:element name="Statusbeschreibung" minOccurs="0" type="xsd:string" />   
                    </xsd:sequence>
                 </xsd:complexType>
              </xsd:element>
           </xsd:sequence>
        </xsd:complexType>
     </xsd:element>

<wsdl:message name="UpdateKunde">
  <wsdl:part element="tns:UpdateKunde" name="UpdateKunde" />
</wsdl:message>
<wsdl:message name="UpdateKundeResponse">
  <wsdl:part element="tns:UpdateKundeResponse" name="UpdateKundeResponse" />
</wsdl:message>

<wsdl:portType name="PortalPortType">
  <wsdl:operation name="UpdateKunde">
     <wsdl:input message="tns:UpdateKunde" />
     <wsdl:output message="tns:UpdateKundeResponse" />
  </wsdl:operation>
</wsdl:portType>

 <wsdl:binding name="PortalBinding" type="tns:PortalPortType">
  <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
  <wsdl:operation name="UpdateKunde">
     <soap:operation style="document" soapAction="" />
     <wsdl:input>
        <soap:body use="literal" />
     </wsdl:input>
     <wsdl:output>
        <soap:body use="literal" />
     </wsdl:output>
  </wsdl:operation>
</wsdl:binding>
<wsdl:service name="PortalService">
  <wsdl:port name="PortalPort" binding="tns:PortalBinding">
     <soap:address location="##########" />
  </wsdl:port>
</wsdl:service>

soap地址存在,但不允许我显示它。
我希望有人知道我做错了什么。

过了一段时间,我找到了解决办法。我的WSDL的头一定有问题。使用此标题时,一切正常: