2012-09-03 7 views
6


Visual Studio 2010を使用してWebサービスクライアントを作成しようとしています。 バージョンSOAP V2のwsdlファイルを使用すると、クライアントはうまく動作します。
MagentoでWS-I ComplianceYesに設定し、VS2010でWebサービスクライアントを再コンパイルすると、動作しません。いくつかのメソッドは、結果として生じるWSDLファイルから消えます。
WS-I準拠モードでWebサービスクライアントを生成する

ツールwsimportを使用してJava Webサービスクライアントを生成すると、同じ問題が発生しています。
何が起こっているか考えてみましょうか?

答えて

2

オリジナルのMagento Coreコードに、 "catalogProductAttributeRemove"(モジュールコア/ Mage/Catalog)操作に関連する間違いがあります。それを解決するために

VS2010を使用してWebサービスクライアントの自動建物は完璧に動作した後、私はモジュールのカタログ

<!--wsdl:operation name="catalogProductAttributeRemove"> 
    <wsdl:documentation>Delete attribute</wsdl:documentation> 
    <wsdl:input message="typens:catalogProductAttributeRemoveRequest" /> 
    <wsdl:output message="typens:catalogProductAttributeRemoveResponse" /> 
</wsdl:operation--> 

のwsi.xmlファイルに次の操作をコメントしました!

4

同じ問題が発生しましたが、catalogProductAttributeRemoveをコメントアウトする代わりに、実際に何が欠落していたかを調べ、追加のセクションをwsi.xmlファイルに追加しました。 Juanma R.のおかげで、修正が必要なファイルの方向に私を向けることができました。

これを修正するために他のセクションが存在する必要があるかもしれない参照ポイントとして、catalogProductAttributeCreateのエントリを参照しました。私は実際にWSDLについて何も知りませんが、欠落しているものを探してみました。

ファイルを変更した後、私はMagentoのすべてのキャッシュをリフレッシュし、新しいエントリが/index.php/api/v2_soap?wsdl=1のWSDLファイルに表示されていることを確認しました。その後、VS 2010に追加されたWeb参照を削除し、再度Web参照を追加する手順を実行しました。今回は、追加した後、エラーは表示されません。

MagentoのバージョンはMagento Enterprise 1.12.0.2ですが、この同じエラーをcatalogProductAttributeRemoveで表示する他のバージョンにも当てはまると思います。ここで

は私がwsi.xmlファイルで変更するもので走った迅速な差分である:

*** Z:\mage-1-12-0-2.dev\htdocs\app\code\core\Mage\Catalog\etc\wsi - Copy.xml backup Tue Jul 3 12:08:31 2012 UTC 
--- Z:\mage-1-12-0-2.dev\htdocs\app\code\core\Mage\Catalog\etc\wsi.xml Fri Nov 9 18:40:58 2012 UTC 
*************** 
*** 1509,1520 **** 
        <xsd:complexType> 
         <xsd:sequence> 
          <xsd:element minOccurs="1" maxOccurs="1" name="result" type="xsd:string" /> 
         </xsd:sequence> 
        </xsd:complexType> 
       </xsd:element> 
      </xsd:schema> 
     </wsdl:types> 
     <wsdl:message name="catalogProductCurrentStoreRequest"> 
      <wsdl:part name="parameters" element="typens:catalogProductCurrentStoreRequestParam" /> 
     </wsdl:message> 
     <wsdl:message name="catalogProductCurrentStoreResponse"> 
--- 1509,1540 ---- 
        <xsd:complexType> 
         <xsd:sequence> 
          <xsd:element minOccurs="1" maxOccurs="1" name="result" type="xsd:string" /> 
         </xsd:sequence> 
        </xsd:complexType> 
       </xsd:element> 
+ 
+   
+ <!-- Added by Matt Johnson 2012-11-09 to fix VS 2010 support of SOAP reference --> 
+   <xsd:element name="catalogProductAttributeRemoveRequestParam"> 
+    <xsd:complexType> 
+     <xsd:sequence> 
+      <xsd:element minOccurs="1" maxOccurs="1" name="sessionId" type="xsd:string" /> 
+      <xsd:element minOccurs="1" maxOccurs="1" name="attribute" type="xsd:string" /> 
+     </xsd:sequence> 
+    </xsd:complexType> 
+   </xsd:element> 
+   <xsd:element name="catalogProductAttributeRemoveResponseParam"> 
+    <xsd:complexType> 
+     <xsd:sequence> 
+      <xsd:element minOccurs="1" maxOccurs="1" name="result" type="xsd:boolean" /> 
+     </xsd:sequence> 
+    </xsd:complexType> 
+   </xsd:element> 
+   
+   
      </xsd:schema> 
     </wsdl:types> 
     <wsdl:message name="catalogProductCurrentStoreRequest"> 
      <wsdl:part name="parameters" element="typens:catalogProductCurrentStoreRequestParam" /> 
     </wsdl:message> 
     <wsdl:message name="catalogProductCurrentStoreResponse"> 
