Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to generate server interface for wsdl 2.0?

Posted on 2010-08-13
6
Medium Priority
?
1,481 Views
Last Modified: 2013-11-19
I am trying to generate  a server interface for a wsdl document that was given to me.  I tried a sample off the web and it give me the same error:

DOS> wsdl /l:cs /si /o:hello.cs hello.wsdl

Microsoft (R) Web Services Description Language Utility
[Microsoft (R) .NET Framework, Version 2.0.50727.42]
Copyright (C) Microsoft Corporation. All rights reserved.

Error: There is an error in XML document (2, 2).
  - <description xmlns='http://www.w3.org/ns/wsdl'> was not expected.

Here is a fragment of hello.wsdl.

<?xml version="1.0"?>
<wsdl:description xmlns:wsdl="http://www.w3.org/ns/wsdl"
  xmlns:wsoap= "http://www.w3.org/ns/wsdl/soap"
  xmlns:hy="http://www.herongyang.com/Service/"
  targetNamespace="http://www.herongyang.com/Service/">

  <wsdl:documentation>
    Hello_WSDL_20_SOAP.wsdl
  </wsdl:documentation>

  <wsdl:types>
  </wsdl:types>
</wsdl:description>

It gets the same error with or without the wsdl: prefix.

Thanks.
 
0
Comment
Question by:DarkVader5
  • 3
  • 3
6 Comments
 
LVL 40

Accepted Solution

by:
Richard Quadling earned 1500 total points
ID: 33438218
First of all, I'm a PHP developer. I use SOAP and WSDL a lot, but I don't know the specifics for .net, but here goes.

http://msdn.microsoft.com/en-us/library/7h3ystb6(VS.71).aspx has the documentation regarding wsdl.exe

I couldn't see /si as an option. /server (to generate abstract server classes - as compared to the normal client classes).

As a PHP user I use a similar wsdl2php (from sourceforge - and with some amendments - see RazorsEdgeUK mods on this project).

OK, not a huge benefit to you, other than perhaps making sure the XML file is valid.

Can you try wsdl against http:// services. bandvulc. co. uk/ Authentication? wsdl (remove spaces).

This is used by my clients, some of which are .net users (I think we have around 80 of them, about 200 Java and 100 or so .PHP users).

If you get the same errors, then it must be something your end that is going on. Or the tool.



Hmmmm...

2.0 though.


2.0 is not yet standardised. V1.1 is much more widespread.

I wonder if the tool you are using is not geared to 2.0 yet?
0
 

Author Comment

by:DarkVader5
ID: 33456854
I tried the tool (wsdlexe from visual studio 2008) using the wsdl above.  It gave me the warnings below, but it also created the client and the server code.  The errors were:

Dos>wsdl http://services.bandvulc.co.uk/Authentication?wsdl

Microsoft (R) Web Services Description Language Utility
[Microsoft (R) .NET Framework, Version 2.0.50727.42]
Copyright (C) Microsoft Corporation. All rights reserved.

Warning: This web reference does not conform to WS-I Basic Profile v1.1.
R2706: A wsdl:binding in a DESCRIPTION MUST use the value of "literal" for the u
se attribute in all soapbind:body, soapbind:fault, soapbind:header and soapbind:
headerfault elements.

  -  Input element soapbind:body of operation 'Authenticate' on portType
      'Camelot_AuthenticationBinding' from namespace 'http://services.bandvulc.co.uk/Authentication'.
  -  Output element soapbind:body of operation 'Authenticate' on portType
      'Camelot_AuthenticationBinding' from namespace 'http://services.bandvulc.co.uk/Authentication'.

  -  Input element soapbind:body of operation 'Login' on portType
      'Camelot_AuthenticationBinding' from namespace 'http://services.bandvulc.co.uk/Authentication'.
  -  Output element soapbind:body of operation 'Login' on portType
      'Camelot_AuthenticationBinding' from namespace 'http://services.bandvulc.co.uk/Authentication'.

  -  Input element soapbind:body of operation 'Logout' on portType
      'Camelot_AuthenticationBinding' from namespace 'http://services.bandvulc.co.uk/Authentication'.
  -  Output element soapbind:body of operation 'Logout' on portType
      'Camelot_AuthenticationBinding' from namespace 'http://services.bandvulc.co.uk/Authentication'.

For more details on the WS-I Basic Profile v1.1, see the specification
at http://www.ws-i.org/Profiles/BasicProfile-1.1.html.

Writing file 'Camelot_AuthenticationService.cs'.

0
 
LVL 40

Expert Comment

by:Richard Quadling
ID: 33459813
Not sure about those errors. I don't know if the errors are important. As it just a warning, it may be OK.

But it shows the use of wsdl.
0
Threat Trends for MSPs to Watch

See the findings.
Despite its humble beginnings, phishing has come a long way since those first crudely constructed emails. Today, phishing sites can appear and disappear in the length of a coffee break, and it takes more than a little know-how to keep your clients secure.

 
LVL 40

Expert Comment

by:Richard Quadling
ID: 33492185
What is the address of the WSDL file you've been given?
0
 

Author Comment

by:DarkVader5
ID: 33515649
The wsdl file that was given to me is not associated with a webservice address.  I think it was created by hand.  I downloaded a third party tool that is able to create the files so I think my problem is solved.

Thanks for your help.
0
 

Author Closing Comment

by:DarkVader5
ID: 33515810
The solution gave me ideas on how to approach the problem, but did not actually resolve it.
Third party tools, Altova Xml Spy and MapForce generated the files that I needed.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

New Relic recently released its Synthetics product that allows for the creation of performance monitors that periodically test a site's performance. If you wish to test an interactive workflow New Relic employs Selenium WebDriverJS to run those test…
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question