Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

How to create a webservice from a given WSDL in VS2010 vb.net

Posted on 2012-08-16
4
Medium Priority
?
1,100 Views
Last Modified: 2012-08-21
Hello,

I've been given a (set of) wsdl file(s) with about 40 xsd files, which are included in the wsdl (and xsd, complete tree-structure).

I need to create a webservice so the other party can send standardised messages to consume my webservice.

I'm using Visual Studio 2010 with vb.net.

I've been trying to use wsdl.exe and svcutil.exe to create the classes I need, but both keep giving error messages. From what I've read, I should use svcutil. But somehow svcutil has problems with the load of xsd-files, I've already added all subdirectories with *.xsd to the command, so it looks like:

svcutil /t:code "D:\service.wsdl" "D:\xsd\folder1\*.xsd" "D:\xsd\folder2\*.xsd" /l:vb 

Open in new window

Instead of /t:code I also used /mc and /dataContractOnly, but to no avail.

Any suggestions?
0
Comment
Question by:DBIC
  • 3
4 Comments
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 38299939
Usually WSDL files are given by the vendor of the webservices to the consumer not the other way round and those exes are used to generate the client side proxies for consuming those services not to generate the service itself.
0
 

Author Comment

by:DBIC
ID: 38299956
I know, but this is really the other way round. They have their own services which send out messages, which should be consumed by their customers. The customer (for whom we are building the webservice) receives the messages and then can handle the contents as he wishes (for example import in a customer specific application).

So I need to create the webservice with standard interface, based on the wsdl and xsd files.
0
 

Accepted Solution

by:
DBIC earned 0 total points
ID: 38300154
I got it to work. Wrote out all paths to all 62 individual xsd files, excluded 1 that caused errors and tried again. Finally the vb files were created. I tried the /mc and /t:code options. /dataContractOnly still gave errors.
Now I'll have to figure out the differences between the generated vb-files and decide which one to use... And see if I can split the code into several files, because one vb-file with over 32000 lines is a bit big to handle.

But the main thing of this question is solved.
0
 

Author Closing Comment

by:DBIC
ID: 38315440
Figured out how to do it myself, as stated in my solution.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Suggested Courses

564 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