- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
尝试在 Axis2 中使用 Rampart 实现 WS-Security 时出现以下错误。
org.apache.axis2.AxisFault: Unable to engage module : rampart
at org.apache.axis2.client.ServiceClient.engageModule(ServiceClient.java:358)
我在嵌入式模式下使用 Axis (在我的耳朵里)。没有安全实现,服务工作正常。我已将策略包含在 services.xml 和 WSDL 中。使用 Jboss 和 JDK6 请在下面找到文件。
Axis2.xml
<wsdl:definitions xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ns="http://service" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://service">
<wsdl:types>
<xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://service">
<xs:element name="echo">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="args0" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="echoResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</wsdl:types>
<wsdl:message name="echoRequest">
<wsdl:part name="parameters" element="ns:echo"></wsdl:part>
</wsdl:message>
<wsdl:message name="echoResponse">
<wsdl:part name="parameters" element="ns:echoResponse"></wsdl:part>
</wsdl:message>
<wsdl:portType name="SimpleServicePortType">
<wsdl:operation name="echo">
<wsdl:input message="ns:echoRequest" wsaw:Action="urn:echo"></wsdl:input>
<wsdl:output message="ns:echoResponse" wsaw:Action="urn:echoResponse"></wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="SimpleServiceSoap11Binding" type="ns:SimpleServicePortType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="echo">
<soap:operation soapAction="urn:echo" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="SimpleServiceSoap12Binding" type="ns:SimpleServicePortType">
<soap12:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="echo">
<soap12:operation soapAction="urn:echo" style="document"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap12:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="SimpleServiceHttpBinding" type="ns:SimpleServicePortType">
<http:binding verb="POST"/>
<wsdl:operation name="echo">
<http:operation location="SimpleService/echo"/>
<wsdl:input>
<mime:content part="echo" type="text/xml"/>
</wsdl:input>
<wsdl:output>
<mime:content part="echo" type="text/xml"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="SimpleService">
<wsdl:port name="SimpleServiceHttpEndpoint" binding="ns:SimpleServiceHttpBinding">
<http:address location="http://sbswsvm1426:9091/axis2/services/SimpleService.SimpleServiceHttpEndpoint/"/>
</wsdl:port>
<wsdl:port name="SimpleServiceHttpSoap11Endpoint" binding="ns:SimpleServiceSoap11Binding">
<soap:address location="http://sbswsvm1426:9091/axis2/services/SimpleService.SimpleServiceHttpSoap11Endpoint/"/>
</wsdl:port>
<wsdl:port name="SimpleServiceHttpSoap12Endpoint" binding="ns:SimpleServiceSoap12Binding">
<soap12:address location="http://sbswsvm1426:9091/axis2/services/SimpleService.SimpleServiceHttpSoap12Endpoint/"/>
</wsdl:port>
</wsdl:service>
<wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="SigOnly">
<wsp:ExactlyOne>
<wsp:All>
<sp:AsymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<wsp:Policy>
<sp:InitiatorToken>
<wsp:Policy>
<sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
<wsp:Policy>
<sp:RequireThumbprintReference/>
<sp:WssX509V3Token10/>
</wsp:Policy>
</sp:X509Token>
</wsp:Policy>
</sp:InitiatorToken>
<sp:RecipientToken>
<wsp:Policy>
<sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
<wsp:Policy>
<sp:RequireThumbprintReference/>
<sp:WssX509V3Token10/>
</wsp:Policy>
</sp:X509Token>
</wsp:Policy>
</sp:RecipientToken>
<sp:AlgorithmSuite>
<wsp:Policy>
<sp:TripleDesRsa15/>
</wsp:Policy>
</sp:AlgorithmSuite>
<sp:Layout>
<wsp:Policy>
<sp:Strict/>
</wsp:Policy>
</sp:Layout>
<sp:IncludeTimestamp/>
<sp:OnlySignEntireHeadersAndBody/>
</wsp:Policy>
</sp:AsymmetricBinding>
<sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<sp:Policy>
<sp:MustSupportRefKeyIdentifier/>
<sp:MustSupportRefIssuerSerial/>
</sp:Policy>
</sp:Wss10>
<sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<sp:Body/>
</sp:SignedParts>
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>
</wsdl:definitions>
服务.XML
<?xml version="1.0" encoding="UTF-8"?>
<!-- This file was auto-generated from WSDL -->
<!-- by the Apache Axis2 version: 1.5.6 Built on : Aug 30, 2011 (10:00:16 CEST) -->
<serviceGroup>
<service name="SimpleService">
<messageReceivers>
<messageReceiver mep="http://www.w3.org/ns/wsdl/in-out" class="service.SimpleServiceMessageReceiverInOut"/>
</messageReceivers>
<parameter name="ServiceClass">service.SimpleServiceSkeleton</parameter>
<parameter name="useOriginalwsdl">true</parameter>
<parameter name="modifyUserWSDLPortAddress">true</parameter>
<operation name="echo" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://service">
<actionMapping>urn:echo</actionMapping>
<outputActionMapping>urn:echoResponse</outputActionMapping>
</operation>
<module ref="rampart"/>
<module ref="addressing"/>
<wsp:Policy wsu:Id="SigOnly"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
<wsp:ExactlyOne>
<wsp:All>
<sp:AsymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<wsp:Policy>
<sp:InitiatorToken>
<wsp:Policy>
<sp:X509Token
sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
<wsp:Policy>
<sp:RequireThumbprintReference/>
<sp:WssX509V3Token10/>
</wsp:Policy>
</sp:X509Token>
</wsp:Policy>
</sp:InitiatorToken>
<sp:RecipientToken>
<wsp:Policy>
<sp:X509Token
sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
<wsp:Policy>
<sp:RequireThumbprintReference/>
<sp:WssX509V3Token10/>
</wsp:Policy>
</sp:X509Token>
</wsp:Policy>
</sp:RecipientToken>
<sp:AlgorithmSuite>
<wsp:Policy>
<sp:TripleDesRsa15/>
</wsp:Policy>
</sp:AlgorithmSuite>
<sp:Layout>
<wsp:Policy>
<sp:Strict/>
</wsp:Policy>
</sp:Layout>
<sp:IncludeTimestamp/>
<sp:OnlySignEntireHeadersAndBody/>
</wsp:Policy>
</sp:AsymmetricBinding>
<sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<wsp:Policy>
<sp:MustSupportRefKeyIdentifier/>
<sp:MustSupportRefIssuerSerial/>
</wsp:Policy>
</sp:Wss10>
<sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<sp:Body/>
</sp:SignedParts>
<ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
<ramp:user>service</ramp:user>
<ramp:encryptionUser>client</ramp:encryptionUser>
<ramp:passwordCallbackClass>service.PWCBHandler
</ramp:passwordCallbackClass>
<ramp:signatureCrypto>
<ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
<ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
<ramp:property name="org.apache.ws.security.crypto.merlin.file">service.jks</ramp:property>
<ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">apache
</ramp:property>
</ramp:crypto>
</ramp:signatureCrypto>
</ramp:RampartConfig>
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>
</service>
</serviceGroup>
客户端 stub
SimpleServiceStub stub = new SimpleServiceStub("http://sbswsvm1426:9091/axis2/services/SimpleService?wsdl");
stub._getServiceClient().engageModule("rampart");
stub._getServiceClient().engageModule("addressing");
Options options = stub._getServiceClient().getOptions();
options.setUserName("apache");
options.setPassword("password");
Echo oSreq=new Echo();
oSreq.setArgs0("Echoed!!");
EchoResponse response = stub.echo(oSreq);
System.out.println(response.get_return());
最佳答案
尝试以下。您必须提供客户端存储库的路径。在存储库文件夹中,必须有一个名为“modules”的文件夹,而 rampart mar 应该位于该文件夹内。
ConfigurationContext ctx = ConfigurationContextFactory.createConfigurationContextFromFileSystem("path/to/client/repo", null);
SimpleServiceStub stub = new SimpleServiceStub(ctx, "http://sbswsvm1426ou:9091/axis2/services/SimpleService?wsdl");
我想你会再次收到一条新的错误信息。诸如“PKIX 路径构建失败”之类的内容。如果你得到,你需要将服务器证书添加到你的 keystore 并需要导入它。你可以这样做
System.setProperty("javax.net.ssl.trustStore", "/path/to/server.jks");
System.setProperty("javax.net.ssl.trustStorePassword", "password");
您可以在此处阅读更多相关信息。 http://wso2.com/library/3190/
关于java - Axis 2 : Unable to engage Rampart module,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16295323/
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be
图片来自google博客https://firebase.googleblog.com/2017/05/whats-new-with-analytics.html 每个用户的参与度为 12m 25s。
图片来自google博客https://firebase.googleblog.com/2017/05/whats-new-with-analytics.html 每个用户的参与度为 12m 25s。
如果我捆绑额外信息 EngagementAgent engagementAgent = EngagementAgent.getInstance(mContext);
根据erl_id_trans documentation : Programmers are strongly advised not to engage in parse transformatio
我需要一些帮助来尝试了解有关 Firebase 分析的用户参与度似乎非常奇怪的数字。 上图说每天的用户参与是 35 秒,但是,查看“Top Screens/Pages”我可以看到至少一分钟的平均时间,
尝试在 Axis2 中使用 Rampart 实现 WS-Security 时出现以下错误。 org.apache.axis2.AxisFault: Unable to engage module :
有没有其他人能够使 Janrain Engage 和 Bootstrap 3.x 运行良好? 自从更新我的元素以使用 Bootstrap 3 后,Janrain Engage 登录小部件看起来一团糟,
尝试使用一些社交分享按钮启用 GA 跟踪... 我们有以下内容: - Facebook - 推特 - 领英 - 偶然发现 除了偶然发现,我所有的工作都在工作!基本上,我只需要绑定(bind)到某人已完
recorder = new MediaRecorder(); recorder.setAudioSource(MediaRecorder.AudioSource.VOICE_CALL
我正在尝试使用下面链接中给出的引用连接到dynamics 365 https://learn.microsoft.com/en-us/dynamics365/customer-engagement/d
我想从 Watson 平台上的 MCE SDK 注册中获取 channel 和用户 ID。我可以使用以下代码获取 Android 上的信息: RegistrationClient client = M
Azure 移动参与度:从 RegisteredForRemoteNotifications 方法收到的设备 ID 与它在门户中显示的不同。我可以从 Portal 通过 DeviceId 发送通知,但
在 Google App Engine 上最好地实现 Janrain Engage (RPX Now) 有哪些可能的解决方案? 最佳答案 对于包括 session 在内的完整解决方案,我推荐 gae-
嗨,我需要执行一个 jar 文件,但是当我执行时,我收到此错误。一些帮助?我在谷歌上搜索了很多时间,但找不到解决方案。 org.apache.axis2.AxisFault: The system i
我使用 rampart-1.6.4 和 axis2-1.6.4 创建了一个网络服务。我能够在 eclipse 上运行它,因为我已经成功地集成了轴和城墙。现在,我需要将其作为 Web 应用程序运行。我已
我在我的 mongodb 变更日志集合中看到以下错误。 { "_id" : "ip-xxx-xx-xx-xx-2016-05-04T06:31:55-5729975b16a41fe4f
我在 UI 自动化过程中遇到此错误,但无法解决。这会停止我的自动化流程...... instruments[34247:1345307] Attempting to set event horizon
我使用 Appcelerator 的 Titanium 框架开发了一个 iOS 应用程序,我想将 janrain 登录小部件集成到我的 iOS 应用程序中。有人试过这个吗?如果可以,请您帮我做这件事。
最近我从 Google Analytics/Crashlytics/Fabric 迁移到 Firebase。我注意到 Firebase 上有一个名为“每日用户参与度”的指标: 在 Fabric 上有“
我是一名优秀的程序员,十分优秀!