Package javax.xml.ws.addressing.soap

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


      {
         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


      context.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, new SOAPAddressingPropertiesImpl());
      MessageFactory factory = MessageFactory.newInstance();
      SOAPMessage soapMsg = factory.createMessage();
      context.setMessage(soapMsg);
      wsHandler.handleMessage(context);
      SOAPAddressingProperties addrProps = (SOAPAddressingProperties)context.get(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND);
      assertEquals(addrProps.getAction().getURI().toString(), "inputAction");
     
   }
View Full Code Here

         SOAPMessage soapMessage = msgContext.getMessage();
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         soapMessage.writeTo(baos);
         log.info(new String(baos.toByteArray()));
        
         SOAPAddressingProperties addrProps = (SOAPAddressingProperties)msgContext.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
         ReferenceParameters refParams = addrProps.getReferenceParameters();
         for (Object refParam : refParams.getElements())
         {
            input += "|" + ((SOAPElement)refParam).getValue();
         }
      }
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 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

      {
         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.