*************** 
*** 1883,1894 **** 
     <wsdl:message name="catalogProductAttributeCreateRequest"> 
      <wsdl:part name="parameters" element="typens:catalogProductAttributeCreateRequestParam" /> 
     </wsdl:message> 
     <wsdl:message name="catalogProductAttributeCreateResponse"> 
      <wsdl:part name="parameters" element="typens:catalogProductAttributeCreateResponseParam" /> 
     </wsdl:message> 
     <wsdl:portType name="{{var wsdl.handler}}PortType"> 
      <wsdl:operation name="catalogCategoryCurrentStore"> 
       <wsdl:documentation>Set_Get current store view</wsdl:documentation> 
       <wsdl:input message="typens:catalogCategoryCurrentStoreRequest" /> 
       <wsdl:output message="typens:catalogCategoryCurrentStoreResponse" /> 
      </wsdl:operation> 
--- 1903,1923 ---- 
     <wsdl:message name="catalogProductAttributeCreateRequest"> 
      <wsdl:part name="parameters" element="typens:catalogProductAttributeCreateRequestParam" /> 
     </wsdl:message> 
     <wsdl:message name="catalogProductAttributeCreateResponse"> 
      <wsdl:part name="parameters" element="typens:catalogProductAttributeCreateResponseParam" /> 
     </wsdl:message> 
+ 
+ <!-- Added by Matt Johnson 2012-11-09 to fix VS 2010 support of SOAP reference --> 
+ <wsdl:message name="catalogProductAttributeRemoveRequest"> 
+  <wsdl:part name="parameters" element="typens:catalogProductAttributeRemoveRequestParam" /> 
+ </wsdl:message> 
+ <wsdl:message name="catalogProductAttributeRemoveResponse"> 
+  <wsdl:part name="parameters" element="typens:catalogProductAttributeRemoveResponseParam" /> 
+ </wsdl:message> 
+ 
     <wsdl:portType name="{{var wsdl.handler}}PortType"> 
      <wsdl:operation name="catalogCategoryCurrentStore"> 
       <wsdl:documentation>Set_Get current store view</wsdl:documentation> 
       <wsdl:input message="typens:catalogCategoryCurrentStoreRequest" /> 
       <wsdl:output message="typens:catalogCategoryCurrentStoreResponse" /> 
      </wsdl:operation> 
*************** 
*** 2760,2771 **** 
        <soap:body use="literal" /> 
       </wsdl:input> 
       <wsdl:output> 
        <soap:body use="literal" /> 
       </wsdl:output> 
      </wsdl:operation> 
     </wsdl:binding> 
     <wsdl:service name="{{var wsdl.name}}Service"> 
      <wsdl:port name="{{var wsdl.handler}}Port" binding="typens:{{var wsdl.handler}}Binding"> 
       <soap:address location="{{var wsdl.url}}" /> 
      </wsdl:port> 
     </wsdl:service> 
--- 2789,2814 ---- 
        <soap:body use="literal" /> 
       </wsdl:input> 
       <wsdl:output> 
        <soap:body use="literal" /> 
       </wsdl:output> 
      </wsdl:operation> 
+ 
+ 
+ <!-- Added by Matt Johnson 2012-11-09 to fix VS 2010 support of SOAP reference -->   
+  <wsdl:operation name="catalogProductAttributeRemove"> 
+   <soap:operation soapAction="" /> 
+   <wsdl:input> 
+    <soap:body use="literal" /> 
+   </wsdl:input> 
+   <wsdl:output> 
+    <soap:body use="literal" /> 
+   </wsdl:output> 
+  </wsdl:operation> 
+  
+  
     </wsdl:binding> 
     <wsdl:service name="{{var wsdl.name}}Service"> 
      <wsdl:port name="{{var wsdl.handler}}Port" binding="typens:{{var wsdl.handler}}Binding"> 
       <soap:address location="{{var wsdl.url}}" /> 
      </wsdl:port> 
     </wsdl:service> 
2

私はバージョン1.7.2からwsi.xmlに差分を含めるとhereそれをアップロードしました。

diffを正しく読み取れない場合は、このファイルを直接使用できます。

関連する問題