热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

org.apache.axis.client.Call类的使用及代码示例

本文整理了Java中org.apache.axis.client.Call类的一些代码示例,展示了Call类的具体用法。这些代码示例主要来源于

本文整理了Java中org.apache.axis.client.Call类的一些代码示例,展示了Call类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Call类的具体详情如下:
包路径:org.apache.axis.client.Call
类名称:Call

Call介绍

[英]Axis' JAXRPC Dynamic Invocation Interface implementation of the Call interface. This class should be used to actually invoke the Web Service. It can be prefilled by a WSDL document (on the constructor to the Service object) or you can fill in the data yourself.

Standard properties defined by in JAX-RPC's javax..xml.rpc.Call interface:
USERNAME_PROPERTY - User name for authentication
PASSWORD_PROPERTY - Password for authentication
SESSION_PROPERTY - Participate in a session with the endpoint?
OPERATION_STYLE_PROPERTY - "rpc" or "document"
SOAPACTION_USE_PROPERTY - Should SOAPAction be used?
SOAPACTION_URI_PROPERTY - If SOAPAction is used, this is that action
ENCODING_STYLE_PROPERTY - Default is SOAP 1.1: "http://schemas.xmlsoap.org/soap/encoding/"
AXIS properties:
SEND_TYPE_ATTR - Should we send the XSI type attributes (true/false)
TIMEOUT - Timeout used by transport sender in milliseconds
TRANSPORT_NAME - Name of transport handler to use
ATTACHMENT_ENCAPSULATION_FORMAT- Send attachments as MIME the default, or DIME.
CHARACTER_SET_ENCODING - Character set encoding to use for request

[中]Axis的JAXRPC调用接口的动态调用接口实现。此类应用于实际调用Web服务。它可以由WSDL文档(在服务对象的构造函数上)预先填充,也可以自己填充数据

Standard properties defined by in JAX-RPC's javax..xml.rpc.Call interface:
USERNAME_PROPERTY - User name for authentication
PASSWORD_PROPERTY - Password for authentication
SESSION_PROPERTY - Participate in a session with the endpoint?
OPERATION_STYLE_PROPERTY - "rpc" or "document"
SOAPACTION_USE_PROPERTY - Should SOAPAction be used?
SOAPACTION_URI_PROPERTY - If SOAPAction is used, this is that action
ENCODING_STYLE_PROPERTY - Default is SOAP 1.1: "http://schemas.xmlsoap.org/soap/encoding/"
AXIS properties:
SEND_TYPE_ATTR - Should we send the XSI type attributes (true/false)
TIMEOUT - Timeout used by transport sender in milliseconds
TRANSPORT_NAME - Name of transport handler to use
ATTACHMENT_ENCAPSULATION_FORMAT- Send attachments as MIME the default, or DIME.
CHARACTER_SET_ENCODING - Character set encoding to use for request

代码示例

代码示例来源:origin: mx4j/mx4j-tools

public Integer addNotificationListener(ObjectName name, Object filter, Subject delegate) throws InstanceNotFoundException, IOException
{
Call call = createCall();
call.setOperationName(new QName(SOAPConstants.NAMESPACE_URI, "addNotificationListener"));
call.addParameter("observed", qObjectName, ParameterMode.IN);
call.addParameter("filter", XMLType.XSD_ANY, ParameterMode.IN);
call.addParameter("delegate", qSubject, ParameterMode.IN);
call.setReturnType(XMLType.XSD_INT);
return (Integer)call.invoke(new Object[]{name, filter, delegate});
}

代码示例来源:origin: opentripplanner/OpenTripPlanner

Call RTcall = (Call) RTservice.createCall();
RTcall.setTargetEndpointAddress(new java.net.URL(RTendpointURL));
RTcall.setOperationName(new QName("edc.usgs.gov", "processAOI"));
String respOnse= (String) RTcall.invoke(new Object[] { payload });

代码示例来源:origin: stackoverflow.com

