2011-08-08 11 views
0

開発したPHPサービスのWSDLを生成しようとしていますが、Visual Studioが正しく解析するWSDLを生成できないようです。WSDLがVisual Studioで正しくインポートされない

認証ヘッダーを要求するにはすべてのWebメソッドが必要で、2つの異なるソリューション(暗黙的および明示的ヘッダー)を試しましたが、いずれも機能していないようです。私はここで紛失している何かが間違っているかもしれないので、私は2つのバージョンのWSDLを残して、誰かがこれを少しでも見てくれることを願っています。

ありがとうございます。

暗黙ヘッダー

<?xml version="1.0" encoding="UTF-8"?><definitions name="voucherManagement" 
targetNamespace="http://[ENV].[MYDOMAIN]/voucherManagement/schema" 
xmlns:tns="http://[ENV].[MYDOMAIN]/voucherManagement.wsdl" 
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:xsd1="http://[ENV].[MYDOMAIN]/voucherManagement/schema" 
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns="http://schemas.xmlsoap.org/wsdl/"> 

<types> 
<schema targetNamespace="http://[ENV].[MYDOMAIN]/voucherManagement/schema" 
xmlns="http://www.w3.org/2001/XMLSchema"> 
<complexType name="voucher"><sequence><element name="voucherID" type="string"/><element name="value" type="string"/><element name="creationDate" type="string"/><element name="expiryDate" type="string"/></sequence></complexType><complexType name="client"><sequence><element name="name" type="string"/><element name="contact" type="string"/><element name="goldClientID" type="string"/><element name="clientID" type="string"/><element name="contractID" type="string"/></sequence></complexType><complexType name="addVoucherInputData"><sequence><element name="voucher" type="xsd1:voucher"/><element name="client" type="xsd1:client"/></sequence></complexType><complexType name="addVoucherOutputData"><sequence><element name="status" type="string"/><element name="reference" type="string"/></sequence></complexType><complexType name="getVoucherInputData"><sequence><element name="voucherID" type="string"/></sequence></complexType><complexType name="voucherInfo"><sequence><element name="reference" type="string"/><element name="value" type="string"/><element name="creationDate" type="string"/><element name="activationDate" type="string"/><element name="expiryDate" type="string"/><element name="usageDate" type="string"/><element name="status" type="string"/><element name="clientID" type="string"/></sequence></complexType><complexType name="getVoucherOutputData"><sequence><element name="voucher" type="xsd1:voucherInfo"/></sequence></complexType><complexType name="voucher"><sequence><element name="voucherID" type="string"/><element name="value" type="string"/><element name="creationDate" type="string"/><element name="expiryDate" type="string"/></sequence></complexType><complexType name="client"><sequence><element name="name" type="string"/><element name="contact" type="string"/><element name="goldClientID" type="string"/><element name="clientID" type="string"/><element name="contractID" type="string"/></sequence></complexType><complexType name="updateVoucherInputData"><sequence><element name="voucher" type="xsd1:voucher"/><element name="client" type="xsd1:client"/></sequence></complexType><complexType name="updateVoucherOutputData"><sequence><element name="status" type="string"/></sequence></complexType><complexType name="removeVoucherInputData"><sequence><element name="voucherID" type="string"/></sequence></complexType><complexType name="removeVoucherOutputData"><sequence><element name="status" type="string"/></sequence></complexType><element name="Authentication"> 
<complexType> 
<sequence> 
<element name="Username" type="string"/> 
<element name="Password" type="string"/> 
</sequence> 
</complexType> 
</element> 
</schema> 
</types> 
<message name="AuthenticationHeader"><part name="request_header" type="xsd1:Authentication"/></message><message name="addVoucherRequest"><part name="addVoucherInputData" type="xsd1:addVoucherInputData"/></message> 
<message name="addVoucherResponse"> 
<part name="addVoucherOutputData" type="xsd1:addVoucherOutputData"/> 
</message><message name="getVoucherRequest"><part name="getVoucherInputData" type="xsd1:getVoucherInputData"/></message> 
<message name="getVoucherResponse"> 
<part name="getVoucherOutputData" type="xsd1:getVoucherOutputData"/> 
</message><message name="updateVoucherRequest"><part name="updateVoucherInputData" type="xsd1:updateVoucherInputData"/></message> 
<message name="updateVoucherResponse"> 
<part name="updateVoucherOutputData" type="xsd1:updateVoucherOutputData"/> 
</message><message name="removeVoucherRequest"><part name="removeVoucherInputData" type="xsd1:removeVoucherInputData"/></message> 
<message name="removeVoucherResponse"> 
<part name="removeVoucherOutputData" type="xsd1:removeVoucherOutputData"/> 
</message> 
<portType name="voucherManagementPort"><operation name="addVoucher"> 
<input message="xsd1:addVoucherRequest"/> 
<output message="xsd1:addVoucherResponse"/> 
</operation><operation name="getVoucher"> 
<input message="xsd1:getVoucherRequest"/> 
<output message="xsd1:getVoucherResponse"/> 
</operation><operation name="updateVoucher"> 
<input message="xsd1:updateVoucherRequest"/> 
<output message="xsd1:updateVoucherResponse"/> 
</operation><operation name="removeVoucher"> 
<input message="xsd1:removeVoucherRequest"/> 
<output message="xsd1:removeVoucherResponse"/> 
</operation></portType> 
<binding name="voucherManagementBinding" type="xsd1:voucherManagementPort"><soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/><operation name="addVoucher"> 
<soap:operation soapAction="addVoucher"/> 
<input name="addVoucherRequest"> 
<soap:header message="xsd1:AuthenticationHeader" part="request_header" use="literal"/> 
<soap:body parts="addVoucherInputData" use="literal"/> 
</input> 
<output> 
<soap:body parts="addVoucherOutputData" use="literal"/> 
</output> 
</operation><operation name="getVoucher"> 
<soap:operation soapAction="getVoucher"/> 
<input name="getVoucherRequest"> 
<soap:header message="xsd1:AuthenticationHeader" part="request_header" use="literal"/> 
<soap:body parts="getVoucherInputData" use="literal"/> 
</input> 
<output> 
<soap:body parts="getVoucherOutputData" use="literal"/> 
</output> 
</operation><operation name="updateVoucher"> 
<soap:operation soapAction="updateVoucher"/> 
<input name="updateVoucherRequest"> 
<soap:header message="xsd1:AuthenticationHeader" part="request_header" use="literal"/> 
<soap:body parts="updateVoucherInputData" use="literal"/> 
</input> 
<output> 
<soap:body parts="updateVoucherOutputData" use="literal"/> 
</output> 
</operation><operation name="removeVoucher"> 
<soap:operation soapAction="removeVoucher"/> 
<input name="removeVoucherRequest"> 
<soap:header message="xsd1:AuthenticationHeader" part="request_header" use="literal"/> 
<soap:body parts="removeVoucherInputData" use="literal"/> 
</input> 
<output> 
<soap:body parts="removeVoucherOutputData" use="literal"/> 
</output> 
</operation></binding> 
<service name="voucherManagement"> 
<documentation>WSDL File for voucherManagement</documentation> 
<port binding="xsd1:voucherManagementBinding" name="voucherManagementPort"> 
<soap:address location="http://[ENV].[MYDOMAIN]/voucherManagement.ws"/> 
</port> 
</service> 
</definitions> 

