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


Java Call.addParameter方法代码示例

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


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

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

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

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

import org.apache.axis.client.Call; //导入方法依赖的package包/类
public String simpleBuy(String serverURL, int quantity ) 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/SimpleBuy" );
    call.setOperationName( new QName("http://www.soapinterop.org/Bid", "SimpleBuy") );
    call.setReturnType( XMLType.XSD_STRING );
    call.addParameter( "Address", XMLType.XSD_STRING, ParameterMode.IN );
    call.addParameter( "ProductName", XMLType.XSD_STRING, ParameterMode.IN);
    call.addParameter( "Quantity", XMLType.XSD_INT, ParameterMode.IN );
    
    String res = (String) call.invoke(new Object[] { "123 Main St.",
                                                     "Widget",
                                                     new Integer(quantity)});

    /* sd.addOutputParam("SimpleBuyResult",
                      SOAPTypeMappingRegistry.XSD_STRING);
    sd.addOutputParam("Result",
                      SOAPTypeMappingRegistry.XSD_STRING);
    sd.addOutputParam("return",
                      SOAPTypeMappingRegistry.XSD_STRING); */

    return( res );
  }
  catch( Exception e ) {
    e.printStackTrace();
    throw e ;
  }
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:33,代码来源:v3.java

示例7: main

