本文整理匯總了Java中org.apache.axis.client.Call.setOperation方法的典型用法代碼示例。如果您正苦於以下問題:Java Call.setOperation方法的具體用法?Java Call.setOperation怎麽用?Java Call.setOperation使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.apache.axis.client.Call
的用法示例。
在下文中一共展示了Call.setOperation方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: WMLS_GetBaseMsg
import org.apache.axis.client.Call; //導入方法依賴的package包/類
public String WMLS_GetBaseMsg(short returnValueIn) throws RemoteException {
if (super.cachedEndpoint == null) {
throw new org.apache.axis.NoEndPointException();
}
Call _call = createCall();
_call.setOperation(_operations[2]);
_call.setUseSOAPAction(true);
_call.setSOAPActionURI("http://www.witsml.org/action/120/Store.WMLS_GetBaseMsg");
_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
_call.setOperationName(new QName("http://www.witsml.org/message/120", "WMLS_GetBaseMsg"));
setRequestHeaders(_call);
setAttachments(_call);
Object _resp = _call.invoke(new Object[]{returnValueIn});
if (_resp instanceof RemoteException) {
throw (RemoteException) _resp;
} else {
extractAttachments(_call);
try {
return (String) _resp;
} catch (Exception _exception) {
return (String) org.apache.axis.utils.JavaUtils.convert(_resp, String.class);
}
}
}
示例2: WMLS_GetVersion
import org.apache.axis.client.Call; //導入方法依賴的package包/類
public String WMLS_GetVersion() throws RemoteException {
if (super.cachedEndpoint == null) {
throw new org.apache.axis.NoEndPointException();
}
Call _call = createCall();
_call.setOperation(_operations[5]);
_call.setUseSOAPAction(true);
_call.setSOAPActionURI("http://www.witsml.org/action/120/Store.WMLS_GetVersion");
_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
_call.setOperationName(new QName("http://www.witsml.org/message/120", "WMLS_GetVersion"));
setRequestHeaders(_call);
setAttachments(_call);
Object _resp = _call.invoke(new Object[]{});
if (_resp instanceof RemoteException) {
throw (RemoteException) _resp;
} else {
extractAttachments(_call);
try {
return (String) _resp;
} catch (Exception _exception) {
return (String) org.apache.axis.utils.JavaUtils.convert(_resp, String.class);
}
}
}
示例3: prepareCall
import org.apache.axis.client.Call; //導入方法依賴的package包/類
public void prepareCall(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());
}
示例4: getQuote3
import org.apache.axis.client.Call; //導入方法依賴的package包/類
/**
* This will use the WSDL to prefill all of the info needed to make
* the call. All that's left is filling in the args to invoke().
*/
public float getQuote3(String args[]) throws Exception {
Options opts = new Options( args );
args = opts.getRemainingArgs();
if ( args == null ) {
System.err.println( "Usage: GetQuote <symbol>" );
System.exit(1);
}
/* Define the service QName and port QName */
/*******************************************/
QName servQN = new QName("urn:xmltoday-delayed-quotes","GetQuoteService");
QName portQN = new QName("urn:xmltoday-delayed-quotes","GetQuote");
/* Now use those QNames as pointers into the WSDL doc */
/******************************************************/
Service service = new Service( new URL("file:GetQuote.wsdl"), servQN );
Call call = (Call) service.createCall( portQN, "getQuote" );
/* Strange - but allows the user to change just certain portions of */
/* the URL we're gonna use to invoke the service. Useful when you */
/* want to run it thru tcpmon (ie. put -p81 on the cmd line). */
/********************************************************************/
opts.setDefaultURL( call.getTargetEndpointAddress() );
call.setTargetEndpointAddress( new URL(opts.getURL()) );
/* Define some service specific properties */
/*******************************************/
call.setUsername( opts.getUser() );
call.setPassword( opts.getPassword() );
/* Get symbol and invoke the service */
/*************************************/
Object result = call.invoke( new Object[] { symbol = args[0] } );
result = call.invoke( new Object[] { symbol = args[0] } );
/* Reuse the call object to call the test method */
/*************************************************/
call.setOperation( portQN, "test" );
call.setReturnType( XMLType.XSD_STRING );
System.out.println( call.invoke(new Object[]{}) );
return( ((Float) result).floatValue() );
}