明示的なヘッダー

<?xml version="1.0" encoding="UTF-8"?><definitions name="voucherManagement" 
targetNamespace="http://[ENV].[MYDOMAIN]/voucherManagement/schema" 
xmlns:tns="http://[ENV].[MYDOMAIN]/voucherManagement.wsdl" 
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:xsd1="http://[ENV].[MYDOMAIN]/voucherManagement/schema" 
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns="http://schemas.xmlsoap.org/wsdl/"> 

<types> 
<schema targetNamespace="http://[ENV].[MYDOMAIN]/voucherManagement/schema" 
xmlns="http://www.w3.org/2001/XMLSchema"> 
<complexType name="voucher"><sequence><element name="voucherID" type="string"/><element name="value" type="string"/><element name="creationDate" type="string"/><element name="expiryDate" type="string"/></sequence></complexType><complexType name="client"><sequence><element name="name" type="string"/><element name="contact" type="string"/><element name="goldClientID" type="string"/><element name="clientID" type="string"/><element name="contractID" type="string"/></sequence></complexType><complexType name="addVoucherInputData"><sequence><element name="voucher" type="xsd1:voucher"/><element name="client" type="xsd1:client"/></sequence></complexType><complexType name="addVoucherOutputData"><sequence><element name="status" type="string"/><element name="reference" type="string"/></sequence></complexType><complexType name="getVoucherInputData"><sequence><element name="voucherID" type="string"/></sequence></complexType><complexType name="voucherInfo"><sequence><element name="reference" type="string"/><element name="value" type="string"/><element name="creationDate" type="string"/><element name="activationDate" type="string"/><element name="expiryDate" type="string"/><element name="usageDate" type="string"/><element name="status" type="string"/><element name="clientID" type="string"/></sequence></complexType><complexType name="getVoucherOutputData"><sequence><element name="voucher" type="xsd1:voucherInfo"/></sequence></complexType><complexType name="voucher"><sequence><element name="voucherID" type="string"/><element name="value" type="string"/><element name="creationDate" type="string"/><element name="expiryDate" type="string"/></sequence></complexType><complexType name="client"><sequence><element name="name" type="string"/><element name="contact" type="string"/><element name="goldClientID" type="string"/><element name="clientID" type="string"/><element name="contractID" type="string"/></sequence></complexType><complexType name="updateVoucherInputData"><sequence><element name="voucher" type="xsd1:voucher"/><element name="client" type="xsd1:client"/></sequence></complexType><complexType name="updateVoucherOutputData"><sequence><element name="status" type="string"/></sequence></complexType><complexType name="removeVoucherInputData"><sequence><element name="voucherID" type="string"/></sequence></complexType><complexType name="removeVoucherOutputData"><sequence><element name="status" type="string"/></sequence></complexType><element name="Authentication"> 
<complexType> 
<sequence> 
<element name="Username" type="string"/> 
<element name="Password" type="string"/> 
</sequence> 
</complexType> 
</element> 
</schema> 
</types> 
<message name="AuthenticationHeader"><part name="request_header" type="xsd1:Authentication"/></message><message name="addVoucherRequest"><part name="addVoucherInputData" type="xsd1:addVoucherInputData"/></message> 
<message name="addVoucherResponse"> 
<part name="addVoucherOutputData" type="xsd1:addVoucherOutputData"/> 
</message><message name="getVoucherRequest"><part name="getVoucherInputData" type="xsd1:getVoucherInputData"/></message> 
<message name="getVoucherResponse"> 
<part name="getVoucherOutputData" type="xsd1:getVoucherOutputData"/> 
</message><message name="updateVoucherRequest"><part name="updateVoucherInputData" type="xsd1:updateVoucherInputData"/></message> 
<message name="updateVoucherResponse"> 
<part name="updateVoucherOutputData" type="xsd1:updateVoucherOutputData"/> 
</message><message name="removeVoucherRequest"><part name="removeVoucherInputData" type="xsd1:removeVoucherInputData"/></message> 
<message name="removeVoucherResponse"> 
<part name="removeVoucherOutputData" type="xsd1:removeVoucherOutputData"/> 
</message> 
<portType name="voucherManagementPort"><operation name="addVoucher"> 
<input message="xsd1:addVoucherRequest"/> 
<output message="xsd1:addVoucherResponse"/> 
</operation><operation name="getVoucher"> 
<input message="xsd1:getVoucherRequest"/> 
<output message="xsd1:getVoucherResponse"/> 
</operation><operation name="updateVoucher"> 
<input message="xsd1:updateVoucherRequest"/> 
<output message="xsd1:updateVoucherResponse"/> 
</operation><operation name="removeVoucher"> 
<input message="xsd1:removeVoucherRequest"/> 
<output message="xsd1:removeVoucherResponse"/> 
</operation></portType> 
<binding name="voucherManagementBinding" type="xsd1:voucherManagementPort"><soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/><operation name="addVoucher"> 
<soap:operation soapAction="addVoucher"/> 
<input name="addVoucherRequest"> 
<soap:header message="xsd1:AuthenticationHeader" part="request_header" use="literal"/> 
<soap:body parts="addVoucherInputData" use="literal"/> 
</input> 
<output> 
<soap:body parts="addVoucherOutputData" use="literal"/> 
</output> 
</operation><operation name="getVoucher"> 
<soap:operation soapAction="getVoucher"/> 
<input name="getVoucherRequest"> 
<soap:header message="xsd1:AuthenticationHeader" part="request_header" use="literal"/> 
<soap:body parts="getVoucherInputData" use="literal"/> 
</input> 
<output> 
<soap:body parts="getVoucherOutputData" use="literal"/> 
</output> 
</operation><operation name="updateVoucher"> 
<soap:operation soapAction="updateVoucher"/> 
<input name="updateVoucherRequest"> 
<soap:header message="xsd1:AuthenticationHeader" part="request_header" use="literal"/> 
<soap:body parts="updateVoucherInputData" use="literal"/> 
</input> 
<output> 
<soap:body parts="updateVoucherOutputData" use="literal"/> 
</output> 
</operation><operation name="removeVoucher"> 
<soap:operation soapAction="removeVoucher"/> 
<input name="removeVoucherRequest"> 
<soap:header message="xsd1:AuthenticationHeader" part="request_header" use="literal"/> 
<soap:body parts="removeVoucherInputData" use="literal"/> 
</input> 
<output> 
<soap:body parts="removeVoucherOutputData" use="literal"/> 
</output> 
</operation></binding> 
<service name="voucherManagement"> 
<documentation>WSDL File for voucherManagement</documentation> 
<port binding="xsd1:voucherManagementBinding" name="voucherManagementPort"> 
<soap:address location="http://[ENV].[MYDOMAIN]/voucherManagement.ws"/> 
</port> 
</service> 
</definitions> 