import org.apache.axis.client.Call; //导入方法依赖的package包/类
public static void main(String [] args) throws Exception
{
    Options options = new Options(args);
    
    Order order = new Order();
    order.setCustomerName("Glen Daniels");
    order.setShippingAddress("275 Grove Street, Newton, MA");
    
    String [] items = new String[] { "mp3jukebox", "1600mahBattery" };
    int [] quantities = new int [] { 1, 4 };
    
    order.setItemCodes(items);
    order.setQuantities(quantities);
    
    Service  service = new Service();
    Call     call    = (Call) service.createCall();
    QName    qn      = new QName( "urn:BeanService", "Order" );

    call.registerTypeMapping(Order.class, qn,
                  new org.apache.axis.encoding.ser.BeanSerializerFactory(Order.class, qn),        
                  new org.apache.axis.encoding.ser.BeanDeserializerFactory(Order.class, qn));        
    String result;
    try {
        call.setTargetEndpointAddress( new java.net.URL(options.getURL()) );
        call.setOperationName( new QName("OrderProcessor", "processOrder") );
        call.addParameter( "arg1", qn, ParameterMode.IN );
        call.setReturnType( org.apache.axis.encoding.XMLType.XSD_STRING );

        result = (String) call.invoke( new Object[] { order } );
    } catch (AxisFault fault) {
        result = "Error : " + fault.toString();
    }
    
    System.out.println(result);
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:36,代码来源:Client.java

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

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

示例10: requestForQuote

import org.apache.axis.client.Call; //导入方法依赖的package包/类
public double requestForQuote(String serverURL) throws Exception {
    try {

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

      call.setTargetEndpointAddress( new URL(serverURL) );
      call.setOperationName(new QName("http://www.soapinterop.org/Bid", "RequestForQuote") );
      call.setReturnType( XMLType.XSD_DOUBLE );
      call.setUseSOAPAction( true );
      call.setSOAPActionURI( "http://www.soapinterop.org/RequestForQuote" );
      call.addParameter( "ProductName", XMLType.XSD_STRING, ParameterMode.IN);
      call.addParameter( "Quantity", XMLType.XSD_INT, ParameterMode.IN);
      Object r = call.invoke( new Object[] { "widget", new Integer(10) } );

/*
      sd.addOutputParam("RequestForQuoteResult",
                        SOAPTypeMappingRegistry.XSD_DOUBLE);
      sd.addOutputParam("Result",
                        SOAPTypeMappingRegistry.XSD_DOUBLE);
      sd.addOutputParam("return",
                        SOAPTypeMappingRegistry.XSD_DOUBLE);
*/

      // ??? if ( r instanceof Float ) r = ((Float)r).toString();
      if ( r instanceof String ) r = new Double((String) r);
      Double res = (Double) r ;
      return( res.doubleValue() );
    }
    catch( Exception e ) {
      e.printStackTrace();
      throw e ;
    }
  }
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:35,代码来源:v3.java

示例11: main

import org.apache.axis.client.Call; //导入方法依赖的package包/类
public static void main(String [] args)
{
    try {
        Options options = new Options(args);
        
        String endpointURL = options.getURL();
        String textToSend;
        
        args = options.getRemainingArgs();
        if ((args == null) || (args.length < 1)) {
            textToSend = "<nothing>";
        } else {
            textToSend = args[0];
        }
        
        Service  service = new Service();
        Call     call    = (Call) service.createCall();

        call.setTargetEndpointAddress( new java.net.URL(endpointURL) );
        call.setOperationName( new QName("http://example3.userguide.samples", "serviceMethod") );
        call.addParameter( "arg1", XMLType.XSD_STRING, ParameterMode.IN);
        call.setReturnType( org.apache.axis.encoding.XMLType.XSD_STRING );

        String ret = (String) call.invoke( new Object[] { textToSend } );
        
        System.out.println("You typed : " + ret);
    } catch (Exception e) {
        System.err.println(e.toString());
    }
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:31,代码来源:Client.java

示例12: main

import org.apache.axis.client.Call; //导入方法依赖的package包/类
public static void main(String [] args) throws Exception {
    Options options = new Options(args);
    
    String endpoint = "http://localhost:" + options.getPort() +
                      "/axis/Calculator.jws";
    
    args = options.getRemainingArgs();
    
    if (args == null || args.length != 3) {
        System.err.println("Usage: CalcClient <add|subtract> arg1 arg2");
        return;
    }
    
    String method = args[0];
    if (!(method.equals("add") || method.equals("subtract"))) {
        System.err.println("Usage: CalcClient <add|subtract> arg1 arg2");
        return;
    }
    
    Integer i1 = new Integer(args[1]);
    Integer i2 = new Integer(args[2]);

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

    call.setTargetEndpointAddress( new java.net.URL(endpoint) );
    call.setOperationName( method );
    call.addParameter( "op1", XMLType.XSD_INT, ParameterMode.IN );
    call.addParameter( "op2", XMLType.XSD_INT, ParameterMode.IN );
    call.setReturnType( XMLType.XSD_INT );

    Integer ret = (Integer) call.invoke( new Object [] { i1, i2 });
    
    System.out.println("Got result : " + ret);
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:36,代码来源:CalcClient.java

示例13: main

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

    Options opts = new Options( args );

    args = opts.getRemainingArgs();

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

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

    call.setOperationName( new QName("urn:xmltoday-delayed-quotes", "getQuote") );
    call.addParameter( "symbol", XMLType.XSD_STRING, ParameterMode.IN );
    call.setReturnType( XMLType.XSD_FLOAT );
    call.setTransport( new FileTransport() );
    call.setUsername(opts.getUser() );
    call.setPassword(opts.getPassword() );
    call.setTimeout(new Integer(10000));

    Float res = new Float(0.0F);
    res = (Float) call.invoke( new Object[] {symbol} );

    System.out.println( symbol + ": " + res );

    reader.halt();
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:34,代码来源:FileTest.java

示例14: cridarValidarCertificado

import org.apache.axis.client.Call; //导入方法依赖的package包/类
private String cridarValidarCertificado(
		String certificatBase64,
		boolean obtenirDadesCertificat) throws Exception {
	String xmlPeticio = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
		"<mensajeEntrada xmlns=\"http://afirmaws/ws/validacion\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:SchemaLocation=\"https://localhost/afirmaws/xsd/mvalidacion/ws.xsd\">" +
		"<peticion>ValidarCertificado</peticion>" +
		"<versionMsg>1.0</versionMsg>" +
		"<parametros>" +
		"<certificado><![CDATA[" + certificatBase64 + "]]></certificado>" +
		"<idAplicacion>" + aplicacioId + "</idAplicacion>" +
		((modeValidacio != null) ? "<modoValidacion>" + modeValidacio + "</modoValidacion>" : "") +
		"<obtenerInfo>" + obtenirDadesCertificat + "</obtenerInfo>" +
		"</parametros>" +
		"</mensajeEntrada>";
	logSiActivat(xmlPeticio);
	Service service = new Service();
	Call call = (Call)service.createCall();
	call.setTargetEndpointAddress(baseUrl + "/ValidarCertificado");
	call.setOperationName(new QName("http://soapinterop.org/", "ValidarCertificado"));
	if ((usuari != null) && (!usuari.equals(""))) {
		try {
			call.setClientHandlers(new AfirmaSecurityHandler(usuari, password), null);
		} catch (Exception ex) {
			throw new ServiceException("(Call) Error en la cridada a aFirma", ex);
		}
	}
	call.setReturnType(org.apache.axis.Constants.XSD_STRING);
	call.addParameter("ValidarCertificadoRequest", org.apache.axis.Constants.XSD_STRING, javax.xml.rpc.ParameterMode.IN);
	String xmlResposta = (String)call.invoke(new Object[]{xmlPeticio});
	logSiActivat(xmlResposta);
	return xmlResposta;
}
 
开发者ID:GovernIB,项目名称:helium,代码行数:33,代码来源:AfirmaUtils.java

示例15: cridarInfoCertificado

import org.apache.axis.client.Call; //导入方法依赖的package包/类
private String cridarInfoCertificado(
		String certificatBase64) throws Exception {
	String xmlPeticio = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
		"<mensajeEntrada xmlns=\"http://afirmaws/ws/validacion\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchemainstance\" xsi:SchemaLocation=\"https://localhost/afirmaws/xsd/mvalidacion/ws.xsd\">" +
		"<peticion>ObtenerInfoCertificado</peticion>" +
		"<versionMsg>1.0</versionMsg>" +
		"<parametros>" +
		"<certificado><![CDATA[" + certificatBase64 + "]]></certificado>" +
		"<idAplicacion>" + aplicacioId + "</idAplicacion>" +
		"</parametros>" +
		"</mensajeEntrada>";
	logSiActivat(xmlPeticio);
	Service service = new Service();
	Call call = (Call)service.createCall();
	call.setTargetEndpointAddress(baseUrl + "/ObtenerInfoCertificado");
	call.setOperationName(new QName("http://soapinterop.org/", "ObtenerInfoCertificado"));
	if ((usuari != null) && (!usuari.equals(""))) {
		try {
			call.setClientHandlers(new AfirmaSecurityHandler(usuari, password), null);
		} catch (Exception ex) {
			throw new ServiceException("(Call) Error en la cridada a aFirma", ex);
		}
	}
	call.setReturnType(org.apache.axis.Constants.XSD_STRING);
	call.addParameter("ObtenerInfoCertificadoRequest", org.apache.axis.Constants.XSD_STRING, javax.xml.rpc.ParameterMode.IN);
	String xmlResposta = (String)call.invoke(new Object[]{xmlPeticio});
	logSiActivat(xmlResposta);
	return xmlResposta;
}
 
开发者ID:GovernIB,项目名称:helium,代码行数:30,代码来源:AfirmaUtils.java


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