`
iloveflower
  • 浏览: 78950 次
社区版块
存档分类
最新评论
  • iloveflower: 呵呵。好好学习。。。。。。。。。。。。
    java 读书
  • Eric.Yan: 看了一点,不过是电子版的……你这一说到提醒我了,还要继续学习哈 ...
    java 读书

SOAP1.1 SOAP1.2 or simple http sample

阅读更多
SOAP 1.1
The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.


POST /globalweather.asmx HTTP/1.1
Host: www.webservicex.net
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://www.webserviceX.NET/GetCitiesByCountry"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetCitiesByCountry xmlns="http://www.webserviceX.NET">
      <CountryName>string</CountryName>
    </GetCitiesByCountry>
  </soap:Body>
</soap:Envelope>


HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetCitiesByCountryResponse xmlns="http://www.webserviceX.NET">
      <GetCitiesByCountryResult>string</GetCitiesByCountryResult>
    </GetCitiesByCountryResponse>
  </soap:Body>
</soap:Envelope>

************************************************************
SOAP 1.2
The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.

POST /globalweather.asmx HTTP/1.1
Host: www.webservicex.net
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <GetCitiesByCountry xmlns="http://www.webserviceX.NET">
      <CountryName>string</CountryName>
    </GetCitiesByCountry>
  </soap12:Body>
</soap12:Envelope>


HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <GetCitiesByCountryResponse xmlns="http://www.webserviceX.NET">
      <GetCitiesByCountryResult>string</GetCitiesByCountryResult>
    </GetCitiesByCountryResponse>
  </soap12:Body>
</soap12:Envelope>

****************************************************************
HTTP GET
The following is a sample HTTP GET request and response. The placeholders shown need to be replaced with actual values.

GET /globalweather.asmx/GetCitiesByCountry?CountryName=string HTTP/1.1
Host: www.webservicex.net

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<string xmlns="http://www.webserviceX.NET">string</string>
HTTP POST
The following is a sample HTTP POST request and response. The placeholders shown need to be replaced with actual values.

POST /globalweather.asmx/GetCitiesByCountry HTTP/1.1
Host: www.webservicex.net
Content-Type: application/x-www-form-urlencoded
Content-Length: length

CountryName=string
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<string xmlns="http://www.webserviceX.NET">string</string>
分享到:
评论

相关推荐

    Axis 下的 WebService例子

    在Axis中,我们可以创建两种类型的Web服务:SOAP 1.1和SOAP 1.2。Axis提供了简单的API和命令行工具,使得开发者可以快速地生成服务端点和客户端代理代码。接下来,我们将通过一个简单的例子来了解如何使用Axis创建和...

    SOAP源码Probe

    SOAP(Simple Object Access Protocol)是一种基于XML的协议,用于在Web服务中交换结构化和类型化的信息。SOAP源码Probe是用于调试和分析SOAP消息的一个工具,尤其对初学者而言,它提供了深入理解Web服务工作原理的...

    soap-proxy-sample

    【标题】"soap-proxy-sample" 是一个基于JavaScript的SOAP(Simple Object Access Protocol)代理示例项目,它主要用于在客户端和SOAP服务之间建立通信桥梁。SOAP是一种用于交换结构化信息的协议,常用于Web服务,...

    Spring + axis2 开发 webservice

    Axis2支持SOAP 1.1和1.2,以及RESTful风格的服务。它允许开发者通过简单的API快速创建Web服务,同时支持多种传输协议如HTTP、HTTPS和JMS。 3. **创建Web服务**:在Spring和Axis2结合的环境中,开发者首先会创建一个...

    soap-sample.rar_Web服务器_Visual_C++_

    【标题】"soap-sample.rar" 是一个包含使用Visual C++实现Web服务器示例的压缩包,其中涉及到的技术核心是GSOAP。GSOAP是一个开源库,主要用于构建SOAP(Simple Object Access Protocol)服务,允许C和C++程序员开发...

    Web Services实例sample

    Apache Axis2是Apache SOAP(Simple Object Access Protocol)引擎的第二代产品,它支持多种协议,如SOAP、RESTful HTTP、WS-Security等,并且与多种数据格式兼容,如XML、JSON。在Axis2中,你可以将Java对象直接...

    agoncal-sample-jaxws:有关SOAP Web服务的样本

    在Java世界中,JAX-WS(Java API for XML Web Services)是一种标准的、基于注解的API,用于创建SOAP(Simple Object Access Protocol)Web服务。它简化了服务的开发、部署和消费过程,使得XML消息的交换变得更加...

    WebService设计总结 Sample代码

    它主要基于SOAP(Simple Object Access Protocol)协议进行通信,SOAP消息是封装在HTTP请求中的XML文档,确保了平台无关性。 2. **WSDL(Web Service Description Language)**:定义WebService接口的关键文件是...

    webservice sample

    在Web服务的世界里,主要的协议和技术包括SOAP(Simple Object Access Protocol)、WSDL(Web Services Description Language)和UDDI(Universal Description, Discovery, and Integration)。SOAP是一种XML格式的...

    cxf sample

    CXF是一个开源的Java框架,它提供了丰富的工具和API来帮助开发者构建和部署SOAP(Simple Object Access Protocol)和RESTful(Representational State Transfer)Web服务。 【描述】在"CXF Sample"中,我们可能会...

    DocSample2.rar

    Web服务通常使用SOAP(Simple Object Access Protocol)协议,这是一种基于XML的协议,用于在不同系统间传递结构化数据。因此,我们的任务是构建一个客户端,该客户端能够生成和解析SOAP消息,以调用Web服务的接口。...

    my_gsoap.rar_gsoap_gsoap 服务

    gSOAP(Generic SOAP)是一个开源库,用于生成C和C++代码,使开发者能够轻松地构建基于SOAP(Simple Object Access Protocol)的网络服务。SOAP是一种XML格式,用于在分布式环境中交换结构化信息,通常用于Web服务。...

    J2EE.application_Sample.rar_jsme

    3. **Web服务**:通过SOAP(Simple Object Access Protocol)或RESTful API提供服务。 4. **JavaServer Faces (JSF)**:是一种用于构建用户界面的MVC(Model-View-Controller)框架,简化了创建动态、交互式的Web...

    gsoap_2.8.3 最新版本

    gSOAP(Generic SOAP)是一个开源的C/C++软件开发工具包,用于构建网络服务和客户端应用程序,支持SOAP(Simple Object Access Protocol)协议。SOAP是一种基于XML的通信协议,用于在Web上交换结构化的和类型化的...

    wcf service sample code for c#

    WCF服务是基于SOAP(Simple Object Access Protocol)协议的,可以使用HTTP、TCP、命名管道等多种传输方式。服务通过接口定义其操作,客户端通过绑定与服务进行通信。服务的配置文件(通常是*.config)中定义了服务...

    SOA Using java web servcice 随书源码

    Java Web服务则是实现SOA的一种常见技术手段,基于开放标准如SOAP(Simple Object Access Protocol)和WSDL(Web Services Description Language)。 【描述】"services oriented architecture using java web ...

Global site tag (gtag.js) - Google Analytics