私はwebMethodsのは、2つの入力構造を持っていることを期待するが、彼らは彼らの入力としてのみユーザー名とパスワードが表示され、の分野であります認証構造。

答えて

0

私はこの問題の答えを見つけたようですので、誰かが同じ問題を抱えた場合に備えて、修正されたWSDLを残します。

各SOAPにstyle = "document"を追加するなど、WSDLのいくつかの部分を変更する必要がありました:操作、各メッセージの下の要素と置き換える、名前の代わりに各メッセージ部分の名前としてパラメータを使用する両方のWSDLを見ると、いくつかの変更の他にも型があります。

<?xml version="1.0" encoding="UTF-8"?> 
<definitions name="voucherManagement" targetNamespace="http://[ENV].[MyDOMAIN]/voucherManagement/schema" xmlns:tns="http://[ENV].[MyDOMAIN]/voucherManagement.wsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsd1="http://[ENV].[MyDOMAIN]/voucherManagement/schema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns="http://schemas.xmlsoap.org/wsdl/"> 
    <types> 
     <schema targetNamespace="http://[ENV].[MyDOMAIN]/voucherManagement/schema" xmlns="http://www.w3.org/2001/XMLSchema"> 
      <element name="voucher" type="xsd1:voucher"/> 
      <complexType name="voucher"> 
       <sequence> 
        <element name="voucherID" type="string"/> 
        <element name="value" type="string"/> 
        <element name="creationDate" type="string"/> 
        <element name="expiryDate" type="string"/> 
       </sequence> 
      </complexType> 
      <element name="client" type="xsd1:client"/> 
      <complexType name="client"> 
       <sequence> 
        <element name="name" type="string"/> 
        <element name="contact" type="string"/> 
        <element name="goldClientID" type="string"/> 
        <element name="clientID" type="string"/> 
        <element name="contractID" type="string"/> 
       </sequence> 
      </complexType> 
      <element name="addVoucherInputData" type="xsd1:addVoucherInputData"/> 
      <complexType name="addVoucherInputData"> 
       <sequence> 
        <element name="voucher" type="xsd1:voucher"/> 
        <element name="client" type="xsd1:client"/> 
       </sequence> 
      </complexType> 
      <element name="addVoucherOutputData" type="xsd1:addVoucherOutputData"/> 
      <complexType name="addVoucherOutputData"> 
       <sequence> 
        <element name="status" type="string"/> 
        <element name="reference" type="string"/> 
       </sequence> 
      </complexType> 
      <element name="getVoucherInputData" type="xsd1:getVoucherInputData"/> 
      <complexType name="getVoucherInputData"> 
       <sequence> 
        <element name="voucherID" type="string"/> 
       </sequence> 
      </complexType> 
      <element name="voucherInfo" type="xsd1:voucherInfo"/> 
      <complexType name="voucherInfo"> 
       <sequence> 
        <element name="reference" type="string"/> 
        <element name="value" type="string"/> 
        <element name="creationDate" type="string"/> 
        <element name="activationDate" type="string"/> 
        <element name="expiryDate" type="string"/> 
        <element name="usageDate" type="string"/> 
        <element name="status" type="string"/> 
        <element name="clientID" type="string"/> 
       </sequence> 
      </complexType> 
      <element name="getVoucherOutputData" type="xsd1:getVoucherOutputData"/> 
      <complexType name="getVoucherOutputData"> 
       <sequence> 
        <element name="voucher" type="xsd1:voucherInfo"/> 
       </sequence> 
      </complexType> 
      <element name="updateVoucherInputData" type="xsd1:updateVoucherInputData"/> 
      <complexType name="updateVoucherInputData"> 
       <sequence> 
        <element name="voucher" type="xsd1:voucher"/> 
        <element name="client" type="xsd1:client"/> 
       </sequence> 
      </complexType> 
      <element name="updateVoucherOutputData" type="xsd1:updateVoucherOutputData"/> 
      <complexType name="updateVoucherOutputData"> 
       <sequence> 
        <element name="status" type="string"/> 
       </sequence> 
      </complexType> 
      <element name="removeVoucherInputData" type="xsd1:removeVoucherInputData"/> 
      <complexType name="removeVoucherInputData"> 
       <sequence> 
        <element name="voucherID" type="string"/> 
       </sequence> 
      </complexType> 
      <element name="removeVoucherOutputData" type="xsd1:removeVoucherOutputData"/> 
      <complexType name="removeVoucherOutputData"> 
       <sequence> 
        <element name="status" type="string"/> 
       </sequence> 
      </complexType> 
      <element name="Compression" type="string"> 
