- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中com.sun.xml.wss.XWSSecurityException.getMessage()
方法的一些代码示例,展示了XWSSecurityException.getMessage()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XWSSecurityException.getMessage()
方法的具体详情如下:
包路径:com.sun.xml.wss.XWSSecurityException
类名称:XWSSecurityException
方法名:getMessage
暂无
代码示例来源:origin: com.hynnet/xws-security
public void writeTo(OutputStream os) {
Marshaller writer;
try {
writer = getMarshaller();
JAXBElement ed = getEK(writer);
writer.marshal(ed,os);
} catch (javax.xml.bind.JAXBException ex) {
logger.log(Level.SEVERE,LogStringsMessages.WSS_1921_ERROR_WRITING_ENCRYPTEDKEY(ex.getMessage()), ex);
} catch (com.sun.xml.wss.XWSSecurityException ex) {
logger.log(Level.SEVERE,LogStringsMessages.WSS_1921_ERROR_WRITING_ENCRYPTEDKEY(ex.getMessage()), ex);
}
}
代码示例来源:origin: com.hynnet/xws-security
/**
* Delete security header
*/
public void deleteSecurityHeader() {
try {
findSecurityHeader();
if (null != wsseSecurity) {
wsseSecurity.detachNode();
wsseSecurity = null;
}
} catch (XWSSecurityException e) {
log.log(Level.SEVERE, "WSS0370.error.deleting.secheader", e.getMessage());
}
}
代码示例来源:origin: com.hynnet/xws-security
public void writeTo(javax.xml.stream.XMLStreamWriter streamWriter) throws javax.xml.stream.XMLStreamException {
Marshaller writer;
try {
if (streamWriter instanceof Map) {
OutputStream os = (OutputStream) ((Map) streamWriter).get("sjsxp-outputstream");
if (os != null) {
streamWriter.writeCharacters(""); // Force completion of open elems
writeTo(os);
return;
}
}
writer = getMarshaller();
JAXBElement ed = getEK(writer);
writer.marshal(ed,streamWriter);
} catch (javax.xml.bind.JAXBException ex) {
logger.log(Level.SEVERE,LogStringsMessages.WSS_1921_ERROR_WRITING_ENCRYPTEDKEY(ex.getMessage()), ex);
} catch (com.sun.xml.wss.XWSSecurityException ex) {
logger.log(Level.SEVERE,LogStringsMessages.WSS_1921_ERROR_WRITING_ENCRYPTEDKEY(ex.getMessage()), ex);
}
}
代码示例来源:origin: com.hynnet/xws-security
/**
* Make Security Header Non-MustUnderstand
*/
public void resetMustUnderstandOnSecHeader() {
try {
findSecurityHeader();
if (null != wsseSecurity) {
wsseSecurity.removeAttributeNS(this.getEnvelope().getNamespaceURI(), "mustUnderstand");
}
} catch (XWSSecurityException e) {
log.log(Level.SEVERE, "WSS0370.error.deleting.secheader", e.getMessage());
}
}
代码示例来源:origin: com.hynnet/xws-security
logger.log (Level.FINEST,"Error occurred while resolving"+uri,ex);
throw new URIReferenceException (ex.getMessage ());
代码示例来源:origin: com.hynnet/xws-security
public void writeTo(java.io.OutputStream os) {
try {
Marshaller writer = getMarshaller();
CryptoProcessor dep;
dep = new CryptoProcessor(Cipher.ENCRYPT_MODE, edt.getEncryptionMethod().getAlgorithm(), data, key);
CVAdapter adapter = new CVAdapter(dep);
writer.setAdapter(CVAdapter.class,adapter);
com.sun.xml.security.core.xenc.ObjectFactory obj = new com.sun.xml.security.core.xenc.ObjectFactory();
JAXBElement ed = obj.createEncryptedData(edt);
writer.marshal(ed,os);
}catch (com.sun.xml.wss.XWSSecurityException ex) {
logger.log(Level.SEVERE, LogStringsMessages.WSS_1919_ERROR_WRITING_ENCRYPTEDDATA(ex.getMessage()), ex);
}catch (javax.xml.bind.JAXBException ex) {
logger.log(Level.SEVERE, LogStringsMessages.WSS_1919_ERROR_WRITING_ENCRYPTEDDATA(ex.getMessage()), ex);
}
}
代码示例来源:origin: com.hynnet/xws-security
throw SecurableSoapMessage.newSOAPFaultException(
MessageConstants.WSSE_UNSUPPORTED_SECURITY_TOKEN,
xwsse.getMessage(),
xwsse);
代码示例来源:origin: com.hynnet/xws-security
public void writeTo(OutputStream os) {
try {
Marshaller writer = getMarshaller();
CryptoProcessor dep;
dep = new CryptoProcessor(Cipher.ENCRYPT_MODE, eht.getEncryptedData().getEncryptionMethod().getAlgorithm(), data, key);
CVAdapter adapter = new CVAdapter(dep);
writer.setAdapter(CVAdapter.class,adapter);
com.sun.xml.ws.security.secext11.ObjectFactory obj = new com.sun.xml.ws.security.secext11.ObjectFactory();
JAXBElement eh = obj.createEncryptedHeader(eht);
writer.marshal(eh,os);
}catch (com.sun.xml.wss.XWSSecurityException ex) {
logger.log(Level.SEVERE, LogStringsMessages.WSS_1916_ERROR_WRITING_ECRYPTEDHEADER(ex.getMessage()), ex);
}catch (javax.xml.bind.JAXBException ex) {
logger.log(Level.SEVERE, LogStringsMessages.WSS_1916_ERROR_WRITING_ECRYPTEDHEADER(ex.getMessage()), ex);
}
}
代码示例来源:origin: com.hynnet/xws-security
writer.marshal(ed,streamWriter);
}catch (com.sun.xml.wss.XWSSecurityException ex) {
logger.log(Level.SEVERE, LogStringsMessages.WSS_1919_ERROR_WRITING_ENCRYPTEDDATA(ex.getMessage()), ex);
}catch (javax.xml.bind.JAXBException ex) {
logger.log(Level.SEVERE, LogStringsMessages.WSS_1919_ERROR_WRITING_ENCRYPTEDDATA(ex.getMessage()), ex);
代码示例来源:origin: com.hynnet/xws-security
logger.log(Level.SEVERE, LogStringsMessages.WSS_1916_ERROR_WRITING_ECRYPTEDHEADER(ex.getMessage()), ex);
} catch (com.sun.xml.wss.XWSSecurityException ex) {
logger.log(Level.SEVERE, LogStringsMessages.WSS_1916_ERROR_WRITING_ECRYPTEDHEADER(ex.getMessage()), ex);
代码示例来源:origin: spring-projects/spring-ws
/**
* Secures the given SoapMessage message in accordance with the defined security policy.
*
* @param soapMessage the message to be secured
* @throws XwsSecuritySecurementException in case of errors
* @throws IllegalArgumentException when soapMessage is not a {@code SaajSoapMessage}
*/
@Override
protected void secureMessage(SoapMessage soapMessage, MessageContext messageContext)
throws XwsSecuritySecurementException {
Assert.isTrue(soapMessage instanceof SaajSoapMessage, "XwsSecurityInterceptor requires a SaajSoapMessage. " +
"Use a SaajSoapMessageFactory to create the SOAP messages.");
SaajSoapMessage saajSoapMessage = (SaajSoapMessage) soapMessage;
try {
ProcessingContext context = processor.createProcessingContext(saajSoapMessage.getSaajMessage());
SOAPMessage result = processor.secureOutboundMessage(context);
saajSoapMessage.setSaajMessage(result);
}
catch (XWSSecurityException ex) {
throw new XwsSecuritySecurementException(ex.getMessage(), ex);
}
catch (WssSoapFaultException ex) {
throw new XwsSecurityFaultException(ex.getFaultCode(), ex.getFaultString(), ex.getFaultActor());
}
}
代码示例来源:origin: org.springframework.ws/spring-ws-security
/**
* Validates the given SoapMessage message in accordance with the defined security policy.
*
* @param soapMessage the message to be validated
* @throws XwsSecurityValidationException in case of errors
* @throws IllegalArgumentException when soapMessage is not a {@code SaajSoapMessage}
*/
@Override
protected void validateMessage(SoapMessage soapMessage, MessageContext messageContext)
throws WsSecurityValidationException {
Assert.isTrue(soapMessage instanceof SaajSoapMessage, "XwsSecurityInterceptor requires a SaajSoapMessage. " +
"Use a SaajSoapMessageFactory to create the SOAP messages.");
SaajSoapMessage saajSoapMessage = (SaajSoapMessage) soapMessage;
try {
ProcessingContext context = processor.createProcessingContext(saajSoapMessage.getSaajMessage());
SOAPMessage result = processor.verifyInboundMessage(context);
saajSoapMessage.setSaajMessage(result);
}
catch (XWSSecurityException ex) {
throw new XwsSecurityValidationException(ex.getMessage(), ex);
}
catch (WssSoapFaultException ex) {
throw new XwsSecurityFaultException(ex.getFaultCode(), ex.getFaultString(), ex.getFaultActor());
}
}
代码示例来源:origin: apache/servicemix-bundles
/**
* Secures the given SoapMessage message in accordance with the defined security policy.
*
* @param soapMessage the message to be secured
* @throws XwsSecuritySecurementException in case of errors
* @throws IllegalArgumentException when soapMessage is not a {@code SaajSoapMessage}
*/
@Override
protected void secureMessage(SoapMessage soapMessage, MessageContext messageContext)
throws XwsSecuritySecurementException {
Assert.isTrue(soapMessage instanceof SaajSoapMessage, "XwsSecurityInterceptor requires a SaajSoapMessage. " +
"Use a SaajSoapMessageFactory to create the SOAP messages.");
SaajSoapMessage saajSoapMessage = (SaajSoapMessage) soapMessage;
try {
ProcessingContext context = processor.createProcessingContext(saajSoapMessage.getSaajMessage());
SOAPMessage result = processor.secureOutboundMessage(context);
saajSoapMessage.setSaajMessage(result);
}
catch (XWSSecurityException ex) {
throw new XwsSecuritySecurementException(ex.getMessage(), ex);
}
catch (WssSoapFaultException ex) {
throw new XwsSecurityFaultException(ex.getFaultCode(), ex.getFaultString(), ex.getFaultActor());
}
}
代码示例来源:origin: apache/servicemix-bundles
/**
* Validates the given SoapMessage message in accordance with the defined security policy.
*
* @param soapMessage the message to be validated
* @throws XwsSecurityValidationException in case of errors
* @throws IllegalArgumentException when soapMessage is not a {@code SaajSoapMessage}
*/
@Override
protected void validateMessage(SoapMessage soapMessage, MessageContext messageContext)
throws WsSecurityValidationException {
Assert.isTrue(soapMessage instanceof SaajSoapMessage, "XwsSecurityInterceptor requires a SaajSoapMessage. " +
"Use a SaajSoapMessageFactory to create the SOAP messages.");
SaajSoapMessage saajSoapMessage = (SaajSoapMessage) soapMessage;
try {
ProcessingContext context = processor.createProcessingContext(saajSoapMessage.getSaajMessage());
SOAPMessage result = processor.verifyInboundMessage(context);
saajSoapMessage.setSaajMessage(result);
}
catch (XWSSecurityException ex) {
throw new XwsSecurityValidationException(ex.getMessage(), ex);
}
catch (WssSoapFaultException ex) {
throw new XwsSecurityFaultException(ex.getFaultCode(), ex.getFaultString(), ex.getFaultActor());
}
}
代码示例来源:origin: org.springframework.ws/spring-ws-security
/**
* Secures the given SoapMessage message in accordance with the defined security policy.
*
* @param soapMessage the message to be secured
* @throws XwsSecuritySecurementException in case of errors
* @throws IllegalArgumentException when soapMessage is not a {@code SaajSoapMessage}
*/
@Override
protected void secureMessage(SoapMessage soapMessage, MessageContext messageContext)
throws XwsSecuritySecurementException {
Assert.isTrue(soapMessage instanceof SaajSoapMessage, "XwsSecurityInterceptor requires a SaajSoapMessage. " +
"Use a SaajSoapMessageFactory to create the SOAP messages.");
SaajSoapMessage saajSoapMessage = (SaajSoapMessage) soapMessage;
try {
ProcessingContext context = processor.createProcessingContext(saajSoapMessage.getSaajMessage());
SOAPMessage result = processor.secureOutboundMessage(context);
saajSoapMessage.setSaajMessage(result);
}
catch (XWSSecurityException ex) {
throw new XwsSecuritySecurementException(ex.getMessage(), ex);
}
catch (WssSoapFaultException ex) {
throw new XwsSecurityFaultException(ex.getFaultCode(), ex.getFaultString(), ex.getFaultActor());
}
}
代码示例来源:origin: spring-projects/spring-ws
/**
* Validates the given SoapMessage message in accordance with the defined security policy.
*
* @param soapMessage the message to be validated
* @throws XwsSecurityValidationException in case of errors
* @throws IllegalArgumentException when soapMessage is not a {@code SaajSoapMessage}
*/
@Override
protected void validateMessage(SoapMessage soapMessage, MessageContext messageContext)
throws WsSecurityValidationException {
Assert.isTrue(soapMessage instanceof SaajSoapMessage, "XwsSecurityInterceptor requires a SaajSoapMessage. " +
"Use a SaajSoapMessageFactory to create the SOAP messages.");
SaajSoapMessage saajSoapMessage = (SaajSoapMessage) soapMessage;
try {
ProcessingContext context = processor.createProcessingContext(saajSoapMessage.getSaajMessage());
SOAPMessage result = processor.verifyInboundMessage(context);
saajSoapMessage.setSaajMessage(result);
}
catch (XWSSecurityException ex) {
throw new XwsSecurityValidationException(ex.getMessage(), ex);
}
catch (WssSoapFaultException ex) {
throw new XwsSecurityFaultException(ex.getFaultCode(), ex.getFaultString(), ex.getFaultActor());
}
}
代码示例来源:origin: com.hynnet/xws-security
MessageConstants.REQUESTER_SERIAL, sharedState.get(REQUESTER_SERIAL));
}
private void populateSharedStateFromContext(Map sharedState, ProcessingContextImpl context) {
sharedState.put(
REQUESTER_SUBJECT, context.getExtraneousProperty(MessageConstants.AUTH_SUBJECT));
sharedState.put(
REQUESTER_KEYID, context.getExtraneousProperty(MessageConstants.REQUESTER_KEYID));
sharedState.put(
REQUESTER_ISSUERNAME,
context.getExtraneousProperty(MessageConstants.REQUESTER_ISSUERNAME));
sharedState.put(
REQUESTER_SERIAL, context.getExtraneousProperty(MessageConstants.REQUESTER_SERIAL));
}
}
代码示例来源:origin: com.hynnet/xws-security
SecurableSoapMessage.newSOAPFaultException(
MessageConstants.WSSE_INTERNAL_SERVER_ERROR,
xwse.getMessage(), xwse);
Message msg = Messages.create(getSOAPFault(wsfe));
packet.setMessage(msg);
代码示例来源:origin: com.hynnet/xws-security
qname, xwse.getMessage(), xwse);
throw getSOAPFaultException(wsfe);
代码示例来源:origin: com.hynnet/xws-security
SecurableSoapMessage.newSOAPFaultException(
MessageConstants.WSSE_INTERNAL_SERVER_ERROR,
xwse.getMessage(), xwse);
throw getSOAPFaultException(wsfe);
我想知道使用 GetMessage 与 GetMessages 逐一获取消息的开销是多少?我应该始终使用 GetMessages(32) 吗?它比 GetMessage() 有什么优势吗? 最佳答案
我想知道使用 GetMessage 与 GetMessages 逐一获取消息的开销是多少?我应该始终使用 GetMessages(32) 吗?它比 GetMessage() 有什么优势吗? 最佳答案
Like in this picture 我知道它们都可以正常工作,但我只是想知道它们之间有何不同? PS:我是初学者。 最佳答案 A LogEvent可以同时包含消息和异常。如果您使用第一种形式:
我观察到这两种说法都是有效的。与第二个语句相比,第一个语句中记录的额外内容是什么? 最佳答案 第一个还记录原始异常(和堆栈跟踪),第二个仅记录消息。 因此,第一个语句中记录的“额外内容”是原始异常。这
我的问题是:用 getMessage 或 toString 或两者都记录更好吗?考虑到开源引发的错误。看到评论中的问题,但没有得到答案。也许我错过了什么?不要介意记录其中之一的小性能影响,但除非有充分
当针对返回 null 的 NullPointerException 引发时,我在 exception.getMessage() 方法中遇到问题。 如何覆盖基本 Exception.getMessage
如何让 MyException 和 MyRuntimeException 使用相同的自定义 getMessage() 实现? 由于 Java 没有多重继承,我不知道该怎么做。目前我在两个类中都有重复的
public class TestException extends Exception { public TestException() { super("Test
我有一个串行设备,可以传输多种类型的消息作为应答。每个消息头代表消息类型。每种消息类型都有其一组字段。我永远不知道我会收到哪种消息类型。 在我的代码中,每种消息类型都代表类。借助 getMessage
这个问题已经有答案了: Can the HWND from CreateWindow/CreateDialog be GetMessage'd from another thread? (7 个回答)
多年来,我在各种不同的程序中使用了以下功能。它一直没有错误。直到现在,我第一次尝试让它针对 64 位代码工作。 我尝试逐行执行代码...首先我执行 something_done = TRUE; 这行(
如果 GetMessage(...) 失败,消息是否不会从消息队列中删除?我问是因为当我有以下循环时,我最终会进入一个无限循环,试图一遍又一遍地处理相同的消息: while( GetMessage(
我有一个应用程序,第二个线程在循环中调用 GetMessage()。在某些时候,第一个线程意识到用户想要退出应用程序并通知第二个线程它应该终止。由于第二个线程卡在 GetMessage() 上,因此程
我有这些类(class): public class NegativeNumberException extends Exception{ NegativeNumberExceptio
当我在 php 中捕获异常并尝试输出一些详细信息时,getMessage() 总是不返回任何内容。如果我执行 var_dump(),我会看到我想要显示的消息。我做错了什么?
嗨,我有下面的伪代码抛出这样的异常 throw new MyException("Bad thing happened","com.stuff.errorCode"); 其中 MyException
我需要更改方法 getMessage() 的返回消息, 例如,我有一个 ArithmeticException,当我写时: try{c=a/0;} catch(ArithmeticException
我试图捕获异常然后将其显示在 JTextArea 中,但我得到了 null... 这里是: } catch (Exception rwe) { // System.
使用 BitmapFactory.decodeStream 函数,我得到了以下异常 02-22 13:24:34.129: W/System.err(7927): java.io.FileNotFou
我有以下代码 SendApp,点击按钮[X]时,执行以下代码 HWND pHWndReceiveApp = FindWindowA(NULL, "ReceiveApp"); if (NULL
我是一名优秀的程序员,十分优秀!