Package org.jboss.ws.core.jaxws.wsaddressing

Examples of org.jboss.ws.core.jaxws.wsaddressing.NativeEndpointReference


   @Override
   public <T> Dispatch<T> createDispatch(EndpointReference epr, Class<T> type, Mode mode, WebServiceFeature... features)
   {
      QName portName = null;
      NativeEndpointReference nepr = EndpointReferenceUtil.transform(NativeEndpointReference.class, epr);
      portName = nepr.getEndpointName();
     
      //From the JAXWS dispacth api, EPR's address MUST be used for invocations on the endpoint
      if (getEndpointMetaData(portName) != null && nepr.getAddress() != null  && nepr.getAddress().length() > 0)
      {
          getEndpointMetaData(portName).setEndpointAddress(nepr.getAddress());
      }
     
      Dispatch<T> dispatch = createDispatch(portName, type, mode);
      initAddressingProperties(dispatch, epr);
      initWebserviceFeatures(dispatch, features);
View Full Code Here


   @Override
   public Dispatch<Object> createDispatch(EndpointReference epr, JAXBContext context, Mode mode, WebServiceFeature... features)
   {
      QName portName = null;
      NativeEndpointReference nepr = EndpointReferenceUtil.transform(NativeEndpointReference.class, epr);
      portName = nepr.getEndpointName();
      //From the JAXWS dispacth api, EPR's address MUST be used for invocations on the endpoint
    if (getEndpointMetaData(portName) != null && nepr.getAddress() != null
        && nepr.getAddress().length() > 0) {
      getEndpointMetaData(portName).setEndpointAddress(nepr.getAddress());
    }
      Dispatch<Object> dispatch = createDispatch(portName, context, mode);
      initAddressingProperties(dispatch, epr);
      initWebserviceFeatures(dispatch, features);
      return dispatch;
View Full Code Here

      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();
            for (Element w3cRefParam : w3cRefParams)
            {
View Full Code Here

      if ((serviceName == null) && (address == null) && (portName == null))
         throw new IllegalStateException();
      if ((portName != null) && (serviceName == null))
         throw new IllegalStateException();
     
      final NativeEndpointReference epr = new NativeEndpointReference();
      epr.setAddress(address);
      epr.setServiceName(serviceName);
      epr.setEndpointName(portName);
      epr.setInterfaceName(interfaceName);
      epr.setMetadata(metadata);
      epr.setWsdlLocation(wsdlDocumentLocation);
      epr.setReferenceParameters(referenceParameters);

      return EndpointReferenceUtil.transform(W3CEndpointReference.class, epr);
   }
View Full Code Here

      "</EndpointReference>";

   public void testNativeEndpointReferenceFromSource() throws Exception
   {
      final Source xml = new DOMSource(DOMUtils.parse(XML));
      NativeEndpointReference epr = new NativeEndpointReference(xml);
      DOMResult dr = new DOMResult();
      epr.writeTo(dr);
      Node endpointReferenceElement = dr.getNode();
      assertMetaData(endpointReferenceElement);
      assertRefParam(endpointReferenceElement, PARAM1_QNAME, "Hello");
      assertRefParam(endpointReferenceElement, PARAM2_QNAME, "World");
      assertEquals(new QName(MY_NS, "HelloService", MY_PREFIX), epr.getServiceName());
      assertEquals(new QName(MY_NS, "Hello", MY_PREFIX), epr.getInterfaceName());
      assertEquals(new QName(MY_NS, "HelloPort", MY_PREFIX), epr.getEndpointName());
   }
View Full Code Here

   @Override
   public <T> Dispatch<T> createDispatch(EndpointReference epr, Class<T> type, Mode mode, WebServiceFeature... features)
   {
      QName portName = null;
      NativeEndpointReference nepr = EndpointReferenceUtil.transform(NativeEndpointReference.class, epr);
      portName = nepr.getEndpointName();
     
      Dispatch<T> dispatch = createDispatch(portName, type, mode);
      initAddressingProperties(dispatch, epr);
      initWebserviceFeatures(dispatch, features);
      return dispatch;
View Full Code Here

   @Override
   public Dispatch<Object> createDispatch(EndpointReference epr, JAXBContext context, Mode mode, WebServiceFeature... features)
   {
      QName portName = null;
      NativeEndpointReference nepr = EndpointReferenceUtil.transform(NativeEndpointReference.class, epr);
      portName = nepr.getEndpointName();

      Dispatch<Object> dispatch = createDispatch(portName, context, mode);
      initAddressingProperties(dispatch, epr);
      initWebserviceFeatures(dispatch, features);
      return dispatch;
View Full Code Here

      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();
            for (Element w3cRefParam : w3cRefParams)
            {
View Full Code Here

TOP

Related Classes of org.jboss.ws.core.jaxws.wsaddressing.NativeEndpointReference

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.