package org.cagrid.delegatedcredential.wsrf.stubs; /** * Please modify this class to meet your needs * This class is not complete */ import java.io.File; import java.net.MalformedURLException; import java.net.URL; import javax.xml.namespace.QName; import org.cagrid.delegatedcredential.wsrf.service.DelegatedCredentialService; import javax.jws.WebMethod; import javax.jws.WebParam; import javax.jws.WebResult; import javax.jws.WebService; import javax.jws.soap.SOAPBinding; import javax.xml.bind.annotation.XmlSeeAlso; import javax.xml.ws.RequestWrapper; import javax.xml.ws.ResponseWrapper; /** * This class was generated by Apache CXF 2.6.3 * 2013-05-06T17:03:48.057-04:00 * Generated source version: 2.6.3 * */ public final class DelegatedCredentialPortType_DelegatedCredentialPortTypePort_Client { private static final QName SERVICE_NAME = new QName("http://cds.gaards.cagrid.org/CredentialDelegationService/DelegatedCredential/service", "DelegatedCredentialService"); private DelegatedCredentialPortType_DelegatedCredentialPortTypePort_Client() { } public static void main(String args[]) throws Exception { URL wsdlURL = DelegatedCredentialService.WSDL_LOCATION; if (args.length > 0 && args[0] != null && !"".equals(args[0])) { File wsdlFile = new File(args[0]); try { if (wsdlFile.exists()) { wsdlURL = wsdlFile.toURI().toURL(); } else { wsdlURL = new URL(args[0]); } } catch (MalformedURLException e) { e.printStackTrace(); } } DelegatedCredentialService ss = new DelegatedCredentialService(wsdlURL, SERVICE_NAME); DelegatedCredentialPortType port = ss.getDelegatedCredentialPortTypePort(); { System.out.println("Invoking destroy..."); try { port.destroy(); } catch (org.oasis_open.docs.wsrf._2004._06.wsrf_ws_resourcelifetime_1_2_draft_01_wsdl.ResourceUnknownFault e) { System.out.println("Expected exception: ResourceUnknownFault has occurred."); System.out.println(e.toString()); } catch (org.oasis_open.docs.wsrf._2004._06.wsrf_ws_resourcelifetime_1_2_draft_01_wsdl.ResourceNotDestroyedFault e) { System.out.println("Expected exception: ResourceNotDestroyedFault has occurred."); System.out.println(e.toString()); } } { System.out.println("Invoking getServiceSecurityMetadata..."); org.cagrid.gaards.security.servicesecurity.GetServiceSecurityMetadataRequest _getServiceSecurityMetadata_parameters = null; org.cagrid.gaards.security.servicesecurity.GetServiceSecurityMetadataResponse _getServiceSecurityMetadata__return = port.getServiceSecurityMetadata(_getServiceSecurityMetadata_parameters); System.out.println("getServiceSecurityMetadata.result=" + _getServiceSecurityMetadata__return); } { System.out.println("Invoking getDelegatedCredential..."); GetDelegatedCredentialRequest _getDelegatedCredential_parameters = null; try { GetDelegatedCredentialResponse _getDelegatedCredential__return = port.getDelegatedCredential(_getDelegatedCredential_parameters); System.out.println("getDelegatedCredential.result=" + _getDelegatedCredential__return); } catch (DelegationFaultFaultMessage e) { System.out.println("Expected exception: DelegationFaultFaultMessage has occurred."); System.out.println(e.toString()); } catch (PermissionDeniedFaultFaultMessage e) { System.out.println("Expected exception: PermissionDeniedFaultFaultMessage has occurred."); System.out.println(e.toString()); } catch (CDSInternalFaultFaultMessage e) { System.out.println("Expected exception: CDSInternalFaultFaultMessage has occurred."); System.out.println(e.toString()); } } System.exit(0); } }