Package intf.ports

Examples of intf.ports.XCATPort


   */
  public static XCATPort createReference(String url, String intfClassName)
    throws gov.cca.CCAException {
    logger.finest("called");
    try {
      XCATPort reference =
  (XCATPort) SoapServices.getDefault().
  createStartpoint(url, // location
       new Class[]{Class.forName(intfClassName)}, // remote service interface
       "", // endpoint name
       soaprmi.soap.SoapStyle.SOAP11, // SOAP style
View Full Code Here


    logger.finest("called with handle: " + handle);

    long start = System.currentTimeMillis();

    // Initialize the return value
    XCATPort reference = null;
   
    // check to see if this service exists in the same address space
    if (LocalServiceRegistry.containsService(handle))
      reference = (XCATPort) LocalServiceRegistry.getServiceImpl(handle);
    else {
      // make sure the handleResolver exists
      if (handleResolverURL == null)
  throw new NonstandardException("Unable to locate a Handle Resolver implementation");

      // Use the real HandleResolver to get a reference
      LocatorType portLocator = null;
     
      try {
  portLocator = ClientUtil.findByHandle(handleResolverURL,
                handle);
      } catch (Exception e) {
  logger.severe("Exception while trying to find a Reference via Handle",
          e);
  throw new NonstandardException("Exception while trying to find a Reference via Handle",
               e);
      }

      ReferenceType[] portRef = portLocator.getReferenceArray();
     
      if (portRef.length > 0) {
  String portGSR = XmlUtil.getChildOf(portRef[0]);
  if (portGSR != null) {
    try {
      // reference = (XCATPort) WSDLUtil.convertWSDLToRef(portGSR);
      reference =
        (XCATPort) SoapServices.getDefault().createStartpointFromXml(portGSR);
    } catch (Exception e) {
      // logger.severe("Can not convert WSDL to XSOAP Reference", e);
      // throw new NonstandardException("Can not convert WSDL to XSOAP Reference",
      //                    e);
      logger.severe("Can not convert stringified reference to XCATPort", e);
      throw new NonstandardException("Can not convert stringified reference to XCATPort",
             e);
    }
  } else {
    logger.severe("Reference for " + handle +
      " found to be null");
    throw new NonstandardException("Reference for " + handle +
           " found to be null");
  }
      } else {
  logger.severe("No reference found for " + handle +
          " in Resolver: " + handleResolverURL);
  throw new NonstandardException("No reference found for " + handle +
               " in Resolver: " + handleResolverURL);
      }
    }
   
    // check if the returned object has the expected interface
    logger.finest("Returned class: " + reference.getClass().getName());
    try {
      if (!(Class.forName(intfClassName).isAssignableFrom(reference.getClass())))
  throw new NonstandardException("Returned reference is not an instance of " +
               intfClassName);
    } catch (ClassNotFoundException cnfe) {
      logger.severe("Can't verify if returned class conforms to specified interface",
        cnfe);
View Full Code Here

TOP

Related Classes of intf.ports.XCATPort

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.