问题标签 [wse3.0]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
4555 浏览

c# - 如何签署自定义肥皂标题?

我已经在元素中添加了一个自定义的soap header<MyApp:FOO>元素,<soap:Header>并且要求我必须签署这个元素,如何做到这一点? <MyApp:FOO>包含许多在更高级别上识别用户的东西(用户名、偏好等)。我已经成功地使用了一个策略文件,现在使用了一个带有 CertificateAssertions 和 SoapFilters 的 policyClass 来签署 wsu:Timestamp、wsu:action、wsu:MessageId 等。但是现在该<MyApp:FOO>元素也需要签名。

到目前为止我所理解的是,需要签名的元素必须使用 wsu:Id 属性进行标识,然后使用 xml-exc-c14n 进行转换。

那么,我如何指定也应该对soap标头进行签名?这是我用于签署消息的当前类。

0 投票
1 回答
4305 浏览

visual-studio - WSE 客户端项目不断将 WebServicesClientProtocol 恢复为 SoapHttpClientProtocol

尽管在 Visual Studio 2005 中的客户端项目上启用了 WSE 3.0,但我所做的 Web 引用总是以从 SoapHttpClientProtocol 派生的服务代理结束。我必须手动将继承更改为 WebServicesClientProtocol,但更新它会恢复为 SoapHttpClientProtocol。我不确定在 Visual Studio 项目属性中的哪个位置可以让它永久使用 WebServicesClientProtocol?


据我所知,Visual Studio 应该生成常规的基于 SoapHttpClientProtocol 的服务代理,以及另一个后缀为“Wse”的服务代理,该名称源自 Web ServicesClientProtocol。甚至 Visual Studio .NET 2003 也已具备此功能。因此,出于某种原因,我的 Visual Studio 2005 并未与 WSE 3.0 紧密合作以生成额外的 WebServicesClientProtocol 代理。但缺失的环节在哪里?


2009 年 1 月 13 日更新

我得到了另一台机器来测试这个,看到这个 Visual Studio 2005可以生成基于 WebServicesClientProtocol 的代理。这意味着我原来的工作站的 Visual Studio 已经搞砸了;不太确定如何修复它。

添加:嗯,重新安装 WSE 3.0 也没有帮助。也许 WSE 不能在 x64 Windows Vista 上运行...?

0 投票
2 回答
222 浏览

security - 关于 WSE3 中断言策略的好资源

我在哪里可以找到关于 WSE3 中断言策略的好资源?

0 投票
6 回答
14938 浏览

c# - 从 WSE 3.0 客户端请求中删除 WS-Addressing/WS-Security 部分

我有一个使用 WSDL.exe 创建的简单 C# Web 服务代理类。我正在远程 Web 服务上调用一个方法,它包含一堆我不想要的 WS-Addressing 和 WS-Security 标头(并且服务器正在阻塞)。以下是 raw soap 请求的示例:

我不关心 WS-Addressing/WS-Security 的东西。我没有做任何事情来包括它。.NET WSE 3.0 包似乎默认添加它们。有没有办法摆脱这些?我在代理对象上看不到允许我删除这些部分的属性。我试过了:

当我调用我的 Web 服务方法时,这些会导致空引用异常。

我希望 SOAP 请求看起来像这样:

提前致谢

0 投票
1 回答
1183 浏览

wcf - Web服务安全:WSE3.0和WCF的优缺点是什么?

我正在我的公司开发一套新的网络服务。

我的经理要求我为此提供更高级别的安全性,因为 Web 服务将处理敏感信息。

我在网上搜索了有关如何保护 Web 服务的资源,两个亚军是 WSE3.0 和 WCF。

但我不知道哪一个是最好的选择。

我的要求规定了一些web服务必须被非.NET环境调用,那么如何进行呢?

在这种情况下,哪一个是最好的?

0 投票
1 回答
1886 浏览

c# - WSE 3.0 set content type

I've a simple question, for you, that I just can't seem to get my head around.

The situation is the following:

  • We create and send a request to a web service, using WSE 3.
  • The web service is written in Java.

Most of the things are fine, but I can't seem to have an impact on the ContentType of either the WebResuest or WebResponse and that's causing some problems.

The errormessage I keep getting is the following:

Client found a response content type of ' application/xop+xml;type="text/xml; charset=utf-8" ' but expected 'text/xml'. The request failed with the error message: ....

In the details of the error message it has the response to our call from the server and it's coming through properly. Obviously it's not good as it is at the moment as it's coming through an exception :).

