本文整理了Java中org.apache.axis.client.Call.addParameter()
方法的一些代码示例,展示了Call.addParameter()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Call.addParameter()
方法的具体详情如下:
包路径:org.apache.axis.client.Call
类名称:Call
方法名:addParameter
[英]Adds a parameter type and mode for a specific operation. Note that the client code is not required to call any addParameter and setReturnType methods before calling the invoke method. A Call implementation class can determine the parameter types by using the Java reflection and configured type mapping registry.
[中]为特定操作添加参数类型和模式。请注意,在调用invoke方法之前,不需要客户端代码来调用任何addParameter和setReturnType方法。调用实现类可以通过使用Java反射和配置的类型映射注册表来确定参数类型。
代码示例来源:origin: mx4j/mx4j-tools
public void addNotificationListener(ObjectName name, ObjectName listener, Object filter, Object handback, Subject delegate)
throws InstanceNotFoundException, IOException
{
Call call = createCall();
call.setOperationName(new QName(SOAPConstants.NAMESPACE_URI, "addNotificationListener"));
call.addParameter("observed", qObjectName, ParameterMode.IN);
call.addParameter("listener", qObjectName, ParameterMode.IN);
call.addParameter("filter", XMLType.XSD_ANY, ParameterMode.IN);
call.addParameter("handback", XMLType.XSD_ANY, ParameterMode.IN);
call.addParameter("delegate", qSubject, ParameterMode.IN);
call.setReturnType(XMLType.AXIS_VOID);
call.invoke(new Object[]{name, listener, filter, handback, delegate});
}
代码示例来源:origin: mx4j/mx4j-tools
public NotificationResult fetchNotifications(long clientSequenceNumber, int maxNotifications, long timeout) throws IOException
{
Call call = createCall();
call.setOperationName(new QName(SOAPConstants.NAMESPACE_URI, "fetchNotifications"));
call.addParameter("sequence", XMLType.XSD_LONG, ParameterMode.IN);
call.addParameter("maxNumber", XMLType.XSD_INT, ParameterMode.IN);
call.addParameter("timeout", XMLType.XSD_LONG, ParameterMode.IN);
call.setReturnType(new QName(SOAPConstants.NAMESPACE_URI, "NotificationResult"));
NotificationResult result = (NotificationResult)call.invoke(new Object[]{new Long(clientSequenceNumber), new Integer(maxNotifications), new Long(timeout)});
return result;
}
代码示例来源: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: mx4j/mx4j-tools
public void removeNotificationListeners(ObjectName observed, Integer[] ids, Subject delegate) throws InstanceNotFoundException, ListenerNotFoundException, IOException
{
Call call = createCall();
call.setOperationName(new QName(SOAPConstants.NAMESPACE_URI, "removeNotificationListeners"));
call.addParameter("observed", qObjectName, ParameterMode.IN);
call.addParameter("ids", XMLType.SOAP_ARRAY, ParameterMode.IN);
call.addParameter("delegate", qSubject, ParameterMode.IN);
call.setReturnType(XMLType.AXIS_VOID);
call.invoke(new Object[]{observed, ids, delegate});
}
代码示例来源:origin: mx4j/mx4j-tools
public boolean isInstanceOf(ObjectName objectName, String className, Subject delegate) throws InstanceNotFoundException, IOException
{
Call call = createCall();
call.setOperationName(new QName(SOAPConstants.NAMESPACE_URI, "isInstanceOf"));
call.addParameter("objectName", qObjectName, ParameterMode.IN);
call.addParameter("className", XMLType.XSD_STRING, ParameterMode.IN);
call.addParameter("delegate", qSubject, ParameterMode.IN);
call.setReturnType(XMLType.XSD_BOOLEAN);
Boolean isinstanceof = (Boolean)call.invoke(new Object[]{objectName, className, delegate});
return isinstanceof.booleanValue();
}
代码示例来源:origin: mx4j/mx4j-tools
public void setAttribute(ObjectName objectName, Object attribute, Subject delegate) throws InstanceNotFoundException, AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException, IOException
{
Call call = createCall();
call.setOperationName(new QName(SOAPConstants.NAMESPACE_URI, "setAttribute"));
call.addParameter("objectName", qObjectName, ParameterMode.IN);
call.addParameter("attribute", new QName(SOAPConstants.NAMESPACE_URI, "Attribute"), ParameterMode.IN);
call.addParameter("delegate", qSubject, ParameterMode.IN);
call.setReturnType(XMLType.AXIS_VOID);
call.invoke(new Object[]{objectName, attribute, delegate});
}
代码示例来源:origin: mx4j/mx4j-tools
public AttributeList setAttributes(ObjectName objectName, Object attributes, Subject delegate) throws InstanceNotFoundException, ReflectionException, IOException
{
Call call = createCall();
call.setOperationName(new QName(SOAPConstants.NAMESPACE_URI, "setAttributes"));
QName qAttributeList = new QName(SOAPConstants.NAMESPACE_URI, "AttributeList");
call.addParameter("objectName", qObjectName, ParameterMode.IN);
call.addParameter("attributeList", qAttributeList, ParameterMode.IN);
call.addParameter("delegate", qSubject, ParameterMode.IN);
call.setReturnType(qAttributeList);
AttributeList list = (AttributeList)call.invoke(new Object[]{objectName, attributes, delegate});
return list;
}
代码示例来源:origin: mx4j/mx4j-tools
public AttributeList getAttributes(ObjectName objectName, String[] attributes, Subject delegate) throws InstanceNotFoundException, ReflectionException, IOException
{
Call call = createCall();
call.setOperationName(new QName(SOAPConstants.NAMESPACE_URI, "getAttributes"));
call.addParameter("objectName", qObjectName, ParameterMode.IN);
call.addParameter("attributeNames", XMLType.SOAP_ARRAY, ParameterMode.IN);
call.addParameter("delegate", qSubject, ParameterMode.IN);
call.setReturnType(new QName(SOAPConstants.NAMESPACE_URI, "AttributeList"));
AttributeList list = (AttributeList)call.invoke(new Object[]{objectName, attributes, delegate});
return list;
}
代码示例来源:origin: mx4j/mx4j-tools
public Set queryMBeans(ObjectName patternName, Object filter, Subject delegate) throws IOException
{
Call call = createCall();
call.setOperationName(new QName(SOAPConstants.NAMESPACE_URI, "queryMBeans"));
call.addParameter("pattern", qObjectName, ParameterMode.IN);
call.addParameter("query", XMLType.XSD_ANY, ParameterMode.IN);
call.addParameter("delegate", qSubject, ParameterMode.IN);
call.setReturnType(new QName(SOAPConstants.NAMESPACE_URI, "Set"));
Set set = (Set)call.invoke(new Object[]{patternName, filter, delegate});
return set;
}
代码示例来源:origin: mx4j/mx4j-tools
public Object getAttribute(ObjectName objectName, String attribute, Subject delegate) throws MBeanException, AttributeNotFoundException, InstanceNotFoundException, ReflectionException, IOException
{
Call call = createCall();
call.setOperationName(new QName(SOAPConstants.NAMESPACE_URI, "getAttribute"));
call.addParameter("objectName", qObjectName, ParameterMode.IN);
call.addParameter("attributeName", XMLType.XSD_STRING, ParameterMode.IN);
call.addParameter("delegate", qSubject, ParameterMode.IN);
call.setReturnType(XMLType.XSD_ANY);
Object result = call.invoke(new Object[]{objectName, attribute, delegate});
return result;
}
代码示例来源:origin: mx4j/mx4j-tools
public void removeNotificationListener(ObjectName name, ObjectName listener, Subject delegate)
throws InstanceNotFoundException, ListenerNotFoundException, IOException
{
Call call = createCall();
call.setOperationName(new QName(SOAPConstants.NAMESPACE_URI, "removeNotificationListener"));
call.addParameter("observed", qObjectName, ParameterMode.IN);
call.addParameter("listener", qObjectName, ParameterMode.IN);
call.addParameter("delegate", qSubject, ParameterMode.IN);
call.setReturnType(XMLType.AXIS_VOID);
call.invoke(new Object[]{name, listener, delegate});
}
代码示例来源:origin: mx4j/mx4j-tools
public MBeanInfo getMBeanInfo(ObjectName objectName, Subject delegate) throws InstanceNotFoundException, IntrospectionException, ReflectionException, IOException
{
Call call = createCall();
call.setOperationName(new QName(SOAPConstants.NAMESPACE_URI, "getMBeanInfo"));
call.addParameter("objectName", qObjectName, ParameterMode.IN);
call.addParameter("delegate", qSubject, ParameterMode.IN);
call.setReturnType(new QName(SOAPConstants.NAMESPACE_URI, "MBeanInfo"));
MBeanInfo info = (MBeanInfo)call.invoke(new Object[]{objectName, delegate});
return info;
}
代码示例来源:origin: mx4j/mx4j-tools
public boolean isRegistered(ObjectName objectName, Subject delegate) throws IOException
{
Call call = createCall();
call.setOperationName(new QName(SOAPConstants.NAMESPACE_URI, "isRegistered"));
call.addParameter("objectName", qObjectName, ParameterMode.IN);
call.addParameter("delegate", qSubject, ParameterMode.IN);
call.setReturnType(XMLType.XSD_BOOLEAN);
Boolean registered = (Boolean)call.invoke(new Object[]{objectName, delegate});
return registered.booleanValue();
}
代码示例来源:origin: mx4j/mx4j-tools
public void unregisterMBean(ObjectName objectName, Subject delegate) throws InstanceNotFoundException, MBeanRegistrationException, IOException
{
Call call = createCall();
call.setOperationName(new QName(SOAPConstants.NAMESPACE_URI, "unregisterMBean"));
call.addParameter("objectName", qObjectName, ParameterMode.IN);
call.addParameter("delegate", qSubject, ParameterMode.IN);
call.setReturnType(XMLType.AXIS_VOID);
call.invoke(new Object[]{objectName, delegate});
}
代码示例来源:origin: mx4j/mx4j-tools
public ObjectInstance getObjectInstance(ObjectName objectName, Subject delegate) throws InstanceNotFoundException, IOException
{
Call call = createCall();
call.setOperationName(new QName(SOAPConstants.NAMESPACE_URI, "getObjectInstance"));
call.addParameter("objectName", qObjectName, ParameterMode.IN);
call.addParameter("delegate", qSubject, ParameterMode.IN);
call.setReturnType(qObjectInstance);
ObjectInstance instance = (ObjectInstance)call.invoke(new Object[]{objectName, delegate});
return instance;
}
代码示例来源:origin: mx4j/mx4j-tools
public String connect(Object credentials) throws IOException, SecurityException
{
Call call = createCall();
call.setOperationName(new QName(SOAPConstants.NAMESPACE_URI, "connect"));
call.addParameter("credentials", XMLType.XSD_ANY, ParameterMode.IN);
call.setReturnType(XMLType.XSD_STRING);
// call.addFault(new QName(SOAPConstants.NAMESPACE_URI, "SecurityException"), SecurityException.class, XMLType.XSD_ANY, true);
connectionId = (String)call.invoke(new Object[]{credentials});
return connectionId;
}
代码示例来源:origin: stackoverflow.com
Service service = new Service();
Call call = (Call) service.createCall();
String endpoint ="URL of the WSDL";
call.setTargetEndpointAddress(new URL(endpoint));
call.setOperationName(new QName("webservice method name"));
//input parameter type
call.addParameter("op1", XMLType.XSD_STRING, ParameterMode.IN);
//output parameter type
call.setReturnType(XMLType.XSD_STRING);
//call web service and return string
call.invoke(new Object[] { new String("parameter")});
代码示例来源:origin: mx4j/mx4j-tools
public Integer getMBeanCount(Subject delegate) throws IOException
{
Call call = createCall();
call.setOperationName(new QName(SOAPConstants.NAMESPACE_URI, "getMBeanCount"));
call.addParameter("delegate", qSubject, ParameterMode.IN);
call.setReturnType(XMLType.XSD_INT);
Integer count = (Integer)call.invoke(new Object[]{delegate});
return count;
}
代码示例来源:origin: mx4j/mx4j-tools
public String[] getDomains(Subject delegate) throws IOException
{
Call call = createCall();
call.setOperationName(new QName(SOAPConstants.NAMESPACE_URI, "getDomains"));
call.addParameter("delegate", qSubject, ParameterMode.IN);
call.setReturnType(XMLType.SOAP_ARRAY);
String[] domains = (String[])call.invoke(new Object[]{delegate});
return domains;
}
代码示例来源:origin: mx4j/mx4j-tools
public String getDefaultDomain(Subject delegate) throws IOException
{
Call call = createCall();
call.setOperationName(new QName(SOAPConstants.NAMESPACE_URI, "getDefaultDomain"));
call.addParameter("delegate", qSubject, ParameterMode.IN);
call.setReturnType(XMLType.XSD_STRING);
String domain = (String)call.invoke(new Object[]{delegate});
return domain;
}
内容来源于网络,如有侵权,请联系作者删除!