代码改变世界

推翻MMSOA与WEBService,使用MEMBRANE soap Monitor检查 wsdl文件。

2011-10-11 20:46  沐海  阅读(1220)  评论(0编辑  收藏  举报

    Local   port:8080
       Destination   host:localhost
       Destination   port:80
Soap Toolkit是客户端和服务器中的一座桥,local   port是Soap   Toolkit的监听端口(所以80端口一般不能使用,除非特殊设定),凡是经过local   port的请求都会被截下来,然后由Soap   Toolkit转发到Destination   host:Destination   port去。
       所以,Web Services Client要将端口指定到Trace   Utility的local   port(任意设定一个端口),Trace   Utility的Destination   port指定到WebService的端口。这样,就可以截获Soap消息了。

 

事实上,上面的就是c/s都在一台机器上的。后来在使用的时候发现,SOAP TOOLKIT3.0不适用于WS-Addressing,桥的作用将会导致SOAP消息投递失败。如果使用了WS-Addressing,且使用.NET的话,直接用VS提供的工具,如果是AXIS2,当然直接用SOAP MONITOR了。

我现在在使用soap toolkit3.0进行web services消息监听的时候,发现它显示的是:“无法显示 XML 页。
使用 样式表无法查看 XML 输入。请更正错误然后单击 刷新按钮,或以后重试。
--------------------------------------------------------------------------------
该位置上不应存在结束标记。处理资源 'file:///C:/Documents and Settings/Administrator/Local Settings/Temp/MSSOAPT.1/M10.xml' 时出错。第 1 行,位置: 3
</Message>

也是因为 soap toolkit3.0不适合ws-addressing;

+++++++++++++++++++++++++++++++++++++++++++++++

 

所以为了在本机上调试。我使用JAVA开发的 Membrane SOAP monitor 。

 

1.安装JAVA

2.image

 

3.让他监听9000这个端口。指向23032端口。

4.   WEB.CONFIG里写入 “9000”

<appSettings>
<add key="SecurityURL" value="http://localhost:9000/Service1.asmx" />
</appSettings>

 

5.IE地址访问 9000的,

 

image

 

6.看到

image

7.看细节<soap:Envelope xmlns:xsi=……  好了

 

image

记录生活、工作、学习点滴!
E-Mail:mahaisong@hotmail.com 欢迎大家讨论。
沐海博客园,我有一颗,卓越的心!