Non .NET Web Services - How do I consume

D

Darren.Ratcliffe

Hi Everyone

I went on a lovely Microsoft course a fortnight ago, which served as an
introduction to ASP.NET - I think it was Course 6310. And there was a
good module on consuming XML Web Services.

However, we only covered how to consume Web Services created in
ASP.NET.

What do you do if they weren't done in .NET? Because the supplier we
are working with has written them in another platform. Should there
still be a .wsdl file for them?

Alternatively, do I have to use a .NET equivalent of XMLHTTP get?

Many thanks guys - I hope in a couple of months time I can be helping
out people in the same situation as me :)

Thanks

Daz
 
M

Marina Levit [MVP]

I believe yes, if there is a WSDL file, then you can consume it.

For XMLHTTP equivalent in the .net framework look at the WebRequest class.
 
J

John Timney \( MVP \)

Theres should be WSDL if they have written them correctly and are publishing
the WSDL file, that does not mean it will be publically available. For
anything that does not have a WSDL available you can generate your own but
its a fiddly exercise.

If you need to create one of your own, I would start by reading this
article:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwebsrv/html/understandWSDL.asp

An poor mans alternative is to issue a GET query (if the service accepts the
protocol) and parse manually the results.
 
D

Darren.Ratcliffe

Thanks John (and Marina)

The documentation I have on the API states: "Each request must consist
of a HTTP request...it must be a HTTP post message"

I will follow them up with some questions about this, as for a massive
massive company, it doesn't quite seem right to me!! However, they do
describe what they are offering as "WebServiceIntegration". So there's
some hope!!

Many thanks

Darren
 
T

tdavisjr

Web Services <> Soap Web Services. Some people issue public API's that
use HTTP GET and HTTP POST and refer to them as Web Services. They are
web services, however, not SOAP web services which is a new comer.
 
D

Darren.Ratcliffe

Hi John

Further to your message yesterday, all I got back from them was "we
don't provide a WSDL file because we provide DTDs". I have requested
that they develop WSDLs but I won't build my hopes up!!!
 
J

John Timney \( MVP \)

You cannot simply convert a DTD to a WSDL file. WSDLs define both the data
structure of a document and the interfaces available to allow date to be
exchanged. A DTD will only give you the data structure, so you'll have to
hand create the WSDL file.

I have heard of people using XML Spy to convert a supplied DTD into a
Schema, which is then placed into the relevent types section of a basic
WSDL, allowing the web service methods to be referenced and a proxy compiled
from the resulting WSDL, but I aint never done it myself.
 
G

gerry

I think that maybe you trying to drive a screw with a hammer.
From the way you are describing things , it sounds like you are talking
about a simple 'web service' that simply returns a payload which happens to
be an xml document, this is completely unrelated to soap web services which
is how you are trying to access it. You should be using a simple WebRequest
to access this service and processing the returned data as you would any
other xml document - in which case, although perhaps not absolutely ideal, a
DTD should work just fine.

Gerry
 
D

Darren.Ratcliffe

Thanks Gerry - this is pretty much the conclusion that I have come to -
simple WebRequests it shall be!

:)

Daz

Thanks again to everyone for helping out.
 

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

Top