WEB开发网
开发学院软件开发Python Python Web 服务开发者 第 6 部分: Python SOAP 库... 阅读

Python Web 服务开发者 第 6 部分: Python SOAP 库,第 2 部分

 2007-03-29 12:12:35 来源:WEB开发网   
核心提示: $ python curse-zsi.pyWhat captain Haddock had to say: "Polygraphs!"在 ZSI 中启用调试和跟踪相当容易,只要把 tracefile=sys.stdout 参数传递给 Binding 初始化器就可以了,P
$ python curse-zsi.py
What captain Haddock had to say: "Polygraphs!"

在 ZSI 中启用调试和跟踪相当容易。只要把 tracefile=sys.stdout 参数传递给 Binding 初始化器就可以了。这样修改之后,样本 ZSI 会话看起来与此类似:

$ python curse-zsi-trace.py
_________________________________ Thu Jan 31 10:25:09 2002 REQUEST:
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ZSI="http://www.zolera.com/schemas/ZSI/" >
<SOAP-ENV:Body>
<Curse id="822b6dc">
<LangCode id="81089d0" xsi:type="xsd:string">us</LangCode>
</Curse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
_________________________________ Thu Jan 31 10:25:10 2002 RESPONSE:
Server: Microsoft-IIS/5.0
Date: Thu, 31 Jan 2002 17:18:37 GMT
Content-Type: text/xml
Content-Length: 524
Content:
<?xml version="1.0" encoding='UTF-8'?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/1999/XMLSchema"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<NS1:CurseResponse xmlns:NS1="urn:HaddockIntf-IHaddock"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<NS1:return xsi:type="xsd:string">Sea-lice!</NS1:return>
</NS1:CurseResponse>
</SOAP-ENV:Body></SOAP-ENV:Envelope>
What captain Haddock had to say: "Sea-lice!"

上一页  1 2 3 4 5 6 7  下一页

Tags:Python Web 服务

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接