Webservices - SOAP and XML over HTTP

I have a general question regarding web services, and I hope that you can help me sort out my confusion about this issue.

I am working with a web service that a host calls an XML service through HTTP. They claim that this service is NOT a SOAP service , but the response is a response from a SOAP envelope. The service is currently being called via an HTML form post; here is the HTML form and answer:

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> 

ANSWER - based on SOAP?

 <?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 where my confusion begins.

So my question is: does / should there be an existing WSDL? (that is, they pull my leg or don’t understand what I’m asking), or is it possible not to have WSDL for this type of service?

+6
source share
2 answers

SOAP is just a specialization of XML over HTTP, and this answer you posted really looks like a SOAP ( SOAP fault ) response.

This seems like a big misunderstanding, so don’t think that they are pulling your foot. Try to ask your question differently.

Regarding WSDL, if it is indeed a 100% SOAP web service, note that it is not necessary to have a WSDL for the SOAP web service .

A web service is simply an application that provides a set of operations over the network. To invoke these operations, you need to know what their name is, what parameters they expect, what types of parameters they have, etc. So that you know how to create a client stub .

This means that the web service must be documented, otherwise you do not know how to write code that interacts with the web service. This documentation can be a Word or PDF document, and you can manually create a client from this (which involves writing a lot of plumbing code for your client stub) OR the documentation can be WSDL , which, unlike a PDF or Word document, can be sent into a tool to automatically generate an authorization code.

WSDL describes a web service - and it is good practice to provide one, but the web service exists separately from WSDL.

+14
source

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

+1
source

Source: https://habr.com/ru/post/915311/


All Articles