當前位置: 首頁>>代碼示例>>Java>>正文


Java ServiceException.getMessage方法代碼示例

本文整理匯總了Java中javax.xml.rpc.ServiceException.getMessage方法的典型用法代碼示例。如果您正苦於以下問題:Java ServiceException.getMessage方法的具體用法?Java ServiceException.getMessage怎麽用?Java ServiceException.getMessage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javax.xml.rpc.ServiceException的用法示例。


在下文中一共展示了ServiceException.getMessage方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getAuthenticationService

import javax.xml.rpc.ServiceException; //導入方法依賴的package包/類
/**
 * Get the authentication service
 * 
 * @return AuthenticationServiceSoapBindingStub
 */
public static AuthenticationServiceSoapBindingStub getAuthenticationService(String endpointAddress)
{
	AuthenticationServiceSoapBindingStub authenticationService = null;
    try 
    {
        // Get the authentication service
        AuthenticationServiceLocator locator = new AuthenticationServiceLocator();
        locator.setAuthenticationServiceEndpointAddress(endpointAddress + AUTHENTICATION_SERVICE_ADDRESS);                
        authenticationService = (AuthenticationServiceSoapBindingStub)locator.getAuthenticationService();
    }
    catch (ServiceException jre) 
    {
    	if (logger.isDebugEnabled() == true)
        {
    		if (jre.getLinkedCause() != null)
            {
    			jre.getLinkedCause().printStackTrace();
            }
        }
   
        throw new WebServiceException("Error creating authentication service: " + jre.getMessage(), jre);
    }        
    
    // Time out after a minute
    authenticationService.setTimeout(timeoutMilliseconds);
    
    return authenticationService;
}
 
開發者ID:xenit-eu,項目名稱:move2alf,代碼行數:34,代碼來源:WebServiceFactory.java

示例2: getAuthoringService

import javax.xml.rpc.ServiceException; //導入方法依賴的package包/類
/**
 * Get the authoring service
 * 
 * @return AuthoringServiceSoapBindingStub
 */
public static AuthoringServiceSoapBindingStub getAuthoringService(String endpointAddress)
{
	AuthoringServiceSoapBindingStub authoringService = null;
              
    try 
    {
        // Get the authoring service
        AuthoringServiceLocator locator = new AuthoringServiceLocator(AuthenticationUtils.getEngineConfiguration());
        locator.setAuthoringServiceEndpointAddress(endpointAddress + AUTHORING_SERVICE_ADDRESS);                
        authoringService = (AuthoringServiceSoapBindingStub)locator.getAuthoringService();
        authoringService.setMaintainSession(true);
    }
    catch (ServiceException jre) 
    {
        if (logger.isDebugEnabled() == true)
        {
            if (jre.getLinkedCause() != null)
            {
                jre.getLinkedCause().printStackTrace();
            }
        }
   
        throw new WebServiceException("Error creating authoring service: " + jre.getMessage(), jre);
    }        
    
    // Time out after a minute
    authoringService.setTimeout(timeoutMilliseconds);       
    
    return authoringService;
}
 
開發者ID:xenit-eu,項目名稱:move2alf,代碼行數:36,代碼來源:WebServiceFactory.java

示例3: getClassificationService

import javax.xml.rpc.ServiceException; //導入方法依賴的package包/類
/**
 * Get the classification service
 * 
 * @return ClassificationServiceSoapBindingStub
 */
public static ClassificationServiceSoapBindingStub getClassificationService(String endpointAddress)
{
	ClassificationServiceSoapBindingStub classificationService = null;
        
    try 
    {
        // Get the classification service
        ClassificationServiceLocator locator = new ClassificationServiceLocator(AuthenticationUtils.getEngineConfiguration());
        locator.setClassificationServiceEndpointAddress(endpointAddress + CLASSIFICATION_SERVICE_ADDRESS);                
        classificationService = (ClassificationServiceSoapBindingStub)locator.getClassificationService();
        classificationService.setMaintainSession(true);
    }
    catch (ServiceException jre) 
    {
        if (logger.isDebugEnabled() == true)
        {
            if (jre.getLinkedCause() != null)
            {
                jre.getLinkedCause().printStackTrace();
            }
        }
   
        throw new WebServiceException("Error creating classification service: " + jre.getMessage(), jre);
    }        
    
    // Time out after a minute
    classificationService.setTimeout(timeoutMilliseconds);        
    
    return classificationService;
}
 