</element> 
      <element name="Encryption" type="string"> 
</element> 
      <element name="Authentication"> 
       <complexType> 
        <sequence> 
         <element name="Username" type="string"/> 
         <element name="Password" type="string"/> 
        </sequence> 
       </complexType> 
      </element> 
     </schema> 
    </types> 
    <message name="AuthenticationHeader"> 
     <part name="request_header" element="xsd1:Authentication"/> 
    </message> 
    <message name="CompressionHeader"> 
     <part name="header_compression" element="xsd1:Compression"/> 
    </message> 
    <message name="EncryptionHeader"> 
     <part name="header_encryption" element="xsd1:Encryption"/> 
    </message> 
    <message name="addVoucherRequest"> 
     <part name="parameters" element="xsd1:addVoucherInputData"/> 
    </message> 
    <message name="addVoucherResponse"> 
     <part name="parameters" element="xsd1:addVoucherOutputData"/> 
    </message> 
    <message name="getVoucherRequest"> 
     <part name="parameters" element="xsd1:getVoucherInputData"/> 
    </message> 
    <message name="getVoucherResponse"> 
     <part name="parameters" element="xsd1:getVoucherOutputData"/> 
    </message> 
    <message name="updateVoucherRequest"> 
     <part name="parameters" element="xsd1:updateVoucherInputData"/> 
    </message> 
    <message name="updateVoucherResponse"> 
     <part name="parameters" element="xsd1:updateVoucherOutputData"/> 
    </message> 
    <message name="removeVoucherRequest"> 
     <part name="parameters" element="xsd1:removeVoucherInputData"/> 
    </message> 
    <message name="removeVoucherResponse"> 
     <part name="parameters" element="xsd1:removeVoucherOutputData"/> 
    </message> 
    <portType name="voucherManagementPort"> 
     <operation name="addVoucher"> 
      <input message="xsd1:addVoucherRequest"/> 
      <output message="xsd1:addVoucherResponse"/> 
     </operation> 
     <operation name="getVoucher"> 
      <input message="xsd1:getVoucherRequest"/> 
      <output message="xsd1:getVoucherResponse"/> 
     </operation> 
     <operation name="updateVoucher"> 
      <input message="xsd1:updateVoucherRequest"/> 
      <output message="xsd1:updateVoucherResponse"/> 
     </operation> 
     <operation name="removeVoucher"> 
      <input message="xsd1:removeVoucherRequest"/> 
      <output message="xsd1:removeVoucherResponse"/> 
     </operation> 
    </portType> 
    <binding name="voucherManagementBinding" type="xsd1:voucherManagementPort"> 
     <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> 
     <operation name="addVoucher"> 
      <soap:operation soapAction="addVoucher" style="document"/> 
      <input> 
       <soap:header message="xsd1:AuthenticationHeader" part="request_header" use="literal"/> 
       <soap:body use="literal"/> 
      </input> 
      <output> 
       <soap:body use="literal"/> 
      </output> 
     </operation> 
     <operation name="getVoucher"> 
      <soap:operation soapAction="getVoucher" style="document"/> 
      <input> 
       <soap:header message="xsd1:AuthenticationHeader" part="request_header" use="literal"/> 
       <soap:body use="literal"/> 
      </input> 
      <output> 
       <soap:body use="literal"/> 
      </output> 
     </operation> 
     <operation name="updateVoucher"> 
      <soap:operation soapAction="updateVoucher" style="document"/> 
      <input> 
       <soap:header message="xsd1:AuthenticationHeader" part="request_header" use="literal"/> 
       <soap:body use="literal"/> 
      </input> 
      <output> 
       <soap:body use="literal"/> 
      </output> 
     </operation> 
     <operation name="removeVoucher"> 
      <soap:operation soapAction="removeVoucher" style="document"/> 
      <input> 
       <soap:header message="xsd1:AuthenticationHeader" part="request_header" use="literal"/> 
       <soap:body use="literal"/> 
      </input> 
      <output> 
       <soap:body use="literal"/> 
      </output> 
     </operation> 
    </binding> 
    <service name="voucherManagement"> 
     <documentation>WSDL File for voucherManagement WebService</documentation> 
     <port binding="xsd1:voucherManagementBinding" name="voucherManagementPort"> 
      <soap:address location="http://[ENV].[MyDOMAIN]/voucherManagement.ws"/> 
     </port> 
    </service> 
</definitions> 
関連する問題