org.apache.axis.client.Call.setReturnType()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(10.0k)|赞(0)|评价(0)|浏览(425)

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

Call.setReturnType介绍

[英]Sets the return type of the operation associated with this Call object.
[中]设置与此调用对象关联的操作的返回类型。

代码示例

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

/**
 * Set the return type as a header
 */
public void setReturnTypeAsHeader(QName xmlType) {
  setReturnType(xmlType);
  operation.setReturnHeader(true);
} // setReturnTypeAsHeader

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

/**
 * Set the return type as a header
 */
public void setReturnTypeAsHeader(QName xmlType, Class javaType) {
  setReturnType(xmlType, javaType);
  operation.setReturnHeader(true);
} // setReturnTypeAsHeader

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

/**
 * Set the return type as a header
 */
public void setReturnTypeAsHeader(QName xmlType) {
  setReturnType(xmlType);
  operation.setReturnHeader(true);
} // setReturnTypeAsHeader

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

/**
 * Set the return type as a header
 */
public void setReturnTypeAsHeader(QName xmlType, Class javaType) {
  setReturnType(xmlType, javaType);
  operation.setReturnHeader(true);
} // setReturnTypeAsHeader

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

/**
 * Set the return type as a header
 */
public void setReturnTypeAsHeader(QName xmlType) {
  setReturnType(xmlType);
  operation.setReturnHeader(true);
} // setReturnTypeAsHeader

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

public void close() throws IOException
{
 Call call = createCall();
 call.setOperationName(new QName(SOAPConstants.NAMESPACE_URI, "close"));
 call.setReturnType(XMLType.AXIS_VOID);
 call.invoke(new Object[0]);
}

代码示例来源: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 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: 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 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: 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 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 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 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 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 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;
}

相关文章