Call call = service.createCall();
call.setPortTypeName(portQName);
call.setOperationName(new QName(namespace, operation));
call.setProperty(Call.ENCODINGSTYLE_URI_PROPERTY, "http://schemas.xmlsoap.org/soap/encoding/");
call.setProperty(Call.OPERATION_STYLE_PROPERTY, "rpc");
call.addParameter("in0", org.apache.axis.Constants.XSD_STRING ,ParameterMode.IN);
call.addParameter("in1", org.apache.axis.Constants.XSD_STRING ,ParameterMode.IN);
call.setReturnType(serviceQName);
String targetEndpoint = "http://113.160.19.218:8312/axis/services/WeatherForecastTest1";
call.setTargetEndpointAddress(targetEndpoint);
String result = (String) call.invoke(params);
out.println(result);

代码示例来源:origin: OpenNMS/opennms

org.apache.axis.client.Call _call = super._createCall();
if (super.maintainSessionSet) {
_call.setMaintainSession(super.maintainSession);
_call.setUsername(super.cachedUsername);
_call.setPassword(super.cachedPassword);
_call.setTargetEndpointAddress(super.cachedEndpoint);
_call.setTimeout(super.cachedTimeout);
_call.setPortName(super.cachedPortName);
java.util.Enumeration keys = super.cachedProperties.keys();
while (keys.hasMoreElements()) {
java.lang.String key = (java.lang.String) keys.nextElement();
_call.setProperty(key, super.cachedProperties.get(key));
_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
_call.setEncodingStyle(org.apache.axis.Constants.URI_SOAP11_ENC);
for (int i = 0; i java.lang.Class cls = (java.lang.Class) cachedSerClasses.get(i);
javax.xml.namespace.QName qName =
(javax.xml.namespace.QName) cachedSerQNames.get(i);
java.lang.Object x = cachedSerFactories.get(i);
if (x instanceof Class) {
java.lang.Class df = (java.lang.Class)

代码示例来源:origin: uk.org.mygrid.feta/feta-engine

org.apache.axis.client.Call _call = super._createCall();
if (super.maintainSessionSet) {
_call.setMaintainSession(super.maintainSession);
_call.setUsername(super.cachedUsername);
_call.setPassword(super.cachedPassword);
_call.setTargetEndpointAddress(super.cachedEndpoint);
_call.setTimeout(super.cachedTimeout);
_call.setPortName(super.cachedPortName);
java.util.Enumeration keys = super.cachedProperties.keys();
while (keys.hasMoreElements()) {
java.lang.String key = (java.lang.String) keys.nextElement();
_call.setProperty(key, super.cachedProperties.get(key));

代码示例来源:origin: OpenNMS/opennms

_call.setOperation(_operations[0]);
_call.setUseSOAPAction(true);
_call.setSOAPActionURI("HPD_IncidentInterface_WS/HelpDesk_Query_Service");
_call.setEncodingStyle(null);
_call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE);
_call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
_call.setOperationName(new javax.xml.namespace.QName("", "HelpDesk_Query_Service"));
try { java.lang.Object _resp = _call.invoke(new java.lang.Object[] {parameters, ARAuthenticate});

代码示例来源:origin: OpenNMS/opennms

_call.setOperation(_operations[9]);
_call.setUseSOAPAction(true);
_call.setSOAPActionURI("http://opennms.org/integration/otrs/ticketservice#ArticleGetAllByTicketNumber");
_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
_call.setOperationName(new javax.xml.namespace.QName("http://opennms.org/integration/otrs/ticketservice", "ArticleGetAllByTicketNumber"));
try { java.lang.Object _resp = _call.invoke(new java.lang.Object[] {new java.lang.Long(ticketNumber), request_header});

代码示例来源:origin: org.apache.juddi.scout/scout

call.setTargetEndpointAddress(endpointURL.toURL());
Vector result = (Vector)call.invoke(soapBodies);
if (result.size() > 0 ) {
respOnse= ((SOAPBodyElement)result.elementAt(0)).getAsString();
Message msg = call.getResponseMessage();
respOnse= msg.getSOAPEnvelope().getFirstBody().getAsString();

代码示例来源:origin: org.astrogrid/astrogrid-registry-server

Vector result = (Vector) callObj.invoke
(new Object[] {sbeRequest});
if(result.size() > 0) {
SOAPBodyElement sbe = (SOAPBodyElement) result.get(0);
Document soapDoc = sbe.getAsDocument();
NodeList nl = soapDoc.getElementsByTagNameNS("*","setSpec");

代码示例来源:origin: org.apache.axis/axis

/**
* prefill as much info from the WSDL as it can.
* Right now it's target URL, SOAPAction, Parameter types,
* and return type of the Web Service.
*
* If wsdl is not present, this function set port name and operation name
* and does not modify target endpoint address.
*
* Note: Not part of JAX-RPC specification.
*
* @param portName PortName in the WSDL doc to search for
* @param opName Operation(method) that's going to be invoked
*/
public void setOperation(QName portName, String opName) {
setOperation(portName, new QName(opName));
}

代码示例来源:origin: axis/axis

call.setUseSOAPAction( true);
call.setSOAPActionURI( "urn:AdminService");
result = (Vector) call.invoke( params );
if (result == null || result.isEmpty()) {
throw new AxisFault(Messages.getMessage("nullResponse00"));
SOAPBodyElement body = (SOAPBodyElement) result.elementAt(0);
return body.toString();
} finally {

代码示例来源:origin: stackoverflow.com

try {
if (wsEndPoint == null || wsEndPoint.trim().length() == 0 || wsNAME == null || wsNAME.trim().length() == 0 ||
id == null || id.trim().length() == 0 || code == null || code.trim().length() == 0) {
retVal = "Error: mandatory parameter missing.";
} else {
Service service = new Service();
Call call = (Call)service.createCall();
call.setTargetEndpointAddress(new java.net.URL(wsEndPoint));
call.setOperationName(new QName("http://service.name.it/", wsNAME));
call.addParameter(new QName("http://service.name.it/", "arg0"), new QName("http://www.w3.org/2001/XMLSchema", "string"), ParameterMode.IN);
call.addParameter(new QName("http://service.name.it/", "arg1"), new QName("http://www.w3.org/2001/XMLSchema", "string"), ParameterMode.IN);
call.setSOAPActionURI("");
call.setEncodingStyle(null);
call.setProperty(Call.SEND_TYPE_ATTR, Boolean.FALSE);
call.setProperty(AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
retVal = ((String)call.invoke(new Object[] {id, code})).trim();
}
} catch (Exception e) {
retVal = String.format("Error: %s.", e.getMessage());

代码示例来源:origin: OpenNMS/opennms

public void ticketStateUpdate(org.opennms.integration.otrs.ticketservice.TicketStateUpdate ticketStateUpdate, org.opennms.integration.otrs.ticketservice.Credentials request_header) throws java.rmi.RemoteException {
if (super.cachedEndpoint == null) {
throw new org.apache.axis.NoEndPointException();
}
org.apache.axis.client.Call _call = createCall();
_call.setOperation(_operations[5]);
_call.setUseSOAPAction(true);
_call.setSOAPActionURI("http://opennms.org/integration/otrs/ticketservice#TicketStateUpdate");
_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
_call.setOperationName(new javax.xml.namespace.QName("http://opennms.org/integration/otrs/ticketservice", "TicketStateUpdate"));
setRequestHeaders(_call);
setAttachments(_call);
_call.invokeOneWay(new java.lang.Object[] {ticketStateUpdate, request_header});
}

代码示例来源:origin: uk.org.mygrid.feta/feta-engine

_call.setOperation(_operations[0]);
_call.setEncodingStyle(null);
_call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE);
_call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
_call.setOperationName(new javax.xml.namespace.QName("http://mygrid.org.uk/2004/FETA", "inquire"));
try { java.lang.Object _resp = _call.invoke(new java.lang.Object[] {searchRequest});

代码示例来源:origin: org.apache.kalumet/org.apache.kalumet.common

public SimplifiedFileObject[] browse( String path )
throws ClientException
{
call.registerTypeMapping( SimplifiedFileObject.class,
new QName( "http://kalumet.apache.org", "SimplifiedFileObject" ),
BeanSerializerFactory.class, BeanDeserializerFactory.class );
SimplifiedFileObject[] children = null;
try
{
children = ( (SimplifiedFileObject[]) call.invoke( "browse", new Object[]{ path } ) );
}
catch ( Exception e )
{
throw new ClientException( "Can't browse " + path, e );
}
return children;
}

代码示例来源:origin: stackoverflow.com

public final class WSUtils {
public static void handleSerialization(Call call, String ns, String bean, Class cl) {
QName qn = new QName(ns, bean);
call.registerTypeMapping(cl, qn,
new BeanSerializerFactory(cl, qn),
new BeanDeserializerFactory(cl, qn));
}
}

代码示例来源:origin: org.n52.metadata/smarteditor-api

SOAPBodyElement[] input = new SOAPBodyElement[1];
input[0] = new SOAPBodyElement(lDoc.getDocumentElement());
Vector vec = (Vector) mCall.invoke(input);
SOAPBodyElement elemResp = (SOAPBodyElement) vec.get(0);
lRespOnse= elemResp.getAsDocument();
} catch (ParserConfigurationException e) {

代码示例来源:origin: stackoverflow.com

import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.encoding.XMLType;
import javax.xml.rpc.ParameterMode;
public class axisClient {
public static void main(String [] args) throws Exception {
String endpoint = "http://localhost:8090/archive_name/service_name.jws";
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress( new java.net.URL(endpoint) );
call.setOperationName( "service_method_name" );
call.addParameter("parameter_name", XMLType.XSD_STRING, ParameterMode.IN );
call.setReturnType( XMLType.XSD_STRING );
call.setProperty(Call.CHARACTER_SET_ENCODING, "UTF-8");
String jsOnString= (String) call.invoke( new Object [] { "parameter_value"});
System.out.println("Got result : " + jsonString);
}
}

代码示例来源:origin: org.apache.openejb/openejb-axis

public void prepareCall(final Call call) {
call.setOperation(operationDesc);
call.setUseSOAPAction(useSOAPAction);
call.setSOAPActionURI(soapActionURI);
call.setSOAPVersion(soapVersion);
call.setOperationName(operationName);
//GAH!!!
call.setOperationStyle(operationDesc.getStyle());
call.setOperationUse(operationDesc.getUse());
}

代码示例来源:origin: net.sf.taverna.t2.activities/biomoby-activity-ui

private String doCall(String method, Object[] parameters)
throws MobyException {
Call call = null;
try {
Service service = new Service();
call = (Call) service.createCall();
call.setTargetEndpointAddress(REGISTRY_URL);
call.setTimeout(new Integer(0));
call.setSOAPActionURI(REGISTRY_URI + "#" + method);
return resultToString(call.invoke(REGISTRY_URI, method, parameters));
} catch (AxisFault e) {
throw new MobyException(REGISTRY_URL.toString()
+ (call == null ? "" : call.getOperationName()), e);
} catch (Exception e) {
throw new MobyException(e.toString(), e);
}
}

推荐阅读
  • SpringBoot整合SpringSecurity+JWT实现单点登录
    SpringBoot整合SpringSecurity+JWT实现单点登录,Go语言社区,Golang程序员人脉社 ... [详细]
  • 本文介绍了设计师伊振华受邀参与沈阳市智慧城市运行管理中心项目的整体设计,并以数字赋能和创新驱动高质量发展的理念,建设了集成、智慧、高效的一体化城市综合管理平台,促进了城市的数字化转型。该中心被称为当代城市的智能心脏,为沈阳市的智慧城市建设做出了重要贡献。 ... [详细]
  • 向QTextEdit拖放文件的方法及实现步骤
    本文介绍了在使用QTextEdit时如何实现拖放文件的功能,包括相关的方法和实现步骤。通过重写dragEnterEvent和dropEvent函数,并结合QMimeData和QUrl等类,可以轻松实现向QTextEdit拖放文件的功能。详细的代码实现和说明可以参考本文提供的示例代码。 ... [详细]
  • Webpack5内置处理图片资源的配置方法
    本文介绍了在Webpack5中处理图片资源的配置方法。在Webpack4中,我们需要使用file-loader和url-loader来处理图片资源,但是在Webpack5中,这两个Loader的功能已经被内置到Webpack中,我们只需要简单配置即可实现图片资源的处理。本文还介绍了一些常用的配置方法,如匹配不同类型的图片文件、设置输出路径等。通过本文的学习,读者可以快速掌握Webpack5处理图片资源的方法。 ... [详细]
  • Java序列化对象传给PHP的方法及原理解析
    本文介绍了Java序列化对象传给PHP的方法及原理,包括Java对象传递的方式、序列化的方式、PHP中的序列化用法介绍、Java是否能反序列化PHP的数据、Java序列化的原理以及解决Java序列化中的问题。同时还解释了序列化的概念和作用,以及代码执行序列化所需要的权限。最后指出,序列化会将对象实例的所有字段都进行序列化,使得数据能够被表示为实例的序列化数据,但只有能够解释该格式的代码才能够确定数据的内容。 ... [详细]
  • 知识图谱——机器大脑中的知识库
    本文介绍了知识图谱在机器大脑中的应用,以及搜索引擎在知识图谱方面的发展。以谷歌知识图谱为例,说明了知识图谱的智能化特点。通过搜索引擎用户可以获取更加智能化的答案,如搜索关键词"Marie Curie",会得到居里夫人的详细信息以及与之相关的历史人物。知识图谱的出现引起了搜索引擎行业的变革,不仅美国的微软必应,中国的百度、搜狗等搜索引擎公司也纷纷推出了自己的知识图谱。 ... [详细]
  • Tomcat/Jetty为何选择扩展线程池而不是使用JDK原生线程池?
    本文探讨了Tomcat和Jetty选择扩展线程池而不是使用JDK原生线程池的原因。通过比较IO密集型任务和CPU密集型任务的特点,解释了为何Tomcat和Jetty需要扩展线程池来提高并发度和任务处理速度。同时,介绍了JDK原生线程池的工作流程。 ... [详细]
  • 本文介绍了一些Java开发项目管理工具及其配置教程,包括团队协同工具worktil,版本管理工具GitLab,自动化构建工具Jenkins,项目管理工具Maven和Maven私服Nexus,以及Mybatis的安装和代码自动生成工具。提供了相关链接供读者参考。 ... [详细]
  • 本文讨论了clone的fork与pthread_create创建线程的不同之处。进程是一个指令执行流及其执行环境,其执行环境是一个系统资源的集合。在调用系统调用fork创建一个进程时,子进程只是完全复制父进程的资源,这样得到的子进程独立于父进程,具有良好的并发性。但是二者之间的通讯需要通过专门的通讯机制,另外通过fork创建子进程系统开销很大。因此,在某些情况下,使用clone或pthread_create创建线程可能更加高效。 ... [详细]
  • 本文介绍了Windows操作系统的版本及其特点,包括Windows 7系统的6个版本:Starter、Home Basic、Home Premium、Professional、Enterprise、Ultimate。Windows操作系统是微软公司研发的一套操作系统,具有人机操作性优异、支持的应用软件较多、对硬件支持良好等优点。Windows 7 Starter是功能最少的版本,缺乏Aero特效功能,没有64位支持,最初设计不能同时运行三个以上应用程序。 ... [详细]
  • 预备知识可参考我整理的博客Windows编程之线程:https:www.cnblogs.comZhuSenlinp16662075.htmlWindows编程之线程同步:https ... [详细]
  • 本文记录了在vue cli 3.x中移除console的一些采坑经验,通过使用uglifyjs-webpack-plugin插件,在vue.config.js中进行相关配置,包括设置minimizer、UglifyJsPlugin和compress等参数,最终成功移除了console。同时,还包括了一些可能出现的报错情况和解决方法。 ... [详细]
  • Whatsthedifferencebetweento_aandto_ary?to_a和to_ary有什么区别? ... [详细]
  • 本文介绍了一个适用于PHP应用快速接入TRX和TRC20数字资产的开发包,该开发包支持使用自有Tron区块链节点的应用场景,也支持基于Tron官方公共API服务的轻量级部署场景。提供的功能包括生成地址、验证地址、查询余额、交易转账、查询最新区块和查询交易信息等。详细信息可参考tron-php的Github地址:https://github.com/Fenguoz/tron-php。 ... [详细]
  • Android日历提醒软件开源项目分享及使用教程
    本文介绍了一款名为Android日历提醒软件的开源项目,作者分享了该项目的代码和使用教程,并提供了GitHub项目地址。文章详细介绍了该软件的主界面风格、日程信息的分类查看功能,以及添加日程提醒和查看详情的界面。同时,作者还提醒了读者在使用过程中可能遇到的Android6.0权限问题,并提供了解决方法。 ... [详细]
author-avatar
yangaien
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有