開發者ID:xenit-eu,項目名稱:move2alf,代碼行數:36,代碼來源:WebServiceFactory.java

示例4: getActionService

import javax.xml.rpc.ServiceException; //導入方法依賴的package包/類
/**
 * Get the action service
 * 
 * @return ActionServiceSoapBindingStub
 */
public static ActionServiceSoapBindingStub getActionService(String endpointAddress)
{
	ActionServiceSoapBindingStub actionService = null;
        
    try 
    {
        // Get the action service
        ActionServiceLocator locator = new ActionServiceLocator(AuthenticationUtils.getEngineConfiguration());
        locator.setActionServiceEndpointAddress(endpointAddress + ACTION_SERVICE_ADDRESS);                
        actionService = (ActionServiceSoapBindingStub)locator.getActionService();
        actionService.setMaintainSession(true);
    }
    catch (ServiceException jre) 
    {
        if (logger.isDebugEnabled() == true)
        {
            if (jre.getLinkedCause() != null)
            {
                jre.getLinkedCause().printStackTrace();
            }
        }
   
        throw new WebServiceException("Error creating action service: " + jre.getMessage(), jre);
    }        
        
    // Time out after a minute
    actionService.setTimeout(timeoutMilliseconds);      
    
    return actionService;
}
 
開發者ID:xenit-eu,項目名稱:move2alf,代碼行數:36,代碼來源:WebServiceFactory.java

示例5: getAccessControlService

import javax.xml.rpc.ServiceException; //導入方法依賴的package包/類
/**
 * Get the access control service
 * 
 * @return  the access control service
 */
public static AccessControlServiceSoapBindingStub getAccessControlService(String enpointAddress)
{
	AccessControlServiceSoapBindingStub accessControlService = null;           
    try 
    {
        // Get the access control service
        AccessControlServiceLocator locator = new AccessControlServiceLocator(AuthenticationUtils.getEngineConfiguration());
        locator.setAccessControlServiceEndpointAddress(enpointAddress + ACCESS_CONTROL_ADDRESS);                
        accessControlService = (AccessControlServiceSoapBindingStub)locator.getAccessControlService();
        accessControlService.setMaintainSession(true);
    }
    catch (ServiceException jre) 
    {
        if (logger.isDebugEnabled() == true)
        {
            if (jre.getLinkedCause() != null)
            {
                jre.getLinkedCause().printStackTrace();
            }
        }
   
        throw new WebServiceException("Error creating access control service: " + jre.getMessage(), jre);
    }        
        
    // Time out after a minute
    accessControlService.setTimeout(timeoutMilliseconds);
    
    return accessControlService;
}
 
開發者ID:xenit-eu,項目名稱:move2alf,代碼行數:35,代碼來源:WebServiceFactory.java

示例6: getAdministrationService

import javax.xml.rpc.ServiceException; //導入方法依賴的package包/類
/**
 * Get the administration service
 * 
 * @return  the administration service
 */
public static AdministrationServiceSoapBindingStub getAdministrationService(String endpointAddress)
{
	AdministrationServiceSoapBindingStub administrationService = null;
        
    try 
    {
        // Get the adminstration service
        AdministrationServiceLocator locator = new AdministrationServiceLocator(AuthenticationUtils.getEngineConfiguration());
        locator.setAdministrationServiceEndpointAddress(endpointAddress + ADMINISTRATION_ADDRESS);                
        administrationService = (AdministrationServiceSoapBindingStub)locator.getAdministrationService();
        administrationService.setMaintainSession(true);
    }
    catch (ServiceException jre) 
    {
        if (logger.isDebugEnabled() == true)
        {
            if (jre.getLinkedCause() != null)
            {
                jre.getLinkedCause().printStackTrace();
            }
        }
   
        throw new WebServiceException("Error creating administration service: " + jre.getMessage(), jre);
    }        
    
    // Time out after a minute
    administrationService.setTimeout(timeoutMilliseconds);       
    
    return administrationService;
}
 
