javax.xml.rpc.Service Java Examples

The following examples show how to use javax.xml.rpc.Service. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ServiceProxy.java    From Tomcat8-Source-Read with MIT License 5 votes vote down vote up
/**
 * Constructs a new ServiceProxy wrapping given Service instance.
 * @param service the wrapped Service instance
 * @throws ServiceException should be never thrown
 */
public ServiceProxy(Service service) throws ServiceException {
    this.service = service;
    try {
        portQNameClass = Service.class.getDeclaredMethod("getPort", new Class[]{QName.class, Class.class});
        portClass = Service.class.getDeclaredMethod("getPort", new Class[]{Class.class});
    } catch (Exception e) {
        throw new ServiceException(e);
    }
}
 
Example #2
Source File: ServiceProxy.java    From Tomcat7.0.67 with Apache License 2.0 5 votes vote down vote up
/**
 * Constructs a new ServiceProxy wrapping given Service instance.
 * @param service the wrapped Service instance
 * @throws ServiceException should be never thrown
 */
public ServiceProxy(Service service) throws ServiceException {
    this.service = service;
    try {
        portQNameClass = Service.class.getDeclaredMethod("getPort", new Class[]{QName.class, Class.class});
        portClass = Service.class.getDeclaredMethod("getPort", new Class[]{Class.class});
    } catch (Exception e) {
        throw new ServiceException(e);
    }
}
 
Example #3
Source File: ServiceProxy.java    From tomcatsrc with Apache License 2.0 5 votes vote down vote up
/**
 * Constructs a new ServiceProxy wrapping given Service instance.
 * @param service the wrapped Service instance
 * @throws ServiceException should be never thrown
 */
public ServiceProxy(Service service) throws ServiceException {
    this.service = service;
    try {
        portQNameClass = Service.class.getDeclaredMethod("getPort", new Class[]{QName.class, Class.class});
        portClass = Service.class.getDeclaredMethod("getPort", new Class[]{Class.class});
    } catch (Exception e) {
        throw new ServiceException(e);
    }
}
 
Example #4
Source File: AxisContextHelper.java    From j-road with Apache License 2.0 5 votes vote down vote up
public void afterPropertiesSet() throws Exception {
  Stub stub = stubClass.getConstructor(Service.class).newInstance(new Object[] { null });
  for (Method m : stub.getClass().getDeclaredMethods()) {
    if (m.getName().equals("createCall")) {
      m.setAccessible(true);
      messageContext = ((Call) m.invoke(stub)).getMessageContext();
      break;
    }
  }
  if (messageContext == null) {
    throw new IllegalStateException("Could not find the createCall() method in the stub supplied!");
  }
}