当前位置: 首页>>代码示例>>Java>>正文


Java Call.setTargetEndpointAddress方法代码示例

本文整理汇总了Java中org.apache.axis.client.Call.setTargetEndpointAddress方法的典型用法代码示例。如果您正苦于以下问题:Java Call.setTargetEndpointAddress方法的具体用法?Java Call.setTargetEndpointAddress怎么用?Java Call.setTargetEndpointAddress使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.axis.client.Call的用法示例。


在下文中一共展示了Call.setTargetEndpointAddress方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: 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

示例2: _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

示例3: 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

示例4: _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

示例5: _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

示例6: 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

示例7: 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

示例8: 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

示例9: 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

示例10: createCall

import org.apache.axis.client.Call; //导入方法依赖的package包/类
private Call createCall() throws RemoteException {
    try {
        Call _call = super._createCall();
        if (super.maintainSessionSet) {
            _call.setMaintainSession(super.maintainSession);
        }
        if (super.cachedUsername != null) {
            _call.setUsername(super.cachedUsername);
        }
        if (super.cachedPassword != null) {
            _call.setPassword(super.cachedPassword);
        }
        if (super.cachedEndpoint != null) {
            _call.setTargetEndpointAddress(super.cachedEndpoint);
        }
        if (super.cachedTimeout != null) {
            _call.setTimeout(super.cachedTimeout);
        }
        if (super.cachedPortName != null) {
            _call.setPortName(super.cachedPortName);
        }
        java.util.Enumeration keys = super.cachedProperties.keys();
        while (keys.hasMoreElements()) {
            String key = (String) keys.nextElement();
            _call.setProperty(key, super.cachedProperties.get(key));
        }
        return _call;
    } catch (Throwable _t) {
        throw new AxisFault("Failure trying to get the Call object", _t);
    }
}
 
开发者ID:hashmapinc,项目名称:witsml-client,代码行数:32,代码来源:StoreSoapBindingStub.java

示例11: getQuote

import org.apache.axis.client.Call; //导入方法依赖的package包/类
/**
 * This will use the WSDL to prefill all of the info needed to make
 * the call.  All that's left is filling in the args to invoke().
 */
public float getQuote(String args[]) throws Exception {
  Options  opts = new Options( args );

  args = opts.getRemainingArgs();

  if ( args == null ) {
    System.err.println( "Usage: GetQuote <symbol>" );
    System.exit(1);
  }

  /* Define the service QName and port QName */
  /*******************************************/
  QName servQN = new QName("urn:xmltoday-delayed-quotes","GetQuoteService");
  QName portQN = new QName("urn:xmltoday-delayed-quotes","GetQuoteJava");

  /* Now use those QNames as pointers into the WSDL doc */
  /******************************************************/
  Service service = new Service( new URL("file:GetQuote.wsdl"), servQN );
  Call    call    = (Call) service.createCall( portQN, "getQuote" );

  /* Strange - but allows the user to change just certain portions of */
  /* the URL we're gonna use to invoke the service.  Useful when you  */
  /* want to run it thru tcpmon (ie. put  -p81 on the cmd line).      */
  /********************************************************************/
  opts.setDefaultURL( call.getTargetEndpointAddress() );
  call.setTargetEndpointAddress( new URL(opts.getURL()) );

  /* Get symbol and invoke the service */
  /*************************************/
  Object result = call.invoke( new Object[] { symbol = args[0] } );

  return( ((Float) result).floatValue() );
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:38,代码来源:GetQuote2.java

示例12: getQuote1

import org.apache.axis.client.Call; //导入方法依赖的package包/类
/**
 * This will use the WSDL to prefill all of the info needed to make
 * the call.  All that's left is filling in the args to invoke().
 */
public float getQuote1(String args[]) throws Exception {
  Options  opts = new Options( args );

  args = opts.getRemainingArgs();

  if ( args == null ) {
    System.err.println( "Usage: GetQuote <symbol>" );
    System.exit(1);
  }

  /* Define the service QName and port QName */
  /*******************************************/
  QName servQN = new QName("urn:xmltoday-delayed-quotes","GetQuoteService");
  QName portQN = new QName("urn:xmltoday-delayed-quotes","GetQuote");

  /* Now use those QNames as pointers into the WSDL doc */
  /******************************************************/
  Service service = new Service( new URL("file:GetQuote.wsdl"), servQN );
  Call    call    = (Call) service.createCall( portQN, "getQuote" );

  /* Strange - but allows the user to change just certain portions of */
  /* the URL we're gonna use to invoke the service.  Useful when you  */
  /* want to run it thru tcpmon (ie. put  -p81 on the cmd line).      */
  /********************************************************************/
  opts.setDefaultURL( call.getTargetEndpointAddress() );
  call.setTargetEndpointAddress( new URL(opts.getURL()) );

  /* Define some service specific properties */
  /*******************************************/
  call.setUsername( opts.getUser() );
  call.setPassword( opts.getPassword() );

  /* Get symbol and invoke the service */
  /*************************************/
    Object result = call.invoke( new Object[] { symbol = args[0] } );

  return( ((Float) result).floatValue() );
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:43,代码来源:GetQuote1.java

示例13: main

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

        Service service = new Service();
        Call call = (Call) service.createCall();
        call.setTargetEndpointAddress(new java.net.URL(opts.getURL()));

        SOAPEnvelope env = new SOAPEnvelope();
        SOAPBodyElement sbe = new SOAPBodyElement(XMLUtils.StringToElement("http://localhost:8080/LogTestService", "testMethod", ""));
        env.addBodyElement(sbe);

        env = new SignedSOAPEnvelope(env, "http://xml-security");

        System.out.println("\n============= Request ==============");
        XMLUtils.PrettyElementToStream(env.getAsDOM(), System.out);

        call.invoke(env);

        MessageContext mc = call.getMessageContext();
        System.out.println("\n============= Response ==============");
        XMLUtils.PrettyElementToStream(mc.getResponseMessage().getSOAPEnvelope().getAsDOM(), System.out);
    }
    catch (Exception e) {
        e.printStackTrace();
    }
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:28,代码来源:Client.java

示例14: 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

示例15: 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


注:本文中的org.apache.axis.client.Call.setTargetEndpointAddress方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。