com.sun.xml.wss.jaxws.impl
Class SecurityServerTube
java.lang.Object
com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl
com.sun.xml.ws.api.pipe.helper.AbstractFilterTubeImpl
com.sun.xml.wss.jaxws.impl.SecurityTubeBase
com.sun.xml.wss.jaxws.impl.SecurityServerTube
- All Implemented Interfaces:
- com.sun.xml.ws.api.pipe.Pipe, com.sun.xml.ws.api.pipe.Tube
public class SecurityServerTube
- extends SecurityTubeBase
Fields inherited from class com.sun.xml.wss.jaxws.impl.SecurityTubeBase |
allowMissingTimestamp, bindingLevelAlgSuite, bpMSP, bsp10, cachedOperation, debug, disableIncPrefix, disablePayloadBuffer, EMPTY_LIST, encHeaderContent, inMessagePolicyMap, inProtocolPM, isSOAP12, issuedTokenContextMap, jaxbContext, log, marshaller, optimized, outMessagePolicyMap, outProtocolPM, rmVer, secEnv, securityMUValue, securityPolicyNamespaces, soapFactory, soapVersion, spVersion, timestampTimeOut, transportOptimization, tubeConfig, unmarshaller, WSDLPORT, wsitConfig, wsPolicyMap, wsscVer, wsTrustVer |
Fields inherited from class com.sun.xml.ws.api.pipe.helper.AbstractFilterTubeImpl |
next |
Method Summary |
protected void |
addIncomingFaultPolicy(com.sun.xml.ws.policy.Policy effectivePolicy,
SecurityPolicyHolder sph,
com.sun.xml.ws.api.model.wsdl.WSDLFault fault)
|
protected SecurityPolicyHolder |
addIncomingMP(com.sun.xml.ws.api.model.wsdl.WSDLBoundOperation operation,
com.sun.xml.ws.policy.Policy policy)
|
protected void |
addIncomingProtocolPolicy(com.sun.xml.ws.policy.Policy effectivePolicy,
java.lang.String protocol)
|
protected void |
addOutgoingFaultPolicy(com.sun.xml.ws.policy.Policy effectivePolicy,
SecurityPolicyHolder sph,
com.sun.xml.ws.api.model.wsdl.WSDLFault fault)
|
protected SecurityPolicyHolder |
addOutgoingMP(com.sun.xml.ws.api.model.wsdl.WSDLBoundOperation operation,
com.sun.xml.ws.policy.Policy policy)
private Packet addAddressingHeaders(Packet packet, String relatesTo, String action){
AddressingBuilder builder = AddressingBuilder.newInstance();
AddressingProperties ap = builder.newAddressingProperties();
try{
// Action
ap.setAction(builder.newURI(new URI(action)));
// RelatesTo
Relationship[] rs = new Relationship[]{builder.newRelationship(new URI(relatesTo))};
ap.setRelatesTo(rs);
// To
ap.setTo(builder.newURI(new URI(builder.newAddressingConstants().getAnonymousURI())));
} catch (URISyntaxException e) {
throw new RuntimeException("Exception when adding Addressing Headers");
}
WsaRuntimeFactory fac = WsaRuntimeFactory.newInstance(ap.getNamespaceURI(), pipeConfig.getWSDLModel(), pipeConfig.getBinding());
fac.writeHeaders(packet, ap);
packet.invocationProperties
.put(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_OUTBOUND, ap);
return packet;
} |
protected void |
addOutgoingProtocolPolicy(com.sun.xml.ws.policy.Policy effectivePolicy,
java.lang.String protocol)
|
com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl |
copy(com.sun.xml.ws.api.pipe.TubeCloner cloner)
|
protected java.lang.String |
getAction(com.sun.xml.ws.api.model.wsdl.WSDLOperation operation,
boolean inComming)
|
protected com.sun.xml.wss.impl.policy.mls.MessagePolicy |
getOutgoingFaultPolicy(com.sun.xml.ws.api.message.Packet packet)
|
protected com.sun.xml.wss.impl.policy.mls.MessagePolicy |
getOutgoingXWSSecurityPolicy(com.sun.xml.ws.api.message.Packet packet,
boolean isSCMessage)
|
protected com.sun.xml.wss.ProcessingContext |
initializeOutgoingProcessingContext(com.sun.xml.ws.api.message.Packet packet,
boolean isSCMessage)
|
protected com.sun.xml.wss.ProcessingContext |
initializeOutgoingProcessingContext(com.sun.xml.ws.api.message.Packet packet,
boolean isSCMessage,
boolean isTrustMessage)
|
void |
preDestroy()
|
com.sun.xml.ws.api.pipe.NextAction |
processException(java.lang.Throwable t)
|
com.sun.xml.ws.api.message.stream.InputStreamMessage |
processInputStream(com.sun.xml.ws.api.message.Message msg)
|
com.sun.xml.ws.api.message.stream.InputStreamMessage |
processInputStream(com.sun.xml.ws.api.message.Packet packet)
|
com.sun.xml.ws.api.message.stream.InputStreamMessage |
processInputStream(com.sun.xml.ws.api.message.stream.XMLStreamReaderMessage msg)
|
com.sun.xml.ws.api.message.Packet |
processMessage(com.sun.xml.ws.api.message.stream.XMLStreamReaderMessage msg)
|
com.sun.xml.ws.api.pipe.NextAction |
processRequest(com.sun.xml.ws.api.message.Packet packet)
|
com.sun.xml.ws.api.pipe.NextAction |
processResponse(com.sun.xml.ws.api.message.Packet retPacket)
|
protected javax.xml.soap.SOAPMessage |
verifyInboundMessage(javax.xml.soap.SOAPMessage message,
com.sun.xml.wss.ProcessingContext ctx)
|
Methods inherited from class com.sun.xml.wss.jaxws.impl.SecurityTubeBase |
bindingHasIssuedTokenPolicy, bindingHasRMPolicy, bindingHasSecureConversationPolicy, buildProtocolPolicy, cacheMessage, cacheOperation, collectPolicies, constructPolicyHolder, constructPolicyHolder, generateInternalError, getAction, getAlgoSuite, getBindingAlgorithmSuite, getEffectiveBootstrapPolicy, getInBoundSCP, getInboundXWSBootstrapPolicy, getIssuedTokenPoliciesFromBootstrapPolicy, getKerberosTokenPoliciesFromBootstrapPolicy, getOperation, getOperationKey, getOutBoundKTP, getOutBoundSCP, getOutgoingXWSBootstrapPolicy, getSecureConversationPolicies, getSOAPFault, getSOAPFaultException, getSOAPFaultException, getTokens, getWSDLOpFromAction, getWssAssertion, hasKerberosTokenPolicy, initializeInboundProcessingContext, isAddressingEnabled, isRMMessage, isSCCancel, isSCMessage, isSCRenew, isTrustMessage, loadClass, populateConfigProperties, resetCachedOperation, secureOutboundMessage, secureOutboundMessage, unmarshalPolicy, verifyInboundMessage |
Methods inherited from class com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl |
copy, doInvoke, doInvokeAndForget, doReturnWith, doSuspend, doSuspend, doThrow, process |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SecurityServerTube
public SecurityServerTube(ServerTubelineAssemblyContext context,
com.sun.xml.ws.api.pipe.Tube nextTube)
SecurityServerTube
protected SecurityServerTube(SecurityServerTube that,
com.sun.xml.ws.api.pipe.TubeCloner cloner)
copy
public com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl copy(com.sun.xml.ws.api.pipe.TubeCloner cloner)
- Specified by:
copy
in interface com.sun.xml.ws.api.pipe.Tube
- Overrides:
copy
in class com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl
processRequest
public com.sun.xml.ws.api.pipe.NextAction processRequest(com.sun.xml.ws.api.message.Packet packet)
- Specified by:
processRequest
in interface com.sun.xml.ws.api.pipe.Tube
- Overrides:
processRequest
in class com.sun.xml.ws.api.pipe.helper.AbstractFilterTubeImpl
processResponse
public com.sun.xml.ws.api.pipe.NextAction processResponse(com.sun.xml.ws.api.message.Packet retPacket)
- Specified by:
processResponse
in interface com.sun.xml.ws.api.pipe.Tube
- Overrides:
processResponse
in class com.sun.xml.ws.api.pipe.helper.AbstractFilterTubeImpl
processException
public com.sun.xml.ws.api.pipe.NextAction processException(java.lang.Throwable t)
- Specified by:
processException
in interface com.sun.xml.ws.api.pipe.Tube
- Overrides:
processException
in class com.sun.xml.ws.api.pipe.helper.AbstractFilterTubeImpl
preDestroy
public void preDestroy()
- Specified by:
preDestroy
in interface com.sun.xml.ws.api.pipe.Pipe
- Specified by:
preDestroy
in interface com.sun.xml.ws.api.pipe.Tube
- Overrides:
preDestroy
in class com.sun.xml.ws.api.pipe.helper.AbstractFilterTubeImpl
processMessage
public com.sun.xml.ws.api.message.Packet processMessage(com.sun.xml.ws.api.message.stream.XMLStreamReaderMessage msg)
processInputStream
public com.sun.xml.ws.api.message.stream.InputStreamMessage processInputStream(com.sun.xml.ws.api.message.stream.XMLStreamReaderMessage msg)
processInputStream
public com.sun.xml.ws.api.message.stream.InputStreamMessage processInputStream(com.sun.xml.ws.api.message.Message msg)
initializeOutgoingProcessingContext
protected com.sun.xml.wss.ProcessingContext initializeOutgoingProcessingContext(com.sun.xml.ws.api.message.Packet packet,
boolean isSCMessage,
boolean isTrustMessage)
initializeOutgoingProcessingContext
protected com.sun.xml.wss.ProcessingContext initializeOutgoingProcessingContext(com.sun.xml.ws.api.message.Packet packet,
boolean isSCMessage)
- Overrides:
initializeOutgoingProcessingContext
in class SecurityTubeBase
getOutgoingXWSSecurityPolicy
protected com.sun.xml.wss.impl.policy.mls.MessagePolicy getOutgoingXWSSecurityPolicy(com.sun.xml.ws.api.message.Packet packet,
boolean isSCMessage)
- Overrides:
getOutgoingXWSSecurityPolicy
in class SecurityTubeBase
getOutgoingFaultPolicy
protected com.sun.xml.wss.impl.policy.mls.MessagePolicy getOutgoingFaultPolicy(com.sun.xml.ws.api.message.Packet packet)
verifyInboundMessage
protected javax.xml.soap.SOAPMessage verifyInboundMessage(javax.xml.soap.SOAPMessage message,
com.sun.xml.wss.ProcessingContext ctx)
throws com.sun.xml.wss.impl.WssSoapFaultException,
com.sun.xml.wss.XWSSecurityException
- Overrides:
verifyInboundMessage
in class SecurityTubeBase
- Throws:
com.sun.xml.wss.impl.WssSoapFaultException
com.sun.xml.wss.XWSSecurityException
processInputStream
public com.sun.xml.ws.api.message.stream.InputStreamMessage processInputStream(com.sun.xml.ws.api.message.Packet packet)
addOutgoingMP
protected SecurityPolicyHolder addOutgoingMP(com.sun.xml.ws.api.model.wsdl.WSDLBoundOperation operation,
com.sun.xml.ws.policy.Policy policy)
throws com.sun.xml.ws.policy.PolicyException
- private Packet addAddressingHeaders(Packet packet, String relatesTo, String action){
AddressingBuilder builder = AddressingBuilder.newInstance();
AddressingProperties ap = builder.newAddressingProperties();
try{
// Action
ap.setAction(builder.newURI(new URI(action)));
// RelatesTo
Relationship[] rs = new Relationship[]{builder.newRelationship(new URI(relatesTo))};
ap.setRelatesTo(rs);
// To
ap.setTo(builder.newURI(new URI(builder.newAddressingConstants().getAnonymousURI())));
} catch (URISyntaxException e) {
throw new RuntimeException("Exception when adding Addressing Headers");
}
WsaRuntimeFactory fac = WsaRuntimeFactory.newInstance(ap.getNamespaceURI(), pipeConfig.getWSDLModel(), pipeConfig.getBinding());
fac.writeHeaders(packet, ap);
packet.invocationProperties
.put(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_OUTBOUND, ap);
return packet;
}
- Specified by:
addOutgoingMP
in class SecurityTubeBase
- Throws:
com.sun.xml.ws.policy.PolicyException
addIncomingMP
protected SecurityPolicyHolder addIncomingMP(com.sun.xml.ws.api.model.wsdl.WSDLBoundOperation operation,
com.sun.xml.ws.policy.Policy policy)
throws com.sun.xml.ws.policy.PolicyException
- Specified by:
addIncomingMP
in class SecurityTubeBase
- Throws:
com.sun.xml.ws.policy.PolicyException
addIncomingProtocolPolicy
protected void addIncomingProtocolPolicy(com.sun.xml.ws.policy.Policy effectivePolicy,
java.lang.String protocol)
throws com.sun.xml.ws.policy.PolicyException
- Specified by:
addIncomingProtocolPolicy
in class SecurityTubeBase
- Throws:
com.sun.xml.ws.policy.PolicyException
addOutgoingProtocolPolicy
protected void addOutgoingProtocolPolicy(com.sun.xml.ws.policy.Policy effectivePolicy,
java.lang.String protocol)
throws com.sun.xml.ws.policy.PolicyException
- Specified by:
addOutgoingProtocolPolicy
in class SecurityTubeBase
- Throws:
com.sun.xml.ws.policy.PolicyException
addIncomingFaultPolicy
protected void addIncomingFaultPolicy(com.sun.xml.ws.policy.Policy effectivePolicy,
SecurityPolicyHolder sph,
com.sun.xml.ws.api.model.wsdl.WSDLFault fault)
throws com.sun.xml.ws.policy.PolicyException
- Specified by:
addIncomingFaultPolicy
in class SecurityTubeBase
- Throws:
com.sun.xml.ws.policy.PolicyException
addOutgoingFaultPolicy
protected void addOutgoingFaultPolicy(com.sun.xml.ws.policy.Policy effectivePolicy,
SecurityPolicyHolder sph,
com.sun.xml.ws.api.model.wsdl.WSDLFault fault)
throws com.sun.xml.ws.policy.PolicyException
- Specified by:
addOutgoingFaultPolicy
in class SecurityTubeBase
- Throws:
com.sun.xml.ws.policy.PolicyException
getAction
protected java.lang.String getAction(com.sun.xml.ws.api.model.wsdl.WSDLOperation operation,
boolean inComming)
- Specified by:
getAction
in class SecurityTubeBase