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


Java Call.setOperationName方法代碼示例

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


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

示例1: WMLS_GetBaseMsg

import org.apache.axis.client.Call; //導入方法依賴的package包/類
public String WMLS_GetBaseMsg(short returnValueIn) throws RemoteException {
    if (super.cachedEndpoint == null) {
        throw new org.apache.axis.NoEndPointException();
    }
    Call _call = createCall();
    _call.setOperation(_operations[2]);
    _call.setUseSOAPAction(true);
    _call.setSOAPActionURI("http://www.witsml.org/action/120/Store.WMLS_GetBaseMsg");
    _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
    _call.setOperationName(new QName("http://www.witsml.org/message/120", "WMLS_GetBaseMsg"));

    setRequestHeaders(_call);
    setAttachments(_call);
    Object _resp = _call.invoke(new Object[]{returnValueIn});

    if (_resp instanceof RemoteException) {
        throw (RemoteException) _resp;
    } else {
        extractAttachments(_call);
        try {
            return (String) _resp;
        } catch (Exception _exception) {
            return (String) org.apache.axis.utils.JavaUtils.convert(_resp, String.class);
        }
    }
}
 
開發者ID:hashmapinc,項目名稱:witsml-client,代碼行數:27,代碼來源:StoreSoapBindingStub.java

示例2: createCall

import org.apache.axis.client.Call; //導入方法依賴的package包/類
/**
 * Creates and returns an RPC SOAP call.
 * 
 * @return an RPC SOAP call
 */
protected Call createCall() throws Exception {
	QName workFlowInputQName = new QName(RPROT_DATA_NAMESPACE,
			"WorkFlowInputType");
	QName workFlowOuputQName = new QName(RPROT_DATA_NAMESPACE,
			"WorkFlowOutputType");

	Service service = new Service();
	Call call = (Call) service.createCall();
	System.out.println("Calling : " + urlString);
	call.setTargetEndpointAddress(new java.net.URL(urlString));

	call.setOperationName("startWorkFlow");

	call.addParameter("parameters", workFlowInputQName, ParameterMode.IN);
	call.setReturnType(workFlowOuputQName, WorkFlowOutputType.class);

	register(call, WorkFlowInputType.class, workFlowInputQName);
	register(call, WorkFlowOutputType.class, workFlowOuputQName);
	return call;
}
 
開發者ID:NCIP,項目名稱:cagrid-general,代碼行數:26,代碼來源:TestClient.java

示例3: main

import org.apache.axis.client.Call; //導入方法依賴的package包/類
public static void main(String [] args) {
    try {
        String endpoint = 
                 "http://nagoya.apache.org:5049/axis/services/echo";
  
        Service  service = new Service();
        Call     call    = (Call) service.createCall();

        call.setTargetEndpointAddress( new java.net.URL(endpoint) );
        call.setOperationName(new QName("http://soapinterop.org/", "echoString") );

        // Call to addParameter/setReturnType as described in user-guide.html
        //call.addParameter("testParam",
        //                  org.apache.axis.Constants.XSD_STRING,
        //                  javax.xml.rpc.ParameterMode.IN);
        //call.setReturnType(org.apache.axis.Constants.XSD_STRING);

        String ret = (String) call.invoke( new Object[] { "Hello!" } );

        System.out.println("Sent 'Hello!', got '" + ret + "'");
    } catch (Exception e) {
        System.err.println(e.toString());
    }
}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:25,代碼來源:TestClient.java

示例4: _get

