public <T> T getPort(EndpointReferenceType endpointReference, Class<T> type) { return getPort(endpointReference, type, new WebServiceFeature[]{}); }
public <T> T getPort(Class<T> serviceEndpointInterface) { return getPort(serviceEndpointInterface, new WebServiceFeature[]{}); }
public <T> T getPort(QName portName, Class<T> serviceEndpointInterface) { return getPort(portName, serviceEndpointInterface, new WebServiceFeature[]{}); }
@Override public <T> T getPort(EndpointReference endpointReference, Class<T> serviceEndpointInterface, WebServiceFeature... features) { return getPort(ProviderImpl.convertToInternal(endpointReference), serviceEndpointInterface, features); }
public <T> T getPort(EndpointReferenceType endpointReference, Class<T> type) { return getPort(endpointReference, type, new WebServiceFeature[]{}); }
public <T> T getPort(Class<T> serviceEndpointInterface) { return getPort(serviceEndpointInterface, new WebServiceFeature[]{}); }
public <T> T getPort(QName portName, Class<T> serviceEndpointInterface) { return getPort(portName, serviceEndpointInterface, new WebServiceFeature[]{}); }
@Override public <T> T getPort(EndpointReference endpointReference, Class<T> serviceEndpointInterface, WebServiceFeature... features) { return getPort(ProviderImpl.convertToInternal(endpointReference), serviceEndpointInterface, features); }
public void doWith(Field field) throws IllegalArgumentException, IllegalAccessException { if (field.getAnnotation(WebServiceRef.class) != null) { ServiceImpl s = new ServiceImpl(getBus(), null, null, field.getType()); s.addPort(new QName("port"), JBITransportFactory.TRANSPORT_ID, "jbi://" + ID_GENERATOR.generateSanitizedId()); Object o = s.getPort(new QName("port"), field.getType()); field.setAccessible(true); field.set(getPojo(), o); } } });
public Greeter createGreeter(EndpointReferenceType target) throws Exception { ServiceImpl serviceImpl = ServiceDelegateAccessor.get(new SOAPService(getWSDLURL(), SERVICE_NAME)); Greeter g = serviceImpl.getPort(target, Greeter.class); updateAddressPort(g, getPort()); return g; }
@Test public void testWithGetPortExtensionHttp() throws Exception { NumberFactoryService service = new NumberFactoryService(); NumberFactory factory = service.getNumberFactoryPort(); updateAddressPort(factory, PORT); NumberService numService = new NumberService(); ServiceImpl serviceImpl = ServiceDelegateAccessor.get(numService); W3CEndpointReference numberTwoRef = factory.create("20"); assertNotNull("reference", numberTwoRef); Number num = serviceImpl.getPort(numberTwoRef, Number.class); assertTrue("20 is even", num.isEven().isEven()); W3CEndpointReference numberTwentyThreeRef = factory.create("23"); num = serviceImpl.getPort(numberTwentyThreeRef, Number.class); assertTrue("23 is not even", !num.isEven().isEven()); }
@Test public void testWithGetPortExtensionHttp() throws Exception { NumberFactoryService service = new NumberFactoryService(); NumberFactory factory = service.getNumberFactoryPort(); updateAddressPort(factory, PORT); W3CEndpointReference w3cEpr = factory.create("20"); EndpointReferenceType numberTwoRef = ProviderImpl.convertToInternal(w3cEpr); assertNotNull("reference", numberTwoRef); // use getPort with epr api on service NumberService numService = new NumberService(); ServiceImpl serviceImpl = ServiceDelegateAccessor.get(numService); Number num = serviceImpl.getPort(numberTwoRef, Number.class); assertTrue("20 is even", num.isEven().isEven()); w3cEpr = factory.create("23"); EndpointReferenceType numberTwentyThreeRef = ProviderImpl.convertToInternal(w3cEpr); num = serviceImpl.getPort(numberTwentyThreeRef, Number.class); assertTrue("23 is not even", !num.isEven().isEven()); }
@Test public void testWithGetPortExtensionHttp() throws Exception { NumberFactoryService service = new NumberFactoryService(); NumberFactory factory = service.getNumberFactoryPort(); updateAddressPort(factory, PORT); NumberService numService = new NumberService(); ServiceImpl serviceImpl = ServiceDelegateAccessor.get(numService); W3CEndpointReference numberTwoRef = factory.create("20"); assertNotNull("reference", numberTwoRef); Number num = serviceImpl.getPort(numberTwoRef, Number.class); assertTrue("20 is even", num.isEven().isEven()); close(num); W3CEndpointReference numberTwentyThreeRef = factory.create("23"); num = serviceImpl.getPort(numberTwentyThreeRef, Number.class); assertTrue("23 is not even", !num.isEven().isEven()); close(num); close(factory); }