Examples of NativeEndpointReference


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

   @Override
   public <T> T getPort(EndpointReference epr, Class<T> sei, WebServiceFeature... features)
   {
      URL wsdlLocation = null;
      QName serviceName = null;
      NativeEndpointReference nepr = EndpointReferenceUtil.transform(NativeEndpointReference.class, epr);
     
      wsdlLocation = nepr.getWsdlLocation();
      serviceName = nepr.getServiceName();
      ServiceDelegate delegate = createServiceDelegate(wsdlLocation, serviceName, Service.class);
      return delegate.getPort(epr, sei, features);
   }
View Full Code Here

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

   {
      if (eprInfoset == null)
         throw new NullPointerException("Provided eprInfoset cannot be null");
      try
      {
         final NativeEndpointReference nativeEPR = new NativeEndpointReference(eprInfoset);
         final Source source = EndpointReferenceUtil.getSourceFromEndpointReference(nativeEPR);
         return new W3CEndpointReference(source);
      }
      catch (Exception e)
      {
View Full Code Here

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

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

   @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

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

      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

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

      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

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

      "</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

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();
     
      Dispatch<T> dispatch = createDispatch(portName, type, mode);
      initAddressingProperties(dispatch, epr);
      initWebserviceFeatures(dispatch, features);
      return dispatch;
View Full Code Here

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

   @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

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

      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
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.