4

FirstDataのGlobalGatewayWebServiceAPIを使い続けようとしています。最初の奇妙なことは、wsdlファイルとxsdファイルをローカルマシンにダウンロードする必要があることです。次に、ローカルマシンのコピーをサービス参照に使用します。私はあまりWebサービスを使用したことがないので、それで問題ないと思いました。

それらを追加してコンパイルしようとすると、次のエラーが発生します。

Warning 1   Custom tool warning: Cannot import wsdl:portType
Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.XmlSerializerMessageContractImporter
Error: There was a problem loading the XSD documents provided: a reference to a schema element with name 'AVSResponse' and namespace 'http://secure.linkpt.net/fdggwsapi/schemas_us/fdggwsapi' could not be resolved because the element definition could not be found in the schema for targetNamespace 'http://secure.linkpt.net/fdggwsapi/schemas_us/fdggwsapi'. Please check the XSD documents provided and try again.
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://secure.linkpt.net/fdggwsapi/schemas_us/fdggwsapi']/wsdl:portType[@name='FDGGWSApiOrder'] C:\Documents and Settings\user\my documents\visual studio 2010\Projects\sltnProcessCreditCard\ProcessCreditCard\Service References\ServiceReference\Reference.svcmap    1   1   ProcessCreditCard

Warning 2   Custom tool warning: Cannot import wsdl:binding
Detail: There was an error importing a wsdl:portType that the wsdl:binding is dependent on.
XPath to wsdl:portType: //wsdl:definitions[@targetNamespace='http://secure.linkpt.net/fdggwsapi/schemas_us/fdggwsapi']/wsdl:portType[@name='FDGGWSApiOrder']
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://secure.linkpt.net/fdggwsapi/schemas_us/fdggwsapi']/wsdl:binding[@name='FDGGWSApiOrderBinding']   C:\Documents and Settings\user\my documents\visual studio 2010\Projects\sltnProcessCreditCard\ProcessCreditCard\Service References\ServiceReference\Reference.svcmap    1   1   ProcessCreditCard

Warning 3   Custom tool warning: Cannot import wsdl:port
Detail: There was an error importing a wsdl:binding that the wsdl:port is dependent on.
XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='http://secure.linkpt.net/fdggwsapi/schemas_us/fdggwsapi']/wsdl:binding[@name='FDGGWSApiOrderBinding']
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://secure.linkpt.net/fdggwsapi/schemas_us/fdggwsapi']/wsdl:service[@name='FDGGWSApiOrderService']/wsdl:port[@name='FDGGWSApiOrderPort'] C:\Documents and Settings\user\my documents\visual studio 2010\Projects\sltnProcessCreditCard\ProcessCreditCard\Service References\ServiceReference\Reference.svcmap    1   1   ProcessCreditCard

多くの場所で言及されている「参照されるアセンブリでタイプを再利用する」を試しましたが、修正されません。誰かがこのエラーに遭遇しましたか?どのように修正しましたか?

4

1 に答える 1

10

少なくとも仕事を続けさせてくれるような答えを見つけました。その間、私は他のアイデアを受け入れています。

更新:答えを見つけやすくするために答えを引用します:

.NET2.0Webリファレンスとして追加してみてください。

[サービス参照の追加]に移動し、[詳細]ボタンをクリックします。次に、それを.NET2.0Webリファレンスとして追加するオプションが表示されます。私はこれを行い、それを機能させました。標準の「サービス参照の追加」を経由できませんでした

于 2011-08-29T16:23:39.050 に答える