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
Author:
shyam.rao@sun.com, Vbkumar.Jayanti@Sun.COM
  • Constructor Details

    • SecurityServerTube

      public SecurityServerTube(com.sun.xml.ws.assembler.dev.ServerTubelineAssemblyContext context, com.sun.xml.ws.api.pipe.Tube nextTube)
    • SecurityServerTube

      protected SecurityServerTube(SecurityServerTube that, com.sun.xml.ws.api.pipe.TubeCloner cloner)
  • Method Details

    • 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
      Specified by:
      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(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 ProcessingContext initializeOutgoingProcessingContext(com.sun.xml.ws.api.message.Packet packet, boolean isSCMessage, boolean isTrustMessage)
    • initializeOutgoingProcessingContext

      protected ProcessingContext initializeOutgoingProcessingContext(com.sun.xml.ws.api.message.Packet packet, boolean isSCMessage)
      Overrides:
      initializeOutgoingProcessingContext in class SecurityTubeBase
    • getOutgoingXWSSecurityPolicy

      protected MessagePolicy getOutgoingXWSSecurityPolicy(com.sun.xml.ws.api.message.Packet packet, boolean isSCMessage)
      Overrides:
      getOutgoingXWSSecurityPolicy in class SecurityTubeBase
    • getOutgoingFaultPolicy

      protected MessagePolicy getOutgoingFaultPolicy(com.sun.xml.ws.api.message.Packet packet)
    • verifyInboundMessage

      protected javax.xml.soap.SOAPMessage verifyInboundMessage(javax.xml.soap.SOAPMessage message, ProcessingContext ctx) throws WssSoapFaultException, com.sun.xml.wss.XWSSecurityException
      Overrides:
      verifyInboundMessage in class SecurityTubeBase
      Throws:
      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, PolicyAlternativeHolder ph) 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, PolicyAlternativeHolder ph) 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, String protocol, PolicyAlternativeHolder ph) 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, String protocol, PolicyAlternativeHolder ph) 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 String getAction(com.sun.xml.ws.api.model.wsdl.WSDLOperation operation, boolean inComming)
      Specified by:
      getAction in class SecurityTubeBase
    • loadFromClasspath

      public static URL loadFromClasspath(String configFileName)