Web service versus form publication

I have 2 websites (www.mysite1.com and myweb2.com, both sites are in ASP.NET with the SQL server as the backend), and I want to transfer data from one site to another. Now I am confused whether to use a web service or form publishing (from mysite1 to a page in myweb2)

Can someone tell me the pros and cons of both?

+3
source share
6 answers

Webservices SOAP messages (SOAP uses XML to send messages back and forth), so your server must understand SOAP and any extensions that you want to talk about between them, and they are likely (but not necessarily) to infect WMDL files (which "explains" the various service endpoints and remote functionality). Usually we call this SOAP / WS- * stack with an emphasis on "stack", since there are several bits of software that should be available, and the more complex SOAP calls, the more this stack needs to be available and supported.

POST, , RESTful behaviors, HTTP. POST , , XML, , , POST HTTP . - , , , - HTTP-. , . HATEOAS , , SOAP, ; HTTP , . SOAP , ----stuffed kinda . ( , . , SOA ROA.:)

, "", : " , , , , , , , (), , ". Eh, .

, , SOAP - ; SOAP - , , , HTML, . HTTP , SOAP XML. SOAP HTML? , , , SOAP HTTP (, , , ), HTTP , , . , HTTP (, SOAP), , .

- , . webservices ( , 1200 ), , (.. , ) POST ( GET) . HTTP, , , , HTTP- , , , application/xml + myformat (, , application/x-xml + myformat, ). , 200, .

. (WS- * stack) , . - , .

+3

- , - SOAP?

. , SOAP (). , , SOAP , .

+5

, - . :

  • -, (-) .
  • cookie .
  • , , webservice , . , .
  • ( ), , , , ( -)

, . / .

+1

, -, , .

, , , , -.

- , , "" ?

0

- ( WCF). , ( ), .

0

AlexanderJohannesen, SOAP - RESTful APIs , , , asp.net, , SOAP -. , Visual Studio -, , , .

, , -, VS. - . , , [WebMethod], .

[WebMethod]
public void AddComment(int UserId, string Comment) {
  // do stuff
}

, tst.myweb2.com.

(www.myweb1.com) " -", URL- -, " ". -, . , .

0

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


All Articles