Package org.jboss.test.ws.jaxws.samples.dar.generated.reply

Examples of org.jboss.test.ws.jaxws.samples.dar.generated.reply.DarReplyEndpoint


         org.jboss.test.ws.jaxws.samples.dar.generated.reply.DarResponse darResponse = ReplyConverter.convertResponse(response);
         String replyTo = asyncRequest.getReplyTo().toURL().toString();
         log.info("Response will be sent to: " + replyTo);
         QName serviceName = new QName("http://org.jboss.ws/samples/dar", "DarReplyService");
         Service service = Service.create(new URL(replyTo + "?wsdl"), serviceName);
         DarReplyEndpoint endpoint = (DarReplyEndpoint)service.getPort(DarReplyEndpoint.class);
        
         //setup addressing configuration and properties
         ((StubExt)endpoint).setConfigName("Standard WSAddressing Client");
         ((BindingProvider)endpoint).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, replyTo);
         AddressingProperties requestProps = AddressingClientUtil.createOneWayProps(WSA_ACTION, replyTo);
         requestProps.setMessageID(AddressingClientUtil.createMessageID());
         Relationship[] relationships = new Relationship[1];
         relationships[0] = new RelationshipImpl(asyncRequest.getMessageId());
         requestProps.setRelatesTo(relationships);
         ((BindingProvider)endpoint).getRequestContext().put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, requestProps);
        
         endpoint.receive(darResponse);
         log.info("Response sent.");
      } catch (Exception e) {
         e.printStackTrace();
      }
   }
View Full Code Here

TOP

Related Classes of org.jboss.test.ws.jaxws.samples.dar.generated.reply.DarReplyEndpoint

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.