So, how could I set the expected content type for the response?

If I'm correct, the Request and the Response in WSE 3.0 has to have the same ContentType. So I thought I would try to set the request.Headers[HttpRequestHeader.ContentType] to the expected one, but with no luck. (also, I can set the HttpWebRequest's contenttype in quite a few places, but none of them seem to do the trick)

0 投票
2 回答
1609 浏览

c# - 调用 ClearHeaders 时 WSE 3.0 崩溃

我正在使用 WSE Web 服务在 c# 中开发客户端-服务器应用程序。用户可以做的一件事是通过网络服务将 jpg 图像发送到服务器进行备份。最近发生了奇怪的错误。并非所有用户都会发生这种情况,只有少数用户会发生这种情况。在客户端,例外是

并在服务器上的事件查看器中发现以下警告:

有谁知道这个错误可能来自哪里?我已经尝试将 web.config 中的“maxRequestLength”提高到 16Mb,但这并不能解决问题。

问候/丹尼尔

0 投票
1 回答
515 浏览

wcf - 使用 WCF 连接到 https 后面的 asmx 页面,仅需要签名

我正在尝试连接到需要我在连接之前使用证书签名的 Web 服务。

在 WSE 3.0 中,我所要做的就是创建一个证书策略并选择“仅签名”单选按钮。这在 WSE 3.0 中运行良好,但我想在 Visual Studio 2008+ 上使用它(wse 3.0 仅支持 2005)。为了绕过 2005 年唯一的 WSE 限制,我正在尝试将我的应用程序转换为 WCF。

我阅读了有关将 WSE 转换为 WCF 的 MSDN 文章(例如 Aug2004 限制),但它没有提及任何有关保护级别的内容。

从外观上看,支持 utf-8 的默认绑定不支持仅签名保护级别。不支持 utf-8 的默认绑定(如 tcp 的东西)确实如此,但这并不能真正帮助我了解我如何尝试连接到 asmx 页面。customBinding 似乎是关键(如 MSDN 文章中所述),但我找不到任何不需要加密的有效保护级别。

有什么建议么?有什么明显的我失踪了吗?

0 投票
1 回答
12102 浏览

.net - 如何防止我的 .NET SOAP 客户端在 HTTP 标头中包含“Connection: KeepAlive”。(使用WSE3.0)

在 HTTP 连接标头中,我的 Web 服务客户端包括: Connection: Keep-Alive

我想禁用它。 在做了一些研究之后,看起来这样做的方法是将SoapHttpChannelOptions类的 KeepAlive 成员设置为 false。但是,我看不到SoapHttpChannelOptions在使用 WSE3.0(Web 服务增强)为我在 Visual Studio 中生成的 Web 服务客户端类中访问/修改的方法。

在我的例子中,生成的存根类扩展Microsoft.Web.Services3.WebServicesClientProtocol

我一直无法找到搜索谷歌的任何示例,并且 SoapHttpChannelOptions 类的大多数成员都被继承到 WebServicesClientProtocol 类中......

SoapHttpChannelOptions 参考
WebServicesClientProtocol 参考

注意:我不是要修改网络服务器。我正在尝试修改 Web 服务客户端。

0 投票
3 回答
4007 浏览

wse - Microsoft.Web.Services3.ResponseProcessingException

我将使用 WSE 3.0 的 Web 服务部署到测试服务器。我收到下面的神秘错误。知道这意味着什么以及如何解决吗?提前致谢!

Microsoft.Web.Services3.ResponseProcessingException: WSE910: 响应消息处理过程中发生错误,您可以在内部异常中找到错误。您还可以在 Response 属性中找到响应消息。---> System.Xml.XmlException: 'wsse' 是一个未声明的命名空间。第 1 行,位置 97。在 System.Xml.XmlTextReaderImpl.Throw(String res, String arg, Int32 lineNo, Int32 linePos) 在 System.Xml.XmlTextReaderImpl.LookupNamespace(NodeData 节点的 System.Xml.XmlTextReaderImpl.Throw(Exception e) ) 在 System.Xml.XmlTextReaderImpl.ElementNamespaceLookup() 在 System.Xml.XmlTextReaderImpl.ParseAttributes() 在 System.Xml.XmlTextReaderImpl.ParseElement() 在 System.Xml.XmlTextReaderImpl.ParseElementContent() 在 System.Xml.XmlTextReaderImpl.Read( ) 在 System.Xml.XmlTextReader。