Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to generate server interface for wsdl 2.0?

Posted on 2010-08-13
6
Medium Priority
?
1,474 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 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
Cyber Threats to Small Businesses (Part 1)

This past May, Webroot surveyed more than 600 IT decision-makers at medium-sized companies to see how these small businesses perceived new threats facing their organizations.  Read what Webroot CISO, Gary Hayslip, has to say about the survey in part 1 of this 2-part blog series.

 
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

Independent Software Vendors: 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!

Question has a verified solution.

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

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 …
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

660 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