Solved

How to generate server interface for wsdl 2.0?

Posted on 2010-08-13
6
1,413 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:
RQuadling 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:RQuadling
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 40

Expert Comment

by:RQuadling
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

759 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now