Why can't I create client code from this WSDL file in Visual Studio?

I am trying to encode a .NET client for cleverreach API (WSDL file: http://api.cleverreach.com/soap/interface_v4.php?wsdl , documentation at http://api.cleverreach.com/soap/interface_v4.php ) in Visual Studio 2010.

The problem is that no matter what I do there, it is not possible to create C # code for this API.

I tried both ways - adding a service link and a web link. In both cases, there was no code created for the API methods (something like createList or addBatch).

I also tried using the command line:

svcutil.exe / language: cs /out:GeneratedProxy.cs /config:app.config http://api.cleverreach.com/soap/interface_v4.php?wsdl

This just gives me an error message:

File generation ... Warning: no code has been generated. If you tried to generate a client, this may be because the metadata documents do not contain valid contracts or services or because all contracts / services were found to exist in / reference assemblies. Make sure you transfer all the metadata to the tool.

When I look at the WSDL file in a web browser, the methods I am looking for are mentioned (e.g. createList). Therefore, I am not sure what is happening.

What I would like to know:

  • Why can't Visual Studio create client code for this web service?
  • How can i solve the problem?

Thank,

Adrian

+3
source share
3 answers

, , , , WSDL . XMLSpy :

Invalid XML schema: 'Attribute 'firstname' is not allowed in element <xsd:element>'

<xsd:element name="firstname" type="xsd:string" firstname="registered"/>

, , .

+2

, , - , wsdl.exe, - Visual Studio WSDL:

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>wsdl http://api.cleverreach.com/soap/interface_v5.1.php?wsdl

, , wsdl, , .

+1

, , .

I tested the service using visual studio, I created a new project (.Net Application) by adding the service at this URL "http://api.cleverreach.com/soap/interface_v4.php?wsdl". Please note that you will need the query string “? Wdsl”), adding a web link, I may have misunderstood your URL in your post, but it looks like you deleted it.

I checked the WSDL file. I tested in VS 2008 and am testing again in 2010.

Hope this helps :)

0
source

All Articles