免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2357 | 回复: 4
打印 上一主题 下一主题

封装soap协议问题,请教各位大侠 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-07-20 10:59 |只看该作者 |倒序浏览
1、WebService 名称:ProductInfoSearch.asmx
2、GPRS查询:
public string GetPublicSearchInfo(string labelNumber, string ID);
功能:查询产品的一般信息
部署位置为:http://200.192.104.167/ProductInfoSearch/ProductInfoSearch.asmx
这是需求。
现在我要封装成协议包发送出去,该封装成什么样子?
这是网络例子:
POST /StockQuote HTTP/1.1
Host: www.stockquoteserver.com
Content-Type: text/xml; charset="utf-8"
Content-Length: nnnn
SOAPAction: "Some-URI"
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
<SOAP-ENV:Body>
<m:GetLastTradePriceDetailed
xmlns:m="Some-URI">
<Symbol>DEF</Symbol>
<Company>DEF Corp</Company>
<Price>34.1</Price>
</m:GetLastTradePriceDetailed>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

但我不知针对我这个具体情况,该封装成什么样子才是正确的。

论坛徽章:
0
2 [报告]
发表于 2007-07-20 12:56 |只看该作者
用c的话有gsoap包

论坛徽章:
0
3 [报告]
发表于 2007-07-20 14:17 |只看该作者
不是在pc机的

论坛徽章:
0
4 [报告]
发表于 2007-07-20 21:25 |只看该作者
POST /AnimalProductInfoSearch/AnimalProductInfoSearch.asmx HTTP/1.1            
Host: 210.192.114.167                                                            
Content-Type: text/xml; charset=utf-8                                          
Content-Length: 391                                                            
SOAPAction: "http://att.org/GetPublicSearchInfo"                                
                                                                                
<?xml version="1.0" encoding="utf-8"?>                                          
<soap:Envelope xmlnssi="http://www.w3.org/2001/XMLSchema-instance" xmlnssd="
http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/en
velope/">                                                                       
<soap:Body>                                                                     
<GetPublicSearchInfo xmlns="http://att.org/">                                   
<labelNumber>10001110000000001001</labelNumber>                                 
<ID>test</ID>                                                                  
</GetPublicSearchInfo>                                                         
</soap:Body>                                                                    
</soap:Envelope>

大家帮我看看这个报文哪里出错

论坛徽章:
0
5 [报告]
发表于 2007-07-20 21:28 |只看该作者
总是返回http/1.1 400
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP