Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Webservices - SOAP vs. "XML over HTTP"

I have a general web services question and I'm hoping you can help me clear up my confusion on the subject.

I am working with a web service that the host is calling an "XML over HTTP service". They claim that this service is NOT a SOAP service, yet the response is a SOAP envelope response. The service is currently invoked via HTML form post; here is the HTML form and response:

HTML:

<FORM name=TestForm action=http://intranet/TheWSMethod enctype="text/plain" method="POST">
    <TEXTAREA name=Data rows=22 cols=91 type="text" style="position: absolute; left: 78; top: 69; width:752px; height:330px"></TEXTAREA>
    <INPUT type=xml> 
    <INPUT type=submit value="Transmit">
</FORM>

RESPONSE - SOAP Based?

<?xml version="1.0" encoding="UTF-8" ?> 
<soapenv:Fault xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> 
    <faultcode>soap-env:Server</faultcode> 
    <faultstring>9001</faultstring> 
    <faultactor>/TheWSMethod</faultactor> 
    <detail> ... </detail> 
</soapenv:Fault>

The host tells me that there is no WSDL for this process, which is where my confusion begins.

So my question is, whether or not there is/should be an existing WSDL? (i.e. are they pulling my leg or do they not understand what I am asking) or is it possible to not have a WSDL for this type of service?

like image 745
user891859 Avatar asked May 09 '12 17:05

user891859


2 Answers

SOAP is just a specialization of XML over HTTP and that response you posted does indeed look like a SOAP response (a SOAP fault actually).

This looks like a big misunderstanding, so don't assume they are pulling your leg. Try asking your question in a different way.

As for the WSDL, if this is indeed a 100% SOAP web service, do note that it is not mandatory to have a WSDL for a SOAP web service.

A web service is just an application that exposes a set of operations over the network. In order to call these operations you need to know what their name is, what parameters they expect, what types the parameters have etc, so that you know how to build your client stub.

This means the web service needs to be documented or else you would not know how to write the code that interact with the web service. This documentation can be a Word document or a PDF and you could build the client manually from that (which involves writing a lot of plumbing code for that client stub of yours) OR the documentation could be a WSDL file which unlike a PDF or Word document can be fed to a tool to generate the stub plumbing code for you automatically.

The WSDL describes the web service - and it's good practice to provide one - but the web service exists separately from the WSDL.

like image 72
Bogdan Avatar answered Oct 18 '22 03:10

Bogdan


WSDL is mainly a locator to the web service. You can optionally generate client classes from it using some tool to access the web service.

like image 36
rajiv Avatar answered Oct 18 '22 03:10

rajiv