creating ASP .NET webservice from WSDL file

E

Edward

hello dear Group!

I need very much to create an ASP .NET webservice out of
a WSDL file - it is enough if I would have just empty
skeleton webservice that would be working in .NET!!!!

input: WSDL file of the webservice (quite complicated,
with complex types in return)

output: webservice in ASP .NET that works - i.e. method
calls are returning something or noething - I can fill
them with functionality.

is there a method to do it, some trick? some wizard? some
helper program?

yours sincerely, Edward.
 
S

Sami Vaaraniemi

Edward said:
hello dear Group!

I need very much to create an ASP .NET webservice out of
a WSDL file - it is enough if I would have just empty
skeleton webservice that would be working in .NET!!!!

input: WSDL file of the webservice (quite complicated,
with complex types in return)

output: webservice in ASP .NET that works - i.e. method
calls are returning something or noething - I can fill
them with functionality.

is there a method to do it, some trick? some wizard? some
helper program?

yours sincerely, Edward.

Hi,

Try wsdl.exe /server <path or URL to WSDL file>. This will generate code for
an abstract web service class with web methods that correspond to the WSDL.
You'll need to derive a class from this abstract class and implement the
body for the abstract methods yourself.

Regards,
Sami
 
D

Dino Chiesa [Microsoft]

what I would do is convert the generated abstract class to a concrete class
(by removing "abstract" keyword) and then fill in the implementation. This
is because the asp.net webservices runtime depends on attributes that are
applied to classes to modify its behavior in serialization and so on. The
generated abstract class will have all the right attributes. But a derived
class will not have those attributes, and the asp.net runtime doesn't
inspect the ancestors to sniff for the attributes. So if you inherit from
the generated abstract you must also cut-n-paste the generated attributes.
At this point it is probably easier to just convert it to concrete.

Be careful about re-generating though - you could lose your changes if you
are not careful.

-Dino
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top