開發者ID:xenit-eu,項目名稱:move2alf,代碼行數:36,代碼來源:WebServiceFactory.java

示例7: getDictionaryService

import javax.xml.rpc.ServiceException; //導入方法依賴的package包/類
/**
 * Get the dictionary service
 * 
 * @return  the dictionary service
 */
public static DictionaryServiceSoapBindingStub getDictionaryService(String endpointAddress)
{
	DictionaryServiceSoapBindingStub dictionaryService = null;
       
    try 
    {
        // Get the dictionary service
        DictionaryServiceLocator locator = new DictionaryServiceLocator(AuthenticationUtils.getEngineConfiguration());
        locator.setDictionaryServiceEndpointAddress(endpointAddress + DICTIONARY_SERVICE_ADDRESS);                
        dictionaryService = (DictionaryServiceSoapBindingStub)locator.getDictionaryService();
        dictionaryService.setMaintainSession(true);
    }
    catch (ServiceException jre) 
    {
        if (logger.isDebugEnabled() == true)
        {
            if (jre.getLinkedCause() != null)
            {
                jre.getLinkedCause().printStackTrace();
            }
        }
   
        throw new WebServiceException("Error creating dictionary service: " + jre.getMessage(), jre);
    }        
    
    // Time out after a minute
    dictionaryService.setTimeout(timeoutMilliseconds);

    return dictionaryService;
}
 
開發者ID:xenit-eu,項目名稱:move2alf,代碼行數:36,代碼來源:WebServiceFactory.java

示例8: getQuiet

import javax.xml.rpc.ServiceException; //導入方法依賴的package包/類
public CacheEntry getQuiet(String key) throws IOException {
	try {
		return soap.getQuiet(name, key);
	} 
	catch (ServiceException e) {
		throw new IOException(e.getMessage());
	}
}
 
開發者ID:lucee,項目名稱:Lucee4,代碼行數:9,代碼來源:EHCacheRemote.java

示例9: getCacheEntry

import javax.xml.rpc.ServiceException; //導入方法依賴的package包/類
public CacheEntry getCacheEntry(String key) throws IOException {
	try {
		return soap.get(name, key);
	} 
	catch (ServiceException e) {
		throw new IOException(e.getMessage());
	}
}
 
開發者ID:lucee,項目名稱:Lucee4,代碼行數:9,代碼來源:EHCacheRemote.java

示例10: getInputPorts

import javax.xml.rpc.ServiceException; //導入方法依賴的package包/類
@Override
public Set<ActivityInputPort> getInputPorts(JsonNode json) throws ActivityConfigurationException {
	Set<ActivityInputPort> inputPorts = new HashSet<>();
	try {
		// Do web service type stuff[tm]
		Map<String, String>[] inputs = (Map<String, String>[]) Soap
				.callWebService(json.get("endpoint").textValue(),
						"getInputSpec");
		// Iterate over the inputs
		for (int i = 0; i < inputs.length; i++) {
			Map<String, String> input_spec = inputs[i];
			String input_name = input_spec.get("name");
			String input_type = input_spec.get("type").toLowerCase();
			// Could get other properties such as defaults here
			// but at the moment we've got nowhere to put them
			// so we don't bother.
			if (input_type.equals("string")) {
				inputPorts.add(edits.createActivityInputPort(input_name, 0, true,
						null, String.class));
			} else if (input_type.equals("string[]")) {
				inputPorts.add(edits.createActivityInputPort(input_name, 1, true,
						null, String.class));
			} else if (input_type.equals("byte[]")) {
				inputPorts.add(edits.createActivityInputPort(input_name, 0, true,
						null, byte[].class));
			} else if (input_type.equals("byte[][]")) {
				inputPorts.add(edits.createActivityInputPort(input_name, 1, true,
						null, byte[].class));
			} else {
				// Count number of [] to get the arrays right
				int depth = (input_type.split("\\[\\]", -1).length) -1 ;
				logger.info("Soaplab input type '" + input_type
						+ "' unknown for input '" + input_name + "' in "
						+ json.get("endpoint").textValue()
						+ ", will attempt to add as String depth " + depth);
				inputPorts.add(edits.createActivityInputPort(input_name, depth, true, null, String.class));
			}
		}
	} catch (ServiceException se) {
		throw new ActivityConfigurationException(
				json.get("endpoint").textValue()
						+ ": Unable to create a new call to connect\n   to soaplab, error was : "
						+ se.getMessage());
	} catch (RemoteException re) {
		throw new ActivityConfigurationException(
				": Unable to call the get spec method for\n   endpoint : "
						+ json.get("endpoint").textValue()
						+ "\n   Remote exception message "
						+ re.getMessage());
	} catch (NullPointerException npe) {
		// If we had a null pointer exception, go around again - this is a
		// bug somewhere between axis and soaplab
		// that occasionally causes NPEs to happen in the first call or two
		// to a given soaplab installation. It also
		// manifests in the Talisman soaplab clients.
		return getInputPorts(json);
	}
	return inputPorts;
}
 
