private Method findOperation(AxisOperation op, Class<?> implClass) { Method method = (Method)(op.getParameterValue("myMethod")); if (method != null && method.getDeclaringClass() == implClass) return method; String methodName = op.getName().getLocalPart(); try { // Looking for a method of the form "OMElement method(OMElement)" method = implClass.getMethod(methodName, new Class [] { OMElement.class }); if (method.getReturnType().equals(OMElement.class)) { try { op.addParameter("myMethod", method); } catch (AxisFault axisFault) { // Do nothing here } return method; } } catch (NoSuchMethodException e) { // Fault through } return null; }
private Method findOperation(AxisOperation op, Class<?> implClass) { Method method = (Method)(op.getParameterValue("myMethod")); if (method != null && method.getDeclaringClass() == implClass) return method; String methodName = op.getName().getLocalPart(); try { // Looking for a method of the form "void method(OMElement)" method = implClass.getMethod(methodName, new Class [] { OMElement.class }); if (method.getReturnType().equals(void.class)) { try { op.addParameter("myMethod", method); } catch (AxisFault axisFault) { // Do nothing here } return method; } } catch (NoSuchMethodException e) { // Fall through } return null; }
private Method findOperation(AxisOperation op, Class<?> implClass) { Method method = (Method)(op.getParameterValue("myMethod")); if (method != null && method.getDeclaringClass() == implClass) return method; String methodName = op.getName().getLocalPart(); try { // Looking for a method of the form "void method(OMElement)" method = implClass.getMethod(methodName, new Class [] { OMElement.class }); if (method.getReturnType().equals(void.class)) { try { op.addParameter("myMethod", method); } catch (AxisFault axisFault) { // Do nothing here } return method; } } catch (NoSuchMethodException e) { // Fall through } return null; }
private Method findOperation(AxisOperation op, Class<?> implClass) { Method method = (Method)(op.getParameterValue("myMethod")); if (method != null && method.getDeclaringClass() == implClass) return method; String methodName = op.getName().getLocalPart(); try { // Looking for a method of the form "OMElement method(OMElement)" method = implClass.getMethod(methodName, new Class [] { OMElement.class }); if (method.getReturnType().equals(OMElement.class)) { try { op.addParameter("myMethod", method); } catch (AxisFault axisFault) { // Do nothing here } return method; } } catch (NoSuchMethodException e) { // Fault through } return null; }
public void serviceUpdate(AxisEvent axisEvent, AxisService axisService) { try { if (axisEvent.equals(AxisEvent.SERVICE_DEPLOY) && axisService.getName().equals("ServiceAdmin")){ AxisOperation operation = axisService.getOperation(new QName("listServiceGroups")); ArrayList<Parameter> params = operation.getParameters(); for(Parameter param: params) { operation.removeParameter(param); } Parameter authAction = new Parameter("AuthorizationAction", "/permission/admin/manage/monitor/service"); operation.addParameter(authAction); } } catch (AxisFault axisFault) { axisFault.printStackTrace(); } }
axisOperation.addParameter(param); } catch (AxisFault af) {
private void setCountersAndProcessors(AxisOperation op){ // IN operation counter Parameter inOpCounter = new Parameter(); inOpCounter.setName(StatisticsConstants.IN_OPERATION_COUNTER); inOpCounter.setValue(new AtomicInteger(0)); try { op.addParameter(inOpCounter); } catch (AxisFault ignored) { // will not occur } // OUT operation counter Parameter outOpCounter = new Parameter(); outOpCounter.setName(StatisticsConstants.OUT_OPERATION_COUNTER); outOpCounter.setValue(new AtomicInteger(0)); try { op.addParameter(outOpCounter); } catch (AxisFault ignored) { // will not occur } // Operation response time processor Parameter responseTimeProcessor = new Parameter(); responseTimeProcessor.setName(StatisticsConstants.OPERATION_RESPONSE_TIME_PROCESSOR); responseTimeProcessor.setValue(new ResponseTimeProcessor()); try { op.addParameter(responseTimeProcessor); } catch (AxisFault axisFault) { // will not occur } }
axisOperation.addParameter(param); } catch (AxisFault af) {
OperationDescriptionImpl(AxisOperation operation, EndpointInterfaceDescription parent) { parentEndpointInterfaceDescription = parent; partAttachmentMap = new HashMap<String, AttachmentDescription>(); axisOperation = operation; methodComposite = null; if(this.axisOperation != null) { this.operationQName = axisOperation.getName(); try { this.axisOperation.addParameter(new Parameter(OperationDescription.AXIS_OPERATION_PARAMETER, this)); } catch(AxisFault af) { throw ExceptionFactory.makeWebServiceException(Messages.getMessage("operationDescriptionErr1")); } } else { operationQName = null; } buildAttachmentInformation(); }
OperationDescriptionImpl(AxisOperation operation, EndpointInterfaceDescription parent) { parentEndpointInterfaceDescription = parent; partAttachmentMap = new HashMap<String, AttachmentDescription>(); axisOperation = operation; methodComposite = null; if(this.axisOperation != null) { this.operationQName = axisOperation.getName(); try { this.axisOperation.addParameter(new Parameter(OperationDescription.AXIS_OPERATION_PARAMETER, this)); } catch(AxisFault af) { throw ExceptionFactory.makeWebServiceException(Messages.getMessage("operationDescriptionErr1")); } } else { operationQName = null; } buildAttachmentInformation(); }
parameter.setName(StatisticsConstants.OPERATION_FAULT_COUNTER); parameter.setValue(counter); axisOperation.addParameter(parameter); operationParameter.setName(StatisticsConstants.IN_OPERATION_COUNTER); operationParameter.setValue(operationCounter); axisOperation.addParameter(operationParameter);
Parameter parameter = ParameterUtil .createParameter(Constants.Configuration.ENABLE_MTOM, flag.trim()); operation.addParameter(parameter);
axisOp.addParameter(parameter); paramDO.setValue(parameterElement.toString()); pm.updateEntity(paramDO); axisOp.addParameter(parameter);
this.axisOperation.addParameter(new Parameter(OperationDescription.AXIS_OPERATION_PARAMETER, this));
this.axisOperation.addParameter(new Parameter(OperationDescription.AXIS_OPERATION_PARAMETER, this));
OperationDescriptionImpl(Method method, EndpointInterfaceDescription parent) { parentEndpointInterfaceDescription = parent; methodComposite = null; partAttachmentMap = new HashMap<String, AttachmentDescription>(); setSEIMethod(method); // The operationQName is intentionally unqualified to be consistent with the remaining parts of the system. // Using a qualified name will cause breakage. // Don't do --> this.operationQName = new QName(parent.getTargetNamespace(), getOperationName()); this.operationQName = new QName("", getOperationName()); if (getEndpointInterfaceDescription().getEndpointDescription() != null) { if (!getEndpointInterfaceDescription().getEndpointDescription().getServiceDescription().isServerSide()) { axisOperation = createClientAxisOperation(); } else { axisOperation = null; } } else { axisOperation = null; } if(this.axisOperation != null) { try { this.axisOperation.addParameter(new Parameter(OperationDescription.AXIS_OPERATION_PARAMETER, this)); } catch(AxisFault af) { throw ExceptionFactory.makeWebServiceException(Messages.getMessage("operationDescriptionErr1")); } } buildAttachmentInformation(); }
OperationDescriptionImpl(Method method, EndpointInterfaceDescription parent) { parentEndpointInterfaceDescription = parent; methodComposite = null; partAttachmentMap = new HashMap<String, AttachmentDescription>(); setSEIMethod(method); // The operationQName is intentionally unqualified to be consistent with the remaining parts of the system. // Using a qualified name will cause breakage. // Don't do --> this.operationQName = new QName(parent.getTargetNamespace(), getOperationName()); this.operationQName = new QName("", getOperationName()); if (getEndpointInterfaceDescription().getEndpointDescription() != null) { if (!getEndpointInterfaceDescription().getEndpointDescription().getServiceDescription().isServerSide()) { axisOperation = createClientAxisOperation(); } else { axisOperation = null; } } else { axisOperation = null; } if(this.axisOperation != null) { try { this.axisOperation.addParameter(new Parameter(OperationDescription.AXIS_OPERATION_PARAMETER, this)); } catch(AxisFault af) { throw ExceptionFactory.makeWebServiceException(Messages.getMessage("operationDescriptionErr1")); } } buildAttachmentInformation(); }
private static void updateCurrentInvocationStatistic(MessageContext messageContext, long responseTime) throws AxisFault { messageContext.setProperty(StatisticsConstants.GLOBAL_CURRENT_INVOCATION_RESPONSE_TIME,responseTime); if (messageContext.getAxisOperation() != null) { Parameter operationResponseTimeParam = new Parameter(); operationResponseTimeParam.setName(StatisticsConstants.OPERATION_RESPONSE_TIME); operationResponseTimeParam.setValue(responseTime); messageContext.getAxisOperation().addParameter(operationResponseTimeParam); } if (messageContext.getAxisService() != null) { Parameter serviceResponseTimeParam = new Parameter(); serviceResponseTimeParam.setName(StatisticsConstants.SERVICE_RESPONSE_TIME); serviceResponseTimeParam.setValue(responseTime); messageContext.getAxisService().addParameter(serviceResponseTimeParam); } } }
Parameter parameter = (Parameter) parameters.next(); operation.addParameter(parameter);
Parameter parameter = (Parameter) parameters.next(); operation.addParameter(parameter);