关于soap和SOAP-ENV的问题

dandanwar 2007-06-15 05:30:34
我要做misc的provision,用.net写了webservice,但是发现生成的xml都是soap,或者soap12这样的前缀,但是人家的要求是SOAP-ENV。
我另外了一了一个测试工具,来测试,发现老是提示我的xml包有问题,那位大哥,帮帮我,我网上搜了很多这方面的资料,还不搞不定?
...全文
1155 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
hm7921936 2007-07-12
  • 打赏
  • 举报
回复
可以自己修改生成的前缀
紫气东来_999 2007-07-11
  • 打赏
  • 举报
回复
关注
紫气东来_999 2007-07-11
  • 打赏
  • 举报
回复
关注
vainnetwork 2007-07-09
  • 打赏
  • 举报
回复
关注,帮顶
hm7921936 2007-07-09
  • 打赏
  • 举报
回复
jf
helodd 2007-06-27
  • 打赏
  • 举报
回复
使用borland 开发的都是SOAP-ENV 的标记。同样的东西吧.有人这样做

//http://topic.csdn.net/t/20040824/15/3304966.html

可以在你的WebMethod加入
Context.Response.Filter = new ResponseFilters.myFilter(Context.Response.Filter);
在该asmx中WebService之外的地方加入
namespace ResponseFilters
{

public class myFilter : Stream
{
private Stream _sink;
private long _position;

public myFilter(Stream sink)
{
_sink = sink;
}

// The following members of Stream must be overriden.
public override bool CanRead
{
get { return true; }
}
public override bool CanSeek
{
get { return true; }
}
public override bool CanWrite
{
get { return true; }
}
public override long Length
{
get { return 0; }
}
public override long Position
{
get { return _position; }
set { _position = value; }
}
public override long Seek(long offset, SeekOrigin direction)
{
return _sink.Seek(offset, direction);
}
public override void SetLength(long length)
{
_sink.SetLength(length);
}
public override void Close()
{
_sink.Close();
}
public override void Flush()
{
_sink.Flush();
}
public override int Read(byte[] buffer, int offset, int count)
{
return _sink.Read(buffer, offset, count);
}

// The Write method actually does the filtering.
public override void Write(byte[] buffer, int offset, int count)
{
//在这里处理,把<soap:Header>替换成<SOAP-ENV:Header>
//实现自己做吧,实在犯懒
Array.Copy(data, 0, datOutput, apdStr.Length, count);

_sink.Write(datOutput, 0, datOutput.Length);
}
}
}


curd0468 2007-06-21
  • 打赏
  • 举报
回复
帮你顶下
killer_liqiao 2007-06-19
  • 打赏
  • 举报
回复
UP
dandanwar 2007-06-19
  • 打赏
  • 举报
回复
那位大哥知道怎么办呢?谢谢了
wshuangminlg 2007-06-17
  • 打赏
  • 举报
回复
帮LZ顶

12,162

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 Web Services
社区管理员
  • Web Services社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