本文整理匯總了Java中org.apache.axis.message.RPCParam類的典型用法代碼示例。如果您正苦於以下問題:Java RPCParam類的具體用法?Java RPCParam怎麽用?Java RPCParam使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
RPCParam類屬於org.apache.axis.message包,在下文中一共展示了RPCParam類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: demarshallArguments
import org.apache.axis.message.RPCParam; //導入依賴的package包/類
private Object[] demarshallArguments() throws Exception {
SOAPMessage message = messageContext.getMessage();
messageContext.setProperty(org.apache.axis.SOAPPart.ALLOW_FORM_OPTIMIZATION, Boolean.TRUE);
if (message != null) {
message.saveChanges();
}
try {
Message reqMsg = messageContext.getRequestMessage();
SOAPEnvelope requestEnvelope = reqMsg.getSOAPEnvelope();
RPCElement body = getBody(requestEnvelope, messageContext);
body.setNeedDeser(true);
Vector args = null;
try {
args = body.getParams();
} catch (SAXException e) {
if (e.getException() != null) {
throw e.getException();
}
throw e;
}
Object[] argValues = new Object[operation.getNumParams()];
for (int i = 0; i < args.size(); i++) {
RPCParam rpcParam = (RPCParam) args.get(i);
Object value = rpcParam.getObjectValue();
ParameterDesc paramDesc = rpcParam.getParamDesc();
if (paramDesc != null && paramDesc.getJavaType() != null) {
value = JavaUtils.convert(value, paramDesc.getJavaType());
rpcParam.setObjectValue(value);
}
int order = (paramDesc == null || paramDesc.getOrder() == -1) ? i : paramDesc.getOrder();
argValues[order] = value;
}
return argValues;
} finally {
messageContext.setProperty(org.apache.axis.SOAPPart.ALLOW_FORM_OPTIMIZATION, Boolean.FALSE);
}
}