Solved

How to generate server interface for wsdl 2.0?

Posted on 2010-08-13
6
1,444 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 40

Accepted Solution

by:
Richard Quadling earned 500 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Report: Liquid Web beats Amazon, Rackspace & More

A study by performance analyst firm Cloud Spectator finds that Liquid Web beats rivals Amazon, Rackspace and DigitalOcean when it comes to website and cloud application performance.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Visitor to Web site (Log showing Strange IP Address) 9 130
Problem to page 4 103
.php tree directory? 5 95
asp Google Map 2 89
Preface In the first article: A Better Website Login System (http://www.experts-exchange.com/A_2902.html) I introduced the EE Collaborative Login System and its intended purpose. In this article I will discuss some of the design consideratio…
The task of choosing a web design company to build a website for your business should never be taken in a light manner. Provided the fact that your website will act as a representative to your business and will be responsible for imposing an online …
The viewer will learn how to count occurrences of each item in an array.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

739 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