Package javax.xml.ws.addressing.soap

Examples of javax.xml.ws.addressing.soap.SOAPAddressingProperties


   protected boolean handleOutbound(MessageContext msgContext)
   {
      log.debug("handling outbound message");
     
      CommonMessageContext commonMsgContext = (CommonMessageContext)msgContext;
      SOAPAddressingProperties addrProps = (SOAPAddressingProperties)commonMsgContext.get(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND);
      Map<String, Object> rmOutboundContext = (Map<String, Object>)commonMsgContext.get(RMConstant.REQUEST_CONTEXT);
      List<QName> outMsgs = (List<QName>)rmOutboundContext.get(RMConstant.PROTOCOL_MESSAGES);
      Map<QName, RMSerializable> data = new HashMap<QName, RMSerializable>();
      String optionalMessageId = (addrProps.getMessageID() != null) ? addrProps.getMessageID().getURI().toString() : null;
      rmOutboundContext.put(RMConstant.WSA_MESSAGE_ID, optionalMessageId);
      rmOutboundContext.put(RMConstant.PROTOCOL_MESSAGES_MAPPING, data);
      SOAPMessage soapMessage = ((SOAPMessageContext)commonMsgContext).getMessage();
      RMSequence sequenceImpl = (RMSequence)rmOutboundContext.get(RMConstant.SEQUENCE_REFERENCE);
     
View Full Code Here


   protected final boolean handleOutbound(MessageContext msgContext)
   {
      log.debug("handling outbound message");
     
      CommonMessageContext commonMsgContext = (CommonMessageContext)msgContext;
      SOAPAddressingProperties addrProps = (SOAPAddressingProperties)commonMsgContext.get(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND);
      Map<String, Object> rmOutboundContext = (Map<String, Object>)commonMsgContext.get(RMConstant.RESPONSE_CONTEXT);
      List<QName> outMsgs = (List<QName>)rmOutboundContext.get(RMConstant.PROTOCOL_MESSAGES);
      Map<QName, RMSerializable> data = new HashMap<QName, RMSerializable>();
      String optionalMessageId = (addrProps.getMessageID() != null) ? addrProps.getMessageID().getURI().toString() : null;
      rmOutboundContext.put(RMConstant.WSA_MESSAGE_ID, optionalMessageId);
      rmOutboundContext.put(RMConstant.PROTOCOL_MESSAGES_MAPPING, data);
      SOAPMessage soapMessage = ((SOAPMessageContext)commonMsgContext).getMessage();
      RMSequence sequenceImpl = (RMSequence)rmOutboundContext.get(RMConstant.SEQUENCE_REFERENCE);
     
View Full Code Here

   @Override
   public boolean handleFault(MessageContext msgContext)
   {
      log.debug("handling fault message");
      CommonMessageContext commonMsgContext = (CommonMessageContext)msgContext;
      SOAPAddressingProperties addrProps = (SOAPAddressingProperties)commonMsgContext.get(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND);
      Map<String, Object> rmOutboundContext = (Map<String, Object>)commonMsgContext.get(RMConstant.RESPONSE_CONTEXT);
      List<QName> outMsgs = (List<QName>)rmOutboundContext.get(RMConstant.PROTOCOL_MESSAGES);
      Map<QName, RMSerializable> data = new HashMap<QName, RMSerializable>();
      String optionalMessageId = (addrProps.getMessageID() != null) ? addrProps.getMessageID().getURI().toString() : null;
      rmOutboundContext.put(RMConstant.WSA_MESSAGE_ID, optionalMessageId);
      rmOutboundContext.put(RMConstant.PROTOCOL_MESSAGES_MAPPING, data);
      SOAPMessage soapMessage = ((SOAPMessageContext)commonMsgContext).getMessage();
      RMFault sequenceFault = (RMFault)rmOutboundContext.get(RMConstant.FAULT_REFERENCE);
View Full Code Here

   {
      log.info("handleRequest" + this);
      try
      {
         AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
         SOAPAddressingProperties outProps = (SOAPAddressingProperties)builder.newAddressingProperties();
      outProps.setMu(true);
      outProps.setTo(builder.newURI("http://localhost:8080/jaxrpc-addressing-action-rpc/ActionService"));
         outProps.setAction(builder.newURI("urn:wsa-action-bar"));
         msgContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, outProps);
      }
      catch (URISyntaxException ex)
      {
         throw new IllegalStateException("Cannot handle request", ex);
View Full Code Here

   {
      log.info("handleRequest" + this);
      try
      {
         SOAPAddressingBuilder builder = (SOAPAddressingBuilder)SOAPAddressingBuilder.getAddressingBuilder();
         SOAPAddressingProperties outProps = (SOAPAddressingProperties)builder.newAddressingProperties();
         outProps.setTo(builder.newURI("http://localhost:8080/jaxrpc-addressing-action-rpc/ActionService"));
         outProps.setAction(builder.newURI("urn:wsa-action-bar"));
         msgContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, outProps);
      }
      catch (URISyntaxException ex)
      {
         throw new IllegalStateException("Cannot handle request", ex);
View Full Code Here

  }

  public void testReplyToHeaders() throws Exception
  {
    AddressingBuilder addrBuilder = SOAPAddressingBuilder.getAddressingBuilder();
    SOAPAddressingProperties replyProps = (SOAPAddressingProperties)addrBuilder.newAddressingProperties();
    replyProps.initializeAsReply(addrProps, false);
    replyProps.setAction(addrBuilder.newURI("http://fabrikam123.example/ReplyPO"));

    MessageFactory factory = MessageFactory.newInstance();
    SOAPMessage wasMsg = factory.createMessage();
    replyProps.writeHeaders(wasMsg);

    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    wasMsg.writeTo(baos);
    String wasEnv = new String(baos.toByteArray());
View Full Code Here

      setRequestProperties((BindingProvider)echoPort, requestProps);

      // invoke service
      echoPort.echoOp(new EchoInMessage("Message 1130"));

      SOAPAddressingProperties responseProperties = (SOAPAddressingProperties)
          getResponseProperties((BindingProvider)echoPort);

      forceReset();

      Relationship rel = responseProperties.getRelatesTo()[0];
      assertEquals(rel.getID().toString(), requestProps.getMessageID().getURI().toString());

   }
View Full Code Here

      setRequestProperties((BindingProvider)echoPort, requestProps);

      // invoke service
      echoPort.echoOp(new EchoInMessage("Message 1131"));

      SOAPAddressingProperties responseProperties = (SOAPAddressingProperties)
          getResponseProperties((BindingProvider)echoPort);
      forceReset();

      Relationship rel = responseProperties.getRelatesTo()[0];
      assertEquals(rel.getID().toString(), requestProps.getMessageID().getURI().toString());
      assertTrue(null == responseProperties.getReplyTo());

   }
View Full Code Here

      setRequestProperties((BindingProvider)echoPort, requestProps);

      // invoke service
      echoPort.echoOp(new EchoInMessage("Message 1132"));

      SOAPAddressingProperties responseProperties = (SOAPAddressingProperties)
          getResponseProperties((BindingProvider)echoPort);

      forceReset();

      Relationship rel = responseProperties.getRelatesTo()[0];
      assertEquals(rel.getID().toString(), requestProps.getMessageID().getURI().toString());
      assertTrue(null == responseProperties.getReplyTo());
      List<Object> returnParameters = responseProperties.getReferenceParameters().getElements();
      assertFalse("Reference parameter is missing", returnParameters.isEmpty());

   }
View Full Code Here

      {
         boolean isSoapFault = (e.getCause() instanceof SOAPFaultException);
         if(!isSoapFault) throw e;
      }

      SOAPAddressingProperties responseProperties = (SOAPAddressingProperties)
          getResponseProperties((BindingProvider)echoPort);

      forceReset();

      Relationship rel = responseProperties.getRelatesTo()[0];
      assertEquals(rel.getID().toString(), requestProps.getMessageID().getURI().toString());
      assertTrue(null == responseProperties.getReplyTo());
      List<Object> returnParameters = responseProperties.getReferenceParameters().getElements();
      assertFalse("Reference parameter is missing", returnParameters.isEmpty());
   }
View Full Code Here

TOP

Related Classes of javax.xml.ws.addressing.soap.SOAPAddressingProperties

Copyright © 2018 www.massapicom. 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.