2013-01-21 32 views
0

我試圖創建一個具有以下WSDL文件SOAP服務器SOAP,WSDL未知的輸入/輸出

<?xml version="1.0" encoding="UTF-8"?> 
<wsdl:definitions xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:i0="http://ws.aramex.net/ShippingAPI/v1" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:tns="http://ws.aramex.net/ShippingAPI/v1/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://localhost/API" name="Edfa3lyAPI"> 
    <wsdl:types> 
     <xsd:schema targetNamespace="http://localhost/API" elementFormDefault="qualified"> 
      <xsd:element name="AddProductRequest"> 
       <xsd:complexType> 
        <xsd:sequence> 
         <xsd:element type="tns:Product" name="Product" nillable="true" minOccurs="0"/> 
        </xsd:sequence> 
       </xsd:complexType> 
      </xsd:element> 
      <xsd:complexType name="Product"> 
       <xsd:all>   
        <xsd:element name="quantity" type="xsd:integer" nillable="true"/> 
        <xsd:element name="itemName" type="xsd:string" nillable="true"/> 
        <xsd:element name="URL" type="xsd:string" nillable="true"/> 
        <xsd:element name="pricePerItem" type="xsd:float" nillable="true"/> 
        <xsd:element name="categoryId" type="xsd:integer" nillable="true"/> 
        <xsd:element name="color" type="xsd:string" nillable="true"/> 
        <xsd:element name="size" type="xsd:string" nillable="true"/> 
        <xsd:element name="domesticShippingAndTaxes" type="xsd:float" nillable="true"/> 
       </xsd:all> 
      </xsd:complexType> 
      <xsd:element type="tns:Product" name="Product" nillable="true"/> 
      <xsd:element name="AddProductResponse"> 
       <xsd:complexType> 
        <xsd:sequence> 
         <xsd:element minOccurs="0" name="HasErrors" type="xsd:boolean" /> 
         <xsd:element maxOccurs="10" minOccurs="0" name="error" type="xsd:string" /> 
        </xsd:sequence> 
       </xsd:complexType> 
      </xsd:element> 
     </xsd:schema> 
    </wsdl:types> 

    <wsdl:message name="AddProductRequest"> 
     <wsdl:part name="parameters" element="tns:AddProductRequest" /> 
    </wsdl:message> 
    <wsdl:message name="AddProductResponse"> 
     <wsdl:part name="parameters" element="tns:AddProductResponse" /> 
    </wsdl:message> 

    <wsdl:portType name="Edfa3lyAPIPort"> 
     <wsdl:operation name="AddProduct"> 
      <wsdl:input message="tns:AddProductRequest"/> 
      <wsdl:output message="tns:AddProductResponse"/> 
     </wsdl:operation> 
    </wsdl:portType> 
    <wsdl:binding name="Edfa3lyAPIBinding" type="i0:Edfa3lyAPIPort"> 
     <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/> 
      <wsdl:operation name="AddProduct"> 
       <soap:operation style="document" soapAction="http://localhost/API"/> 
        <wsdl:input name="tns:AddProductRequest"> 
         <soap:body use="literal"/> 
        </wsdl:input> 
        <wsdl:output name="tns:AddProductResponse"> 
         <soap:body use="literal"/> 
        </wsdl:output> 
      </wsdl:operation> 
    </wsdl:binding> 
    <wsdl:service name="Edfa3lyAPIService"> 
     <wsdl:port name="Edfa3lyAPIPort" binding="tns:Edfa3lyAPIBinding"> 
      <soap:address location="http://localhost/API"/> 
     </wsdl:port> 
    </wsdl:service> 

</wsdl:definitions> 

但我們從來沒有我試圖讓

Array 
(
    [0] => UNKNOWN AddProduct(UNKNOWN $parameters) 
) 
Array 
(
    [0] => struct AddProductRequest { 
Product Product; 
} 
    [1] => struct Product { 
integer quantity; 
string itemName; 
string URL; 
float pricePerItem; 
integer categoryId; 
string color; 
string size; 
float domesticShippingAndTaxes; 
} 
    [2] => struct AddProductResponse { 
boolean HasErrors; 
string error; 
} 
) 

我試了變化,但仍然是UNKNOWN的事情出現我也嘗試了不同的解決方案,對於同樣的情況沒有成功

+0

請明確您的所作所爲。 – Sven

+0

我想$函數= $客戶端 - > __ getFunctions();, –

+0

但是,沒關係,我用另一個定義,它的工作

回答

1

解決方案是使用正確的定義

<wsdl:definitions name ="Edfa3lyAPI" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://localhost/API" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:targetNamespace="http://localhost/API">