Package javax.xml.ws.addressing

Examples of javax.xml.ws.addressing.EndpointReference


         AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
         AddressingProperties outProps = builder.newAddressingProperties();
         outProps.setTo(builder.newURI("uri:jaxws-wsaddressing-initial/InitialService"));
         outProps.setAction(builder.newURI("http://org.jboss.ws/jaxws/wsaddressing/replyto/action"));

         EndpointReference eprReplyTo = builder.newEndpointReference(new URI("http://" + getServerHost() + ":8080/jaxws-wsaddressing-replyto/ReplyToService"));
         outProps.setReplyTo(eprReplyTo);
         outProps.setMessageID(builder.newURI("urn:uuid:" + UUIDGenerator.generateRandomUUIDString()));
         EndpointReference eprFaultTo = builder.newEndpointReference(new URI("http://" + getServerHost() + ":8080/jaxws-wsaddressing-faultto/FaultToService"));
         outProps.setFaultTo(eprFaultTo);

         msgContext.setProperty(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, outProps);
      }
      catch (URISyntaxException ex)
View Full Code Here


         //followupProps.setTo(addrBuilder.newURI(wsaTo));
         followupProps.setAction(addrBuilder.newURI(wsaAction));
         followupProps.setMessageID(AddressingClientUtil.createMessageID());

         // necessary in order to parse ref params
         EndpointReference epr = addrBuilder.newEndpointReference(new URI(wsaTo));

         String subscriptionID = response.getSubscriptionId();
         SOAPElementImpl element = new SOAPElementImpl(
            "Identifier",
            "wse", "http://schemas.xmlsoap.org/ws/2004/08/eventing"
         );
         element.setValue(subscriptionID);
         epr.getReferenceParameters().addElement(element);

         followupProps.initializeAsDestination(epr);

         return followupProps;
      }
View Full Code Here

         //followupProps.setTo(addrBuilder.newURI(wsaTo));
         followupProps.setAction(addrBuilder.newURI(wsaAction));
         followupProps.setMessageID(AddressingClientUtil.createMessageID());

         // necessary in order to parse ref params
         EndpointReference epr = addrBuilder.newEndpointReference(new URI(wsaTo));

         String subscriptionID = response.getSubscriptionId();
         SOAPElementImpl element = new SOAPElementImpl(
            "Identifier",
            "wse", "http://schemas.xmlsoap.org/ws/2004/08/eventing"
         );
         element.setValue(subscriptionID);
         epr.getReferenceParameters().addElement(element);

         followupProps.initializeAsDestination(epr);

         return followupProps;
      }
View Full Code Here

         }

      }
      else if (endpoint instanceof EndpointReference)
      {
         EndpointReference epr = (EndpointReference)endpoint;
         targetAddress = epr.getAddress().toString();
      }
      else
      {
         targetAddress = endpoint.toString();
      }
View Full Code Here

      BindingProvider bindingProviderA = (BindingProvider)portA;
     
      AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
      AddressingProperties props = builder.newAddressingProperties();
      props.setAction(builder.newURI("echo"));
      EndpointReference epr = builder.newEndpointReference(new URI(endpointBUrl));
      Element element = DOMUtils.parse("<wsarj:identifier xmlns:wsarj='myNS'>MyIdentifier</wsarj:identifier>");
      epr.getReferenceParameters().addElement(element);
      props.setReplyTo(epr);
      props.setTo(builder.newURI(new URI(endpointAUrl)));
      props.setMessageID(builder.newURI("TestMessageID"));
     
      bindingProviderA.getRequestContext().put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, props);
View Full Code Here

      AddressingProperties addrProps = (AddressingProperties)msgContext.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
      if (addrProps == null)
         throw new IllegalStateException("Cannot obtain AddressingProperties");

      String clientid = null;
      EndpointReference replyTo = addrProps.getReplyTo();
      ReferenceParameters refParams = replyTo!=null ? replyTo.getReferenceParameters() : null;
      if (refParams != null)
      {
         for (Object obj : refParams.getElements())
         {
            SOAPElement el = (SOAPElement)obj;
View Full Code Here

         AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
         AddressingProperties outProps = builder.newAddressingProperties();
         outProps.setTo(builder.newURI("uri:jaxws-wsaddressing-initial/InitialService"));
         outProps.setAction(builder.newURI("http://org.jboss.ws/jaxws/wsaddressing/replyto/action"));

         EndpointReference eprReplyTo = builder.newEndpointReference(new URI("http://" + getServerHost() + ":8080/jaxws-wsaddressing-replyto/ReplyToService"));
         outProps.setReplyTo(eprReplyTo);
         outProps.setMessageID(builder.newURI("urn:uuid:" + UUIDGenerator.generateRandomUUIDString()));
         EndpointReference eprFaultTo = builder.newEndpointReference(new URI("http://" + getServerHost() + ":8080/jaxws-wsaddressing-faultto/FaultToService"));
         outProps.setFaultTo(eprFaultTo);

         msgContext.setProperty(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, outProps);
      }
      catch (URISyntaxException ex)
View Full Code Here

         AddressingProperties outProps = builder.newAddressingProperties();
         outProps.setTo(builder.newURI("uri:jaxrpc-samples-wsaddressing/TestService"));
         outProps.setAction(builder.newURI("http://org.jboss.ws/addressing/stateful/action"));

         EndpointReference replyTo = builder.newEndpointReference(new URI(ADDR.getAnonymousURI()));
         outProps.setReplyTo(replyTo);
         outProps.setMessageID(builder.newURI("urn:uuid:"+ UUIDGenerator.generateRandomUUIDString()));

         // Assign a new clientid
         if (clientid == null)
         {
            clientid = "clientid-" + (++maxClientId);
            log.info("New clientid: " + clientid);
         }

         ReferenceParameters refParams = replyTo.getReferenceParameters();
         refParams.addElement(getClientIdElement(clientid));

         msgContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, outProps);
         msgContext.setScope(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, Scope.APPLICATION);
      }
View Full Code Here

         }

      }
      else if (endpoint instanceof EndpointReference)
      {
         EndpointReference epr = (EndpointReference)endpoint;
         targetAddress = epr.getAddress().toString();
      }
      else
      {
         targetAddress = endpoint.toString();
      }
View Full Code Here

      {
         AddressingBuilder builder = SOAPAddressingBuilder.getAddressingBuilder();
         SOAPAddressingProperties outProps = (SOAPAddressingProperties)builder.newAddressingProperties();
         outProps.setTo(builder.newURI("http://" + getServerHost() + ":8080/jaxrpc-samples-wsaddr-hello"));
         outProps.setAction(builder.newURI("http://org.jboss.ws/jaxrpc/samples/wsaddr/replyto/sayHello"));
         EndpointReference rp = builder.newEndpointReference(new URI("http://" + getServerHost() + ":8080/jaxrpc-samples-wsaddr-replyto"));
         outProps.setReplyTo(rp);
         outProps.setMessageID(builder.newURI("123456"));
         context.setProperty(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, outProps);
      }
      catch(URISyntaxException e)
View Full Code Here

TOP

Related Classes of javax.xml.ws.addressing.EndpointReference

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.