Package javax.xml.ws.addressing

Examples of javax.xml.ws.addressing.AttributedURI


     */
    public void sendSoapFault(final AddressingProperties addressingProperties, final SoapFault11 soapFault)
        throws SoapFault, IOException
    {
        String soapFaultAction = soapFault.getAction() ;
        AttributedURI actionURI = null;
        if (soapFaultAction == null)
        {
            soapFaultAction = faultAction;
        }
        try {
View Full Code Here


    {
        // TODO - we need the 2.1 verison of Service so we can specify that we want to use the WS Addressing feature
        InitiatorService service = getInitiatorService();
        InitiatorPortType port = service.getPort(InitiatorPortType.class);
        BindingProvider bindingProvider = (BindingProvider)port;
        AttributedURI toUri = addressingProperties.getTo();
        List<Handler> customHandlerChain = new ArrayList<Handler>();
        /*
         * we have to add the JaxWS WSAddressingClientHandler because we cannot specify the WSAddressing feature
         */
    customHandlerChain.add(new WSAddressingClientHandler());
    bindingProvider.getBinding().setHandlerChain(customHandlerChain);

        Map<String, Object> requestContext = bindingProvider.getRequestContext();
        requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, addressingProperties);
      // jbossws should do this for us . . .
      requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, addressingProperties);
        requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, toUri.getURI().toString());
        try {
            addressingProperties.setAction(builder.newURI(action));
        } catch (URISyntaxException use) {
            // TODO log this error
        }
View Full Code Here

    {
        // TODO - we need the 2.1 verison of Service so we can specify that we want to use the WS Addressing feature
        ParticipantService service = getParticipantService();
        ParticipantPortType port = service.getPort(ParticipantPortType.class);
        BindingProvider bindingProvider = (BindingProvider)port;
        AttributedURI toUri = addressingProperties.getTo();
        List<Handler> customHandlerChain = new ArrayList<Handler>();
        /*
         * we have to add the JaxWS WSAddressingClientHandler because we cannot specify the WSAddressing feature
         */
    customHandlerChain.add(new WSAddressingClientHandler());
        /*
         * we need to add the coordination context handler in the case where we are passing a
         * coordination context via a header element
         */
        customHandlerChain.add(new CoordinationContextHandler());
    bindingProvider.getBinding().setHandlerChain(customHandlerChain);

        Map<String, Object> requestContext = bindingProvider.getRequestContext();
        requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, addressingProperties);
      // jbossws should do this for us . . .
      requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, addressingProperties);
        requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, toUri.getURI().toString());
        try {
            addressingProperties.setAction(builder.newURI(action));
        } catch (URISyntaxException use) {
            // TODO log this error
        }
View Full Code Here

   }
  
   private static void configureAddressingProperties(BindingProvider bp, String wsaAction, String wsaTo, String replyTo) throws URISyntaxException
   {
      AddressingProperties requestProps = AddressingClientUtil.createDefaultProps(wsaAction, wsaTo);
      AttributedURI messageId = AddressingClientUtil.createMessageID();
      System.out.println("Sent message ID: " + messageId.getURI());
      requestProps.setMessageID(messageId);
      requestProps.setReplyTo(BUILDER.newEndpointReference(new URI(replyTo)));
      bp.getRequestContext().put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, requestProps);
   }
View Full Code Here

/*     */   public SubscribeResponse subscribeOp(@WebParam(name="Subscribe", targetNamespace="http://schemas.xmlsoap.org/ws/2004/08/eventing", partName="body") Subscribe request)
/*     */   {
/*     */     try
/*     */     {
/*  69 */       AddressingProperties inProps = getAddrProperties();
/*  70 */       AttributedURI eventSourceURI = inProps.getTo();
/*  71 */       getLogger().debug("Subscribe request for event source: " + eventSourceURI.getURI());
/*     */
/*  73 */       assertSubscriberEndpoints(request);
/*  74 */       EndpointReferenceType notifyTo = request.getDelivery().getNotifyTo();
/*  75 */       EndpointReferenceType endTo = request.getEndTo();
/*     */
/*  78 */       Filter filter = null;
/*  79 */       if (request.getFilter() != null) {
/*     */         try
/*     */         {
/*  82 */           filter = new Filter(new URI(request.getFilter().getDialect()), (String)request.getFilter().getContent().get(0));
/*     */         }
/*     */         catch (URISyntaxException e)
/*     */         {
/*  86 */           throw new WSException(e);
/*     */         }
/*     */
/*     */       }
/*     */
/*  91 */       SubscriptionManagerMBean subscriptionManager = getSubscriptionManager();
/*  92 */       SubscriptionTicket ticket = subscriptionManager.subscribe(eventSourceURI.getURI(), notifyTo, endTo, request.getExpires(), filter);
/*     */
/* 100 */       SubscribeResponse res = new SubscribeResponse();
/* 101 */       res.setExpires(ticket.getExpires());
/* 102 */       res.setSubscriptionManager(ticket.getSubscriptionManager());
/*     */
View Full Code Here

TOP

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

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.