本文整理了Java中org.apache.axis.client.Call
类的一些代码示例,展示了Call
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Call
类的具体详情如下:
包路径:org.apache.axis.client.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 < cachedSerFactories.size(); ++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);
}
}
内容来源于网络,如有侵权,请联系作者删除!