我设法使用WS-Security 1.1协议使用基于Java的Web服务(第三方).Web服务只需要通过x509证书进行签名,而不是加密.但是我收到了这个错误:
主签名后不能发生签名确认元素.
捕获的服务器响应包如下所示:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" soapenv:mustUnderstand="true">
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="Signature-501">
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<ds:Reference URI="#id-502">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>...</ds:DigestValue>
</ds:Reference>
<ds:Reference URI="#SigConf-500">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>...</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>
...
</ds:SignatureValue>
<ds:KeyInfo Id="KeyId-...">
<wsse:SecurityTokenReference xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="STRId-...">
<ds:X509Data>
<ds:X509IssuerSerial>
<ds:X509IssuerName>CN=COMODO RSA Organization Validation Secure Server CA,O=COMODO CA Limited,L=Salford,ST=Greater Manchester,C=GB</ds:X509IssuerName>
<ds:X509SerialNumber>...</ds:X509SerialNumber>
</ds:X509IssuerSerial>
</ds:X509Data>
</wsse:SecurityTokenReference>
</ds:KeyInfo>
</ds:Signature>
<wsse11:SignatureConfirmation xmlns:wsse11="http://docs.oasis-open.org/wss/oasis-wss-wssecurity-secext-1.1.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" Value="..." wsu:Id="SigConf-500"/>
</wsse:Security>
</soapenv:Header>
<soapenv:Body xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="id-502"> …Run Code Online (Sandbox Code Playgroud) 说我有一Sale堂课:
public class Sale : BaseEntity //BaseEntity only has an Id
{
public ICollection<Item> Items { get; set; }
}
Run Code Online (Sandbox Code Playgroud)
和一Item类:
public class Item : BaseEntity //BaseEntity only has an Id
{
public int SaleId { get; set; }
public Sale Sale { get; set; }
}
Run Code Online (Sandbox Code Playgroud)
以及通用存储库(更新方法):
public async Task<int> UpdateAsync<T>(T entity, params Expression<Func<T, object>>[] navigations) where T : BaseEntity
{
var dbEntity = _dbContext.Set<T>().Find(entity.Id);
var dbEntry = _dbContext.Entry(dbEntity);
dbEntry.CurrentValues.SetValues(entity);
foreach (var property in navigations) …Run Code Online (Sandbox Code Playgroud) 在AngularJS 中,我们有一个函数叫做reloadWithDebugInfo()
angular.reloadWithDebugInfo()
Run Code Online (Sandbox Code Playgroud)
在打开调试信息的情况下重新加载当前应用程序。可以在浏览器控制台中执行此功能并启用调试。我正在寻找它在Angular 2 中的等价物,它可以让我们在开发者控制台中启用调试。但似乎没有可以在浏览器控制台中访问的等效功能。我知道有类似的功能enableDebugTools和disableDebugTools它让我们启用和禁用调试,但在浏览器控制台一个不能访问它们。而且要访问 angular2 的调试武器,如ng& ng.probe,必须首先启用调试工具,如Angular 2 应用程序调试指南中所述:
确保您的应用程序禁用了生产模式,以便您可以访问下面描述的所有方法。
我只想知道有没有办法在 Angular 2 中使用控制台启用调试工具?
我们有 2 个解决方案。
SolutionA是一个内部解决方案,我们将可重用代码放在我们的产品中 为了这个问题,它只有两个项目,NugetProjectA并且NugetProjectB有一个project referenceto NugetProjectA。
SolutionB它是通过 nugetpackage references实现的解决方案SolutionA。
麻烦的是:
NugetProjectANugetProjectB使用以前方法的项目中添加新方法NugetProjectBProject的SolutionAProject新添加的方法中执行NugetProjectB由于我们没有发布NugetProjectA更新的版本,所以上一步描述的将失败。
这似乎是一个很容易解决的问题。但是想象一下,SolutionB在SolutionA.