• 欢迎访问开心洋葱网站,在线教程,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站,欢迎加入开心洋葱 QQ群
  • 为方便开心洋葱网用户,开心洋葱官网已经开启复制功能!
  • 欢迎访问开心洋葱网站,手机也能访问哦~欢迎加入开心洋葱多维思维学习平台 QQ群
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏开心洋葱吧~~~~~~~~~~~~~!
  • 由于近期流量激增,小站的ECS没能经的起亲们的访问,本站依然没有盈利,如果各位看如果觉着文字不错,还请看官给小站打个赏~~~~~~~~~~~~~!

Guidance of SOAP

VC/MFC/Windows 弦苦 1526次浏览 0个评论

What is a Web Service?

Web Services Standards(XML -based)

SOAP(Simple Object Access Protocol)

-WSDL(Web Service Description Language)

-UDDI(Universal Description,Discovery,Integration)

-WS-I(Integration),WS-Policy,WS-Security,etc.

http://searchwebservices.techtarget.com/searchWebServices/downloads/what_is_soap.swf

What is SOAP

It is a simple Protocol that allows you to Access an Object across th Net.

When software developers create systems,they rely on calling procedures to provide needed functionality.

A collection of related procedures are packaged into an object.

Objects can be created in such a way that they can be re-used by different systems and different developers.

However,objects are typically platform specific.

An object created on one platform is not always easily accessible to software written for other platforms.

Furthermore,calling methods from objects distributed across the Internet is difficult.

Current distributed object technologies require the use of special ports to transmit their data.

However,most corporate firewalls prevent the use of all ports except 80,the default port for HTTP.

Most system adminitrators fear opening other ports could pose a potential security problem.

What is needed is…

1.A platform-independent way to call methods located on diverse distributed systems.

2.A firewall-friendly way to make remote procedure calls over the internet.

(And it would be nice if it was lightweight and easy to understand.)

SOAP to the rescue

Able to cross platform boundries like a speeding bullet.

(SOAP uses XML to be platform-agnostic)

Able to leap through firewalls in a single bound.

(XML Documents can easily be transported via HTTP through firewalls without security risks.)

What SOAP does

Messages are (typically) sent in a familiar Request/Response fashion.

SOAP defines an XML structure to call a method and pass that mehod parameters.

SOAP also defines an XML structure to return values that were requested.

SOAP defines an XML structure to return error values (faults) if the service provider can not execute the requested method.

客户端通过SOAP传递XML structure参数给服务器端指定的Method,服务器端调用Method后返回相应的XML structure结果给客户端。它实际上市利用HTTPXML来完成远程调用(Remote Procedure).

What SOAP doesn’t do

The SOAP specification does not define how a message ,once received,will create an instance of an object and excute the method.

Again,implementation details are left to the software developer or a third party software vendor.

Software vendors are already creating this “plumbing” so software developers can concentrate on implementing the business rules.

Creating a request

In this example,”My software” will call the “AddTwoNumbers” function that resides on a server across the Internet.

通过互联网远程调用服务器端的函数。

My software” composes a SOAP message and will use HTTP to actually send it.

The message looks like this…

<?xml version=”1.0″>

<soap:Envelope xmlns:soap=”url:schemas.xmlsoap-org:soap.v1″>

  <soap:Body >

    <AddTwoNumbers>

      <FirstNumber>5</FirstNumber>

      <SecondNumber>3</SecondNumber>

    </AddTwoNumbers>

  </soap:Body>

</soap:Envelope>

Imbedded within the SOAP Envelope tags,there is a tag for the method name and tags for the parameters.

Between the opening and closing parameter tags are the actual values that will be sent to the method.

Creating a Response

The message is received on the remote server.Once received, the object is created and the method is called ,sending along two parameters.

Once the method is finished processing,it creates a SOAP message to send the result back to “My Software”.

The message looks like this…

<?xml version=”1.0″>

<soap:Envelope xmlns:soap=”url:schemas.xmlsoap-org:soap.v1″>

<soap:Body>

    < AddTwoNumbersResponse>

      <Value>8</Value>

    </AddTwoNumbersResponse>

  </soap:Body>

</soap: Envelope >

The message contains the name of the response,and the value of the response.

This message is returned to “My software” where it is processed.

Guidance of SOAP

 

What is SOAP

http://searchsoa.techtarget.com/sDefinition/0,,sid26_gci214295,00.html

SOAP (Simple Object Access Protocol) is a way for a program running in one kind of operating system (such as Windows 2000) to communicate with a progam in the same or another kind of an operating system (such as Linux) by using the World Wide Web’s Hypertext Transfer Protocol (HTTP)and its EXtensible Markup Language (XML) as the mechanisms for information exchange. Since Web protocols are installed and available for use by all major(主要) operating system platforms, HTTP and XML provide an already at-hand solution to the problem of how programs running under different operating systems in a network can communicate with each other. SOAP specifies exactly how to encode(编码) an HTTP header and an XML file so that a program in one computer can call a program in another computer and pass it information. It also specifies how the called program can return a response.

SOAP was developed by Microsoft, DevelopMentor, and Userland Software and has been proposed(被提议) as a standard interface to the Internet Engineering Task Force (IETF). It is somewhat similar to the Internet Inter-ORB Protocol (IIOP), a protocol that is part of the Common Object Request Broker Architecture (CORBA). Sun Microsystems’ Remote Method Invocation(请求) (RMI) is a similar client/server interprogram protocol between programs written in Java.

An advantage of SOAP is that program calls are much more likely to get through firewall servers that screen out(筛选出) requests other than those for known applications (through the designated port mechanism). Since HTTP requests are usually allowed through firewalls, programs using SOAP to communicate can be sure that they can communicate with programs anywhere.


开心洋葱 , 版权所有丨如未注明 , 均为原创丨未经授权请勿修改 , 转载请注明Guidance of SOAP
喜欢 (0)

您必须 登录 才能发表评论!

加载中……