SOAP and Spring

I just finished reading about SOAP through Spring-WS in "Spring in Action," Second Edition, Craig Walls of Manning Publications Co. They write about the contract first, like Spring documents, by creating an XML message and an XML method, and then converting it to XSD, and then again to WSDL, following the sort and maintenance route in Spring.

I have to admit, I'm not sure. Why is this a better way than, say, creating a service interface and creating my service based on this interface? This is pretty close to defining my REST @Controllers in Spring3. Do I have options for navigating this way using SOAP web services with Spring?

Also: I would like to duplicate an existing web service. I have a WSDL and I can host my service instead. Is this recommended at all? If so, what is the recommended approach?

Greetings

Nik
+3
source share
2 answers

I think you should cross your wires.

A contract first means defining a WSDL, and then creating Java code to support that WSDL.

The last contract means creating your Java code and creating WSDL later.

The danger with the last contract is that your WSDL is automatically generated from your Java code, and you reorganize your Java code, this leads to a change in the WSDL.

Spring-WS only supports contract in the first place

2.3.1. Fragility

, - - (WSDL XSD) Java- ( ). , . , Java , .

, SOAP - Java. SOAP- ( - ), - .

-, , , .

, , . , .

+6

, Java , , .

, - , -XML. Spring - docs , XML- Java .NET.

Spring , . , " ". , , , , .

+3

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


All Articles