import org.apache.axis.client.Call; //導入方法依賴的package包/類
private CacheEntry _get(String cacheName,String method,String key) throws ServiceException, MalformedURLException, RemoteException  {
	Service  service = new Service();
    Call     call    = (Call) service.createCall();
    
    call.registerTypeMapping(
            Element.class, 
            element,
            BeanSerializerFactory.class,
            BeanDeserializerFactory.class);
    
    call.setTargetEndpointAddress( new java.net.URL(endpoint) );
    call.setOperationName(new QName("http://soap.server.ehcache.sf.net/", method));

    call.addParameter("arg0", Constants.XSD_STRING, String.class, ParameterMode.IN);
    call.addParameter("arg1", Constants.XSD_STRING, String.class, ParameterMode.IN);
    call.setReturnClass(Element.class);
    call.setReturnQName(element);
    
    return new SoapCacheEntry((Element) call.invoke( new Object[] {cacheName,key } ));
}
 
開發者ID:lucee,項目名稱:Lucee4,代碼行數:21,代碼來源:SoapClient.java

示例5: _remove

import org.apache.axis.client.Call; //導入方法依賴的package包/類
private boolean _remove(String cacheName,String method,String key) throws ServiceException, MalformedURLException, RemoteException  {
	Service  service = new Service();
    Call     call    = (Call) service.createCall();
    
    
    call.registerTypeMapping(
            Element.class, 
            element,
            BeanSerializerFactory.class,
            BeanDeserializerFactory.class);
    
    call.setTargetEndpointAddress( new java.net.URL(endpoint) );
    call.setOperationName(new QName("http://soap.server.ehcache.sf.net/", method));

    call.addParameter("arg0", Constants.XSD_STRING, String.class, ParameterMode.IN);
    call.addParameter("arg1", Constants.XSD_STRING, String.class, ParameterMode.IN);
    call.setReturnClass(boolean.class);
    call.setReturnQName(Constants.XSD_BOOLEAN);
  
    return ((Boolean)call.invoke( new Object[] {cacheName,key } )).booleanValue();

}
 
開發者ID:lucee,項目名稱:Lucee4,代碼行數:23,代碼來源:SoapClient.java

示例6: _put

import org.apache.axis.client.Call; //導入方法依賴的package包/類
private void _put(String cacheName,String method,Element el) throws ServiceException, MalformedURLException, RemoteException  {
   	Service  service = new Service();
       Call     call    = (Call) service.createCall();
       
       el.setResourceUri(endpoint);
       
       call.registerTypeMapping(
               Element.class, 
               element,
               BeanSerializerFactory.class,
               BeanDeserializerFactory.class);
       
       call.setTargetEndpointAddress( new java.net.URL(endpoint) );
       call.setOperationName(new QName("http://soap.server.ehcache.sf.net/", method));
       
       
       call.addParameter("arg0", Constants.XSD_STRING, String.class, ParameterMode.IN);
       call.addParameter("arg1", element, Element.class, ParameterMode.IN);
       call.setReturnType(Constants.XSD_ANYSIMPLETYPE);
       
       call.invoke( new Object[] {cacheName,el } );
       //call.invokeOneWay(new Object[] {cacheName,el } );
}
 
開發者ID:lucee,項目名稱:Lucee4,代碼行數:24,代碼來源:SoapClient.java

示例7: checkServer

import org.apache.axis.client.Call; //導入方法依賴的package包/類
private boolean checkServer (String url, String identifier) {
	try {
		String endpoint =url+"/ClusterManager.jws";
		  
		Service service = new Service();
		Call call = (Call) service.createCall();
			  
		call.setTargetEndpointAddress( new java.net.URL(endpoint) );
		call.setOperationName(new QName("http://soapinterop.org/", "doYouOwn"));
			  
		boolean ret = ((Boolean) call.invoke( new Object[] { identifier } )).booleanValue();
		
		if (ret) {
			owners.put (identifier, url);
		}
		BrokerFactory.getLoggingBroker().logDebug (url +" will "+(ret?"not":"")+" run "+identifier);
		
		return ret;
	} catch (Exception e) {
		BrokerFactory.getLoggingBroker().logError(e.getMessage());
	}
	
	return false;
}
 
開發者ID:davidrudder23,項目名稱:OpenNotification,代碼行數:25,代碼來源:ClusteredServiceManager.java

