Php (客户机)SOAP-ERROR:编码:对象';t';工作编号';财产

Php (客户机)SOAP-ERROR:编码:对象';t';工作编号';财产,php,web-services,soap,wsdl,Php,Web Services,Soap,Wsdl,我是web服务新手,遇到了一个(对我来说)奇怪的问题。我一直在找工作 “[客户端]SOAP-ERROR:编码:对象没有“作业编号”属性” 在wsdl中包含以下行时出错: <xs:element name="SEARCH_ARRAY" type="ns:SEARCH_CRITERIA" /> 我的wsdl设置如下: <wsdl:definitions name = "doli" targetNamespace="https://client.installs.com/app

我是web服务新手,遇到了一个(对我来说)奇怪的问题。我一直在找工作

“[客户端]SOAP-ERROR:编码:对象没有“作业编号”属性”

在wsdl中包含以下行时出错:

<xs:element name="SEARCH_ARRAY" type="ns:SEARCH_CRITERIA" />

我的wsdl设置如下:

<wsdl:definitions
name = "doli"
targetNamespace="https://client.installs.com/app/hhgregg_home_delivery/doli-client.wsdl"
xmlns:ns="https://client.installs.com/app/hhgregg_home_delivery/doli-client.wsdl"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:soap = "http://schemas.xmlsoap.org/wsdl/soap/">

`

<wsdl:types>
    <xs:schema 
        targetNamespace="https://client.installs.com/app/hhgregg_home_delivery/doli-client.wsdl"
        xmlns:xs="http://www.w3.org/2001/XMLSchema">
        <!-- Job Info element -->
        <xs:complexType name='SEARCH_CRITERIA'>
            <xs:sequence minOccurs='1'>
                <xs:element name="JOB_NUMBER" type="xs:string" minOccurs='1' />
                <xs:element name='ZIP_CODE'   type='xs:string' minOccurs='1'/>
            </xs:sequence>
        </xs:complexType>

        <!--  Define the STOPS element with all child elements -->
        <xs:complexType name='STOPS'>
            <xs:sequence minOccurs='1'>
                <xs:element name='CURRENT_STOP'  type='xs:integer' minOccurs='0'/>
                <xs:element name='CUSTOMER_STOP' type='xs:integer' minOccurs='0' />
                <xs:element name='TOTAL_STOPS'   type='xs:integer' minOccurs='0' />
            </xs:sequence>
        </xs:complexType>

        <!-- Define the delivery window -->
        <xs:complexType name = 'WINDOW'>
            <xs:sequence minOccurs='1'>
                <xs:element name='START' type='xs:time' minOccurs='0'/>
                <xs:element name='END'   type='xs:time' minOccurs='0'/>
            </xs:sequence>      
        </xs:complexType>

        <!-- Define the delivery window -->
        <xs:complexType name = 'JOB_DETAILS'>
            <xs:sequence minOccurs='1'>
                <xs:element name='CLIENT_ORDER_ID' type = 'xs:string' minOccurs='1' />
                <xs:element name='INVENT'          type = 'xs:string' minOccurs='1' />
            </xs:sequence>
        </xs:complexType>

        <xs:complexType name = 'CUSTOMER'>
            <xs:sequence minOccurs = '1'>
                <xs:element name='CUST_F_NAME'  type='xs:string' minOccurs='1' />
                <xs:element name='CUST_L_NAME'  type='xs:string' minOccurs='1' />
                <xs:element name='CUST_ADDR1'   type='xs:string' minOccurs='1' />
                <xs:element name='CUST_ADDR2'   type='xs:string' minOccurs='0' />
                <xs:element name='CUST_ADDR3'   type='xs:string' minOccurs='0' />

            </xs:sequence>
        </xs:complexType>

        <xs:complexType name = 'JOB'>
            <xs:sequence minOccurs = '1'>
                <xs:element name='stop'            type='ns:STOPS' />
                <xs:element name='window'          type='ns:WINDOW' />
                <xs:element name='job_details'     type='ns:JOB_DETAILS' />
                <xs:element name='customer'        type='ns:CUSTOMER' />
            </xs:sequence>
        </xs:complexType>


        <xs:element name="SEARCH_ARRAY" type="ns:SEARCH_CRITERIA" />
        <xs:element name="JOB_OVERVIEW" type="ns:JOB" />

    </xs:schema>
</wsdl:types>


<wsdl:message name="JobMsg">
    <wsdl:part element="ns:SEARCH_ARRAY" name="job_request"/>
</wsdl:message>
<wsdl:message name="JobResponseMsg">
    <wsdl:part element="ns:JOB_OVERVIEW" name="job_response"/>
</wsdl:message>


<wsdl:portType name          = "JobInfoPortType">
    <wsdl:operation name     = 'retrieveJob'>
        <wsdl:input message  = "ns:JobMsg"/>
        <wsdl:output message = "ns:JobResponseMsg" />
    </wsdl:operation>
</wsdl:portType>

<wsdl:binding type = "ns:JobInfoPortType" name="JobInfoBinding">  
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>  
    <wsdl:operation name="retrieveJob"> 
        <soap:operation soapAction = "" />
        <wsdl:input>
            <soap:body parts="job_request" use="literal"/>
        </wsdl:input>
        <wsdl:output>
            <soap:body parts="job_response" use="literal"/>
        </wsdl:output>
    </wsdl:operation>

</wsdl:binding>     

<wsdl:service name = "JobInfoService">
    <wsdl:port name = "JobInfoPort" binding = "ns:JobInfoBinding">
        <soap:address location = "https://client.installs.com/app/hhgregg_home_delivery/" />
    </wsdl:port>
</wsdl:service>

`
`

如果我不加评论

<xs:element name="SEARCH_ARRAY" type="ns:SEARCH_CRITERIA" />

它不再抛出错误

其他类似的帖子并没有真正直接解决这个问题(从我所能找到的情况来看)

非常感谢您的帮助和指导。

minOccurs=“0”
设置为不需要。我相信,未指定时,默认值为1


没问题。我正在处理一个错误,在阅读中遇到了这个问题,所以我碰巧知道答案:)