我们公司在做一个项目,接口是去调用别的公司的接口,他们的接口是soap形式的。 我想问的是,soap 除了用WebService方式
还有其它的什么形式吗?我们去调的时候应该以什么方式去调呢?别的公司提供的借口文档里面只是写了类似这种实例
SOAP 请求:
POST /InStock HTTP/1.1
Host: www.example.org
Content-Type: application/soap+xml; charset=utf-8
Content-Length: nnn<?xml version="1.0"?>
<soap:Envelope
xmlns:soap="http://www.w3.org/2001/12/soap-envelope"
soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> <soap:Body xmlns:m="http://www.example.org/stock">
<m:GetStockPrice>
<m:StockName>IBM</m:StockName>
</m:GetStockPrice>
</soap:Body>
</soap:Envelope>
SOAP 响应:
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: nnn<?xml version="1.0"?>
<soap:Envelope
xmlns:soap="http://www.w3.org/2001/12/soap-envelope"
soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> <soap:Body xmlns:m="http://www.example.org/stock">
<m:GetStockPriceResponse>
<m:Price>34.5</m:Price>
</m:GetStockPriceResponse>
</soap:Body>
</soap:Envelope>
还有其它的什么形式吗?我们去调的时候应该以什么方式去调呢?别的公司提供的借口文档里面只是写了类似这种实例
SOAP 请求:
POST /InStock HTTP/1.1
Host: www.example.org
Content-Type: application/soap+xml; charset=utf-8
Content-Length: nnn<?xml version="1.0"?>
<soap:Envelope
xmlns:soap="http://www.w3.org/2001/12/soap-envelope"
soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> <soap:Body xmlns:m="http://www.example.org/stock">
<m:GetStockPrice>
<m:StockName>IBM</m:StockName>
</m:GetStockPrice>
</soap:Body>
</soap:Envelope>
SOAP 响应:
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: nnn<?xml version="1.0"?>
<soap:Envelope
xmlns:soap="http://www.w3.org/2001/12/soap-envelope"
soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> <soap:Body xmlns:m="http://www.example.org/stock">
<m:GetStockPriceResponse>
<m:Price>34.5</m:Price>
</m:GetStockPriceResponse>
</soap:Body>
</soap:Envelope>
解决方案 »
- 在jboos中通过addurl远程部署程序无法成功的问题
- 有谁知道怎么将jsp做的网页由动态转化为静态吗
- 如何实现网页在线聊天
- 如何修改tomcat中root下的index.jsp为我自己的index.jsp
- spring 事务配置报错的问题,急。。。
- 有关取到javascript里的变量值进数据库的问题。急,在线等。
- [求助]数据库更新[求助]数据库更新[求助]数据库更新[求助]数据库更新
- 如何判断用户关闭的是属于该用户和服务器会话的最后一个页面(或浏览器窗口)
- 请教java反射机制的问题
- java验证LDAP问题????????????
- 使用pdfbox怎么获得pdf的总页数?
- 关于论坛的页面地址栏变换问题。
soap一般通过http,https,jms传输
还是把它生成类,然后去调用?
那不是相当麻烦。
不是还一种叫着 wsdl 的东东么如果soap要以xml方式来解,那他们用soap不是多此一举?本人对soap很菜,只是讨论,有见笑之处,望见谅 ^ ^