示例8: sendPersistrentNotificationToDevice

import org.apache.axis.client.Call; //導入方法依賴的package包/類
public void sendPersistrentNotificationToDevice (
		String serviceName,
		String notificationUuid,
		String deviceUuid) {
	try {
		String url = getURLForService(serviceName);
		String endpoint =url+"/ClusterManager.jws";
		  
		Service service = new Service();
		Call call = (Call) service.createCall();
			  
		call.setTargetEndpointAddress( new java.net.URL(endpoint) );
		call.setOperationName(new QName("http://soapinterop.org/", "sendPersistentNotificationToDevice"));
			  
		call.invoke( new Object[] { notificationUuid, deviceUuid } );
		
	} catch (Exception e) {
		BrokerFactory.getLoggingBroker().logWarn(e);
	}
	
}
 
開發者ID:davidrudder23,項目名稱:OpenNotification,代碼行數:22,代碼來源:ClusteredServiceManager.java

示例9: sendNonpersistrentNotificationToDevice

import org.apache.axis.client.Call; //導入方法依賴的package包/類
public void sendNonpersistrentNotificationToDevice (
		String serviceName, 
		String recipientUuid,
		String subject, String message,
		String senderName,
		String deviceUuid) {
	try {
		String url = getURLForService(serviceName);
		String endpoint =url+"/ClusterManager.jws";
		  
		Service service = new Service();
		Call call = (Call) service.createCall();
			  
		call.setTargetEndpointAddress( new java.net.URL(endpoint) );
		call.setOperationName(new QName("http://soapinterop.org/", "sendNonpersistentNotificationToDevice"));
			  
		call.invoke( new Object[] { recipientUuid, subject, message, senderName, deviceUuid } );
		
	} catch (Exception e) {
		BrokerFactory.getLoggingBroker().logWarn(e);
	}
	
}
 
開發者ID:davidrudder23,項目名稱:OpenNotification,代碼行數:24,代碼來源:ClusteredServiceManager.java

示例10: testSendNotificationToOne

import org.apache.axis.client.Call; //導入方法依賴的package包/類
public void testSendNotificationToOne() {
	try {
		String endpoint = "http://localhost:8080/paging/SendNotification.jws";

		Service service = new Service();
		Call call = (Call) service.createCall();

		call.setTargetEndpointAddress(new java.net.URL(endpoint));
		call.setOperationName(new QName("http://soapinterop.org/",
				"sendPage"));
		
		String[] ret = (String[])call.invoke(new Object[] {"[email protected]",
															"Test SOAP", "Test SOAP Notification from JUnit"});
		
		for (int i = 0; i < ret.length; i++) {
			System.out.println (ret[i]);
		}
	} catch (Exception e) {
		e.printStackTrace();
	}
}
 
開發者ID:davidrudder23,項目名稱:OpenNotification,代碼行數:22,代碼來源:SOAPSendNotificationTest.java

示例11: WMLS_GetVersion

import org.apache.axis.client.Call; //導入方法依賴的package包/類
public String WMLS_GetVersion() throws RemoteException {
    if (super.cachedEndpoint == null) {
        throw new org.apache.axis.NoEndPointException();
    }
    Call _call = createCall();
    _call.setOperation(_operations[5]);
    _call.setUseSOAPAction(true);
    _call.setSOAPActionURI("http://www.witsml.org/action/120/Store.WMLS_GetVersion");
    _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
    _call.setOperationName(new QName("http://www.witsml.org/message/120", "WMLS_GetVersion"));

    setRequestHeaders(_call);
    setAttachments(_call);
    Object _resp = _call.invoke(new Object[]{});

    if (_resp instanceof RemoteException) {
        throw (RemoteException) _resp;
    } else {
        extractAttachments(_call);
        try {
            return (String) _resp;
        } catch (Exception _exception) {
            return (String) org.apache.axis.utils.JavaUtils.convert(_resp, String.class);
        }
    }
}
 
