Examples of SOAPMessageContext


Examples of javax.xml.ws.handler.soap.SOAPMessageContext

         HttpServletRequest request = (HttpServletRequest) messageContext.get(MessageContext.SERVLET_REQUEST);
        
         String conversationId = Manager.instance().getCurrentConversationId();
         if (conversationId != null)
         {
            SOAPMessageContext smc = (SOAPMessageContext) messageContext;
           
            SOAPHeader header = smc.getMessage().getSOAPHeader();
            if (header != null)
            {
               SOAPElement element = header.addChildElement(CIDQN);
               element.addTextNode(conversationId);
               smc.getMessage().saveChanges();              
            }           
         }
        
         Manager.instance().endRequest( new ServletRequestSessionMap(request) );
        
View Full Code Here

Examples of javax.xml.ws.handler.soap.SOAPMessageContext

    * @throws SOAPException
    */
   private String extractConversationId(MessageContext messageContext)
      throws SOAPException
   {
      SOAPMessageContext smc = (SOAPMessageContext) messageContext;
      SOAPHeader header = smc.getMessage().getSOAPHeader();
     
      if (header != null)
      {
         Iterator iter = header.getChildElements(CIDQN);
         if (iter.hasNext())
View Full Code Here

Examples of javax.xml.ws.handler.soap.SOAPMessageContext

    @Override
    protected void initialize(MessageContext mc) {
        super.initialize(mc);   
       
        SOAPMessageContext soapMC = (SOAPMessageContext)POJOWebServiceContext.get().getMessageContext();
        ContextUtils.addWSDLProperties_provider(mc, soapMC);
    }
View Full Code Here

Examples of javax.xml.ws.handler.soap.SOAPMessageContext

    @Override
    protected void initialize(MessageContext mc) {
        super.initialize(mc);   
       
        SOAPMessageContext soapMC = (SOAPMessageContext)POJOWebServiceContext.get().getMessageContext();
        ContextUtils.addWSDLProperties(mc, soapMC);
    }
View Full Code Here

Examples of javax.xml.ws.handler.soap.SOAPMessageContext

      return cookie.toString();
   }

   public boolean handleResponse(MessageContext msgContext)
   {
      SOAPMessageContext smc = (SOAPMessageContext)msgContext;
      SOAPMessage message = smc.getMessage();
      MimeHeaders mimeHeaders = message.getMimeHeaders();
      String[] cookieValues = mimeHeaders.getHeader(CookieUtil.SET_COOKIE);

      String endpointAddress = (String)msgContext.get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY);
      if (cookieValues != null)
View Full Code Here

Examples of javax.xml.ws.handler.soap.SOAPMessageContext

      return true;
   }

   public boolean handleResponse(MessageContext msgContext)
   {
      SOAPMessageContext smc = (SOAPMessageContext)msgContext;
      SOAPMessage message = smc.getMessage();
      MimeHeaders mimeHeaders = message.getMimeHeaders();
      String[] cookieValues = mimeHeaders.getHeader("Set-Cookie");

      if (cookieValues != null)
      {
View Full Code Here

Examples of javax.xml.ws.handler.soap.SOAPMessageContext

    @Test
    public void handleMessage() throws Exception
    {
        final SOAPSamlHandler handler = new SOAPSamlHandler();
        final SOAPMessageContext messageContext = mock(SOAPMessageContext.class);
        final SOAPMessage soapMessage = MessageFactory.newInstance().createMessage();

        when(messageContext.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY)).thenReturn(true);
        when(messageContext.getMessage()).thenReturn(soapMessage);

        SamlCredential samlPrincipal = new SamlCredential(StreamUtils.readStreamString(getClass().getResourceAsStream("assertion.xml"), "UTF-8"));

        boolean result = handler.handleMessage(messageContext);
        assertTrue(result);
View Full Code Here

Examples of javax.xml.ws.handler.soap.SOAPMessageContext

   private boolean verifyXOPPackage(MessageContext context)
   {
      try
      {
         SOAPMessageContext msgContext = (SOAPMessageContext)context;
         SOAPMessage soapMsg = msgContext.getMessage();
         SOAPEnvelope soapEnv = soapMsg.getSOAPPart().getEnvelope();
         SOAPBody body = soapEnv.getBody();
         boolean found = scanNodes(body.getChildNodes());

         if(found) throw new IllegalStateException("XOP request not properly inlined");
View Full Code Here

Examples of javax.xml.ws.handler.soap.SOAPMessageContext

   private boolean verifyXOPPackage(MessageContext context)
   {
      try
      {
         SOAPMessageContext msgContext = (SOAPMessageContext)context;
         SOAPMessage soapMsg = msgContext.getMessage();
         SOAPEnvelope soapEnv = soapMsg.getSOAPPart().getEnvelope();
         SOAPBody body = soapEnv.getBody();
         boolean found = scanNodes(body.getChildNodes());

         if(found) throw new IllegalStateException("XOP request not properly inlined");
View Full Code Here

Examples of org.apache.axis2.jaxws.handler.SoapMessageContext

     * @param mepCtx
     * @return
     */
    public static SoapMessageContext createSoapMessageContext(
            org.apache.axis2.jaxws.core.MessageContext jaxwsMessageContext) {
        SoapMessageContext soapCtx = new SoapMessageContext(jaxwsMessageContext);
        ContextUtils.addProperties(soapCtx, jaxwsMessageContext);
        return soapCtx;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.