如何用soap发送html片断?
小弟现在在使用webservice.htc,用它从客户端通过脚本语言来调用webservice,但是用这个东东有一个问题。所有的html标签都会被过滤掉,我看了它生成的soap代码。格式如下:
<?xml version='1.0'?>
<SOAP-ENV:Envelope xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="http://tempuri.org/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<Post xmlns="http://tempuri.org/">
<senderID>2</senderID>
<sessionID>22</sessionID>
<Content><b>just a test</b></Content></Post></SOAP-ENV:Body>
</SOAP-ENV:Envelope>
倒数第二行的<b>just a test</b>被过滤得只剩下了just a test。请问有什么办法可以让我可以发送完整的html片断?有没有比在客户端和服务器端同时批行replace再好的办法?
问题点数:20、回复次数:2Top
1 楼superhasty(鸟儿自空中飞过)回复于 2005-04-04 22:14:02 得分 20
System.Web.HttpUtility.HtmlEncode(string)Top
2 楼misspolo()回复于 2005-04-06 18:00:39 得分 0
最后是用一个js版的htmlencode解决的问题,不过还是谢谢关注。Top