開發者ID:hashmapinc,項目名稱:witsml-client,代碼行數:27,代碼來源:StoreSoapBindingStub.java

示例12: main

import org.apache.axis.client.Call; //導入方法依賴的package包/類
public static void main(String args[]) {
  try {
    Options opts = new Options( args );

    args = opts.getRemainingArgs();

    if ( args == null || args.length % 2 != 0 ) {
      System.err.println( "Usage: GetInfo <symbol> <datatype>" );
      System.exit(1);
    }

    String  symbol = args[0] ;
    Service  service = new Service();
    Call     call    = (Call) service.createCall();

    call.setTargetEndpointAddress( new java.net.URL(opts.getURL()) );
    call.setOperationName( new QName("urn:cominfo", "getInfo") );
    call.addParameter( "symbol", XMLType.XSD_STRING, ParameterMode.IN );
    call.addParameter( "info", XMLType.XSD_STRING, ParameterMode.IN );
    call.setReturnType( XMLType.XSD_STRING );
    call.setUsername( opts.getUser() );
    call.setPassword( opts.getPassword() );

    String res = (String) call.invoke( new Object[] { args[0], args[1] } );

    System.out.println( symbol + ": " + res );
  }
  catch( Exception e ) {
    e.printStackTrace();
  }
}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:32,代碼來源:GetInfo.java

示例13: register

import org.apache.axis.client.Call; //導入方法依賴的package包/類
public void register(String registryURL, samples.bidbuy.Service s) 
               throws Exception {
  try {
    Service  service = new Service();
    Call     call    = (Call) service.createCall();

    call.setTargetEndpointAddress( new URL(registryURL) );
    call.setOperationName( new QName("http://www.soapinterop.org/Register", "Register" ));
    call.addParameter("ServiceName", XMLType.XSD_STRING, ParameterMode.IN);
    call.addParameter("ServiceUrl", XMLType.XSD_STRING, ParameterMode.IN);
    call.addParameter("ServiceType", XMLType.XSD_STRING, ParameterMode.IN);
    call.addParameter("ServiceWSDL", XMLType.XSD_STRING, ParameterMode.IN);
    
    call.invoke( new Object[] { s.getServiceName(), s.getServiceUrl(),
                                s.getServiceType(), s.getServiceWsdl() } );
  }
  catch( Exception e ) {
    e.printStackTrace();
    throw e ;
  }
}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:22,代碼來源:v3.java

示例14: unregister

import org.apache.axis.client.Call; //導入方法依賴的package包/類
public void unregister(String registryURL, String name) throws Exception {
  try {
    Service  service = new Service();
    Call     call    = (Call) service.createCall();

    call.setTargetEndpointAddress( new URL(registryURL) );
    call.setOperationName( new QName("http://www.soapinterop.org/Unregister", "Unregister" ));
    call.addParameter( "ServiceName", XMLType.XSD_STRING, ParameterMode.IN);
    call.invoke( new Object[] { name } );
  }
  catch( Exception e ) {
    e.printStackTrace();
    throw e ;
  }
}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:16,代碼來源:v3.java

示例15: ping

import org.apache.axis.client.Call; //導入方法依賴的package包/類
public Boolean ping(String serverURL) throws Exception {
  try {
    Service  service = new Service();
    Call     call    = (Call) service.createCall();

    call.setTargetEndpointAddress( new URL(serverURL) );
    call.setUseSOAPAction( true );
    call.setSOAPActionURI( "http://www.soapinterop.org/Ping" );
    call.setOperationName( new QName("http://www.soapinterop.org/Bid", "Ping" ));
    call.invoke( (Object[]) null );
    return( new Boolean(true) );
  }
  catch( Exception e ) {
    e.printStackTrace();
    throw e ;
  }
}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:18,代碼來源:v3.java


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