開發者ID:apache,項目名稱:incubator-taverna-plugin-bioinformatics,代碼行數:60,代碼來源:SoaplabActivityFactory.java

示例11: getOutputPorts

import javax.xml.rpc.ServiceException; //導入方法依賴的package包/類
@Override
public Set<ActivityOutputPort> getOutputPorts(JsonNode json) throws ActivityConfigurationException {
	Set<ActivityOutputPort> outputPorts = new HashSet<>();
	try {
		// Get outputs
		Map<String, String>[] results = (Map<String, String>[]) Soap
				.callWebService(json.get("endpoint").textValue(),
						"getResultSpec");
		// Iterate over the outputs
		for (int i = 0; i < results.length; i++) {
			Map<String, String> output_spec = results[i];
			String output_name = output_spec.get("name");
			String output_type = output_spec.get("type").toLowerCase();
			// Check to see whether the output is either report or
			// detailed_status, in
			// which cases we ignore it, this is soaplab metadata rather
			// than application data.
			if ((!output_name.equalsIgnoreCase("detailed_status"))) {

				// && (!output_name.equalsIgnoreCase("report"))) {
				if (output_type.equals("string")) {
					outputPorts.add(createOutput(output_name, 0, "text/plain"));
				} else if (output_type.equals("string[]")) {
					outputPorts.add(createOutput(output_name, 1, "text/plain"));
				} else if (output_type.equals("byte[]")) {
					outputPorts.add(createOutput(output_name, 0, "application/octet-stream"));
				} else if (output_type.equals("byte[][]")) {
					outputPorts.add(createOutput(output_name, 1, "application/octet-stream"));
				} else {
					// Count number of [] to get the arrays right
					int depth = (output_type.split("\\[\\]", -1).length) -1 ;
					logger.info("Soaplab output type '" + output_type
							+ "' unknown for output '" + output_name + "' in "
							+ json.get("endpoint").textValue()
							+ ", will add as depth " + depth);
					outputPorts.add(createOutput(output_name, depth, null));
				}
			}
		}

	} catch (ServiceException se) {
		throw new ActivityConfigurationException(
				json.get("endpoint").textValue()
						+ ": Unable to create a new call to connect\n   to soaplab, error was : "
						+ se.getMessage());
	} catch (RemoteException re) {
		throw new ActivityConfigurationException(
				": Unable to call the get spec method for\n   endpoint : "
						+ json.get("endpoint").textValue()
						+ "\n   Remote exception message "
						+ re.getMessage());
	} catch (NullPointerException npe) {
		// If we had a null pointer exception, go around again - this is a
		// bug somewhere between axis and soaplab
		// that occasionally causes NPEs to happen in the first call or two
		// to a given soaplab installation. It also
		// manifests in the Talisman soaplab clients.
		return getOutputPorts(json);
	}
	return outputPorts;
}
 
開發者ID:apache,項目名稱:incubator-taverna-plugin-bioinformatics,代碼行數:62,代碼來源:SoaplabActivityFactory.java


注:本文中的javax.xml.rpc.ServiceException.getMessage方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。