Solved

How to generate server interface for wsdl 2.0?

Posted on 2010-08-13
6
1,418 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

To properly understand GitHub, let’s divide it into two words ‘Git’ and ‘Hub’. Git is basically a ‘Distribution Version Control’ (DVC) and ‘Source Code Management’ (SCM) system widely used by software programmers while Hub means the efficient centre…
In order to have all security and back ups taken care of, WordPress users can sign up for services with WP Engine.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

867 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

19 Experts available now in Live!

Get 1:1 Help Now