Examples of AddressingBuilder


Examples of javax.xml.ws.addressing.AddressingBuilder

            addElement(soapElement);
         }
      }     
      if (props.getMessageID() != null)
      {
         AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
         Relationship rel = builder.newRelationship(props.getMessageID().getURI());
         this.relatesTo = new Relationship[] { rel };
      }

    this.initialized = true;
  }
View Full Code Here

Examples of javax.xml.ws.addressing.AddressingBuilder

   // Workaround for [JBWS-2015] Modify addressing handlers to work with the JAXWS-2.1 API
   private void initAddressingProperties(BindingProvider bindingProvider, EndpointReference epr)
   {
      Map<String, Object> reqContext = bindingProvider.getRequestContext();
      AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
      AddressingProperties addrProps = builder.newAddressingProperties();
      reqContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, addrProps);
     
      NativeEndpointReference nepr = EndpointReferenceUtil.transform(NativeEndpointReference.class, epr);
      try
      {
         if (nepr.getAddress() != null)
            addrProps.setTo(builder.newURI(nepr.getAddress()));

         List<Element> w3cRefParams = nepr.getReferenceParameters();
         if (w3cRefParams != null)
         {
            ReferenceParameters refParams = addrProps.getReferenceParameters();
View Full Code Here

Examples of javax.xml.ws.addressing.AddressingBuilder

    super.setUp();

    MessageFactory factory = MessageFactory.newInstance();
    SOAPMessage soapMessage = factory.createMessage(null, new ByteArrayInputStream(reqEnvStr.getBytes()));

    AddressingBuilder addrBuilder = SOAPAddressingBuilder.getAddressingBuilder();
    addrProps = (SOAPAddressingProperties)addrBuilder.newAddressingProperties();
    addrProps.readHeaders(soapMessage);
  }
View Full Code Here

Examples of javax.xml.ws.addressing.AddressingBuilder

    assertEquals(DOMUtils.parse(expEnv), DOMUtils.parse(wasEnv));
  }

  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);
View Full Code Here

Examples of javax.xml.ws.addressing.AddressingBuilder

            protocolMessages.add(rmConstants.getSequenceQName());
            protocolMessages.add(rmConstants.getAckRequestedQName());
         }
         else
         {
            AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
            AddressingProperties addressingProps = builder.newAddressingProperties();
            addressingProps.setTo(builder.newURI(addrProps.getReplyTo().getAddress().getURI()));
            addressingProps.setRelatesTo(new Relationship[] {builder.newRelationship(addrProps.getMessageID().getURI())});
            try
            {
               addressingProps.setAction(builder.newURI(RMAddressingConstants.SEQUENCE_ACKNOWLEDGEMENT_WSA_ACTION));
            }
            catch (URISyntaxException ignore)
            {
            }
            rmResponseContext.put(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_OUTBOUND, addressingProps);
View Full Code Here

Examples of javax.xml.ws.addressing.AddressingBuilder

    public static String coordinatorCompletionCoordinatorServiceURI = "http://" + bindHost + ":8080/ws-t11/BusinessAgreementWithCoordinatorCompletionCoordinatorService";

    public static synchronized AttributedURI getAtomicTransactionFaultAction()
    {
        if (atomicTransactionFaultAction == null) {
            AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
            try {
                atomicTransactionFaultAction = builder.newURI("http://docs.oasis-open.org/ws-tx/wsat/2006/06/fault");
            } catch (URISyntaxException use) {
                // not going to happen
            }
        }
View Full Code Here

Examples of javax.xml.ws.addressing.AddressingBuilder

    }

    public static synchronized AttributedURI getBusinessActivityFaultAction()
    {
        if (businessActivityFaultAction == null) {
            AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
            try {
                businessActivityFaultAction = builder.newURI("http://docs.oasis-open.org/ws-tx/wscoor/2006/06/fault");
            } catch (URISyntaxException use) {
                // not going to happen
            }
        }
View Full Code Here

Examples of javax.xml.ws.addressing.AddressingBuilder

        // Add client policies
        // ClientPolicy.register(handlerRegistry) ;
       
        // soapService = new SoapService(handlerRegistry) ;
        final String initiatorURIString = ServiceRegistry.getRegistry().getServiceURI(BAInteropConstants.SERVICE_INITIATOR) ;
        AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
        URI uri = null;
        try {
            uri = new URI(initiatorURIString);
            initiator = builder.newEndpointReference(uri);
        } catch (URISyntaxException e) {
            // TODO log error here
        }
    }
View Full Code Here

Examples of javax.xml.ws.addressing.AddressingBuilder

  protected boolean handleOutbound(MessageContext msgContext)
   {
      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

Examples of javax.xml.ws.addressing.AddressingBuilder

    super.setUp();

    MessageFactory factory = MessageFactory.newInstance();
    SOAPMessage soapMessage = factory.createMessage(null, new ByteArrayInputStream(reqEnvStr.getBytes()));

    AddressingBuilder addrBuilder = SOAPAddressingBuilder.getAddressingBuilder();
    addrProps = (SOAPAddressingProperties)addrBuilder.newAddressingProperties();
    addrProps.readHeaders(soapMessage);
  }
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.