protected void processOperationModuleRefs(Iterator moduleRefs, AxisOperation operation) throws DeploymentException { // try { while (moduleRefs.hasNext()) { OMElement moduleref = (OMElement) moduleRefs.next(); OMAttribute moduleRefAttribute = moduleref .getAttribute(new QName(TAG_REFERENCE)); if (moduleRefAttribute != null) { String refName = moduleRefAttribute.getAttributeValue(); operation.addModule(refName); // if (axisConfig.getModule(refName) == null) { // throw new DeploymentException(Messages.getMessage( // DeploymentErrorMsgs.MODULE_NOT_FOUND, refName)); // } else { // operation.addModule(refName); // } } } // } catch (AxisFault axisFault) { // throw new DeploymentException(Messages.getMessage( // DeploymentErrorMsgs.MODULE_NOT_FOUND, axisFault // .getMessage()), axisFault); // } }
protected void processOperationModuleRefs(Iterator moduleRefs, AxisOperation operation) throws DeploymentException { // try { while (moduleRefs.hasNext()) { OMElement moduleref = (OMElement) moduleRefs.next(); OMAttribute moduleRefAttribute = moduleref .getAttribute(new QName(TAG_REFERENCE)); if (moduleRefAttribute != null) { String refName = moduleRefAttribute.getAttributeValue(); operation.addModule(refName); // if (axisConfig.getModule(refName) == null) { // throw new DeploymentException(Messages.getMessage( // DeploymentErrorMsgs.MODULE_NOT_FOUND, refName)); // } else { // operation.addModule(refName); // } } } // } catch (AxisFault axisFault) { // throw new DeploymentException(Messages.getMessage( // DeploymentErrorMsgs.MODULE_NOT_FOUND, axisFault // .getMessage()), axisFault); // } }
/** * If the required module is not found this will return the error code 1: which is * "Error 1: Required module is not found" * * @param moduleRefs moduleRefs * @param operation operation * @throws DeploymentException DeploymentException */ protected void processOperationModuleRefs(Iterator moduleRefs, AxisOperation operation) throws DeploymentException { while (moduleRefs.hasNext()) { OMElement moduleref = (OMElement) moduleRefs.next(); OMAttribute moduleRefAttribute = moduleref .getAttribute(new QName(TAG_REFERENCE)); if (moduleRefAttribute != null) { String refName = moduleRefAttribute.getAttributeValue(); if (axisConfig.getModule(refName) == null) { throw new DeploymentException(MODULE_NOT_FOUND_ERROR + refName); } else { operation.addModule(refName); } } } }
private void applyPolicies(Axis2WireSourceDefinition pwsd, AxisService axisService) throws WiringException, AxisFault { for (Iterator<?> i = axisService.getOperations(); i.hasNext();) { AxisOperation axisOperation = (AxisOperation) i.next(); String operation = axisOperation.getName().getLocalPart(); Set<AxisPolicy> policies = pwsd.getPolicies(operation); if (policies == null || policies.size() == 0) { continue; } AxisDescription axisDescription = axisOperation; for (AxisPolicy axisPolicy : policies) { String message = axisPolicy.getMessage(); String module = axisPolicy.getModule(); Element opaquePolicy = axisPolicy.getOpaquePolicy(); AxisModule axisModule = f3Configurator.getModule(module); axisOperation.addModule(axisModule.getName()); axisOperation.engageModule(axisModule); if (message != null) { axisDescription = axisOperation.getMessage(message); } policyApplier.applyPolicy(axisDescription, opaquePolicy); } } }
private void applyPolicies(ServiceClient sender, String operation) throws AxisFault { if (policies == null) { return; } AxisService axisService = sender.getAxisService(); AxisOperation axisOperation = axisService.getOperationBySOAPAction("urn:" + operation); if (axisOperation == null) { axisOperation = axisService.getOperation(ServiceClient.ANON_OUT_IN_OP); } AxisDescription axisDescription = axisOperation; for (AxisPolicy policy : policies) { String moduleName = policy.getModule(); String message = policy.getMessage(); AxisModule axisModule = f3Configurator.getModule(moduleName); axisOperation.addModule(axisModule.getName()); axisOperation.engageModule(axisModule); if (message != null) { axisDescription = axisOperation.getMessage(message); } policyApplier.applyPolicy(axisDescription, policy.getOpaquePolicy()); } }