Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Custom tool warnings when using VS2010 service reference

I am trying to get going on using First Data's Global Gateway Web Service API. The first strange thing is that I need to download the wsdl and xsd files to my local machine. Then use the local machine's copy for the service reference. I haven't used many web services, so I figured that was okay.

After adding them and try to compile it I get the following errors:

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

I tried the "Reuse types in referenced assemblies" mentioned in many places and that doesn't fix it. Has anyone come across this error? How did you fix it?

like image 932
Mike Wills Avatar asked Dec 27 '22 15:12

Mike Wills


1 Answers

I found this answer that seems to at least let me continue working. In the mean time, I am open for other ideas.

Update: Quoting the answer for ease of finding it:

Try adding it as .NET 2.0 Web Reference.

Go to Add Service Reference, then click the "Advanced" button. Then you're given to option to add it as a .NET 2.0 Web Reference. I did this, and got it to work. I couldn't via the standard "Add Service Reference"

like image 183
Mike Wills Avatar answered Jan 31 '23 16:01

Mike Wills