public WebQuery(AxisService axisService){ Object value = axisService.getParameterValue(DBConstants.WebDatasource.WEB_CONFIG); if( value != null){ this.webConfig = (String)value; } }
public CSVQuery(AxisService axisService){ Object value = axisService.getParameterValue(CSV.COLUMN_SEPERATOR); if( value != null){ this.columnSeperator = (String)value; }else{ this.columnSeperator = ","; //default value } }
private AxisOperation processOperationValidation(AxisService svc) { Object operationObj = svc .getParameterValue("_default_mediate_operation_"); if (operationObj != null) { return (AxisOperation) operationObj; } return null; }
/** * Checks whether a wsdl is provided for a proxy service. * * @param service AxisService * @return whether the wsdl is provided or not */ protected boolean isWSDLProvidedForProxyService(AxisService service) { boolean isWSDLProvided = false; if (service.getParameterValue(WSDLConstants.WSDL_4_J_DEFINITION) != null || service.getParameterValue(WSDLConstants.WSDL_20_DESCRIPTION) != null) { isWSDLProvided = true; } return isWSDLProvided; }
/** * Checks whether a wsdl is provided for a proxy service. * * @param service AxisService * @return whether the wsdl is provided or not */ protected boolean isWSDLProvidedForProxyService(AxisService service) { boolean isWSDLProvided = false; if (service.getParameterValue(WSDLConstants.WSDL_4_J_DEFINITION) != null || service.getParameterValue(WSDLConstants.WSDL_20_DESCRIPTION) != null) { isWSDLProvided = true; } return isWSDLProvided; }
/** * Get the default mediation operation from axis service. * * @param svc axis service which should check for axis operation * @return axis operation if service contains default mediate operation otherwise null */ private static AxisOperation processOperationValidation(AxisService svc) { Object operationObj = svc.getParameterValue(NhttpConstants.DEFAULT_MEDIATE_OPERATION); if (operationObj != null) { return (AxisOperation) operationObj; } return null; } }
private boolean isEnabled(MessageContext mc, String operation) { if (mc.getAxisService() != null) { String operationValue = (String) mc.getAxisService().getParameterValue(operation); return operationValue == null || !operationValue.toLowerCase().equals( Boolean.toString(false)); } return true; }
private boolean isEnabled(MessageContext mc, String operation) { if (mc.getAxisService() != null) { String operationValue = (String) mc.getAxisService().getParameterValue(operation); return operationValue == null || !operationValue.toLowerCase().equals( Boolean.toString(false)); } return true; }
private boolean isEnabled(MessageContext mc, String operation) { if (mc.getAxisService() != null) { String operationValue = (String) mc.getAxisService().getParameterValue(operation); return operationValue == null || !operationValue.toLowerCase().equals( Boolean.toString(false)); } return true; }
private boolean isEnabled(MessageContext mc, String operation) { if (mc.getAxisService() != null) { String operationValue = (String) mc.getAxisService().getParameterValue(operation); return operationValue == null || !operationValue.toLowerCase().equals( Boolean.toString(false)); } return true; }
/** * Answer if there are any AxisServices in the specified ServiceGroup that have an externalized * name that matches the service group name. * * @param checkServiceGroup The AxisServiceGroup containing the AxisServies to check * @param serviceGrpName The name to check as the externalized name of the AxisService * @return true if the group contains an AxisService with that name; false otherwise. */ private static boolean containsExternalizedAxisServiceName( AxisServiceGroup checkServiceGroup, String serviceGrpName) { boolean containsAxisService = false; if (serviceGrpName != null && checkServiceGroup != null) { // Get a list of AxisServices on the group // Iterate over them to see if any have the Externalized Name Parameter // If so and it mathces, then this service group name then use this service group Iterator axisServicesInGroup = checkServiceGroup.getServices(); while (axisServicesInGroup.hasNext()) { AxisService checkService = (AxisService) axisServicesInGroup.next(); String externalizedServiceName = (String) checkService.getParameterValue(EXTERNALIZED_AXIS_SERVICE_NAME); if (externalizedServiceName != null && externalizedServiceName.equals(serviceGrpName)) { containsAxisService = true; break; } } } return containsAxisService; }
/** * Answer if there are any AxisServices in the specified ServiceGroup that have an externalized * name that matches the service group name. * * @param checkServiceGroup The AxisServiceGroup containing the AxisServies to check * @param serviceGrpName The name to check as the externalized name of the AxisService * @return true if the group contains an AxisService with that name; false otherwise. */ private static boolean containsExternalizedAxisServiceName( AxisServiceGroup checkServiceGroup, String serviceGrpName) { boolean containsAxisService = false; if (serviceGrpName != null && checkServiceGroup != null) { // Get a list of AxisServices on the group // Iterate over them to see if any have the Externalized Name Parameter // If so and it mathces, then this service group name then use this service group Iterator axisServicesInGroup = checkServiceGroup.getServices(); while (axisServicesInGroup.hasNext()) { AxisService checkService = (AxisService) axisServicesInGroup.next(); String externalizedServiceName = (String) checkService.getParameterValue(EXTERNALIZED_AXIS_SERVICE_NAME); if (externalizedServiceName != null && externalizedServiceName.equals(serviceGrpName)) { containsAxisService = true; break; } } } return containsAxisService; }
public static Map<String,String> getNS2JNSMap(AxisService service) { Map<String,String> ns2jnsMap = new HashMap<String,String>(); Object value = service.getParameterValue("xmlToJsonNamespaceMap"); if (value != null) { if (value instanceof OMElement && ((OMElement)value).getLocalName().equals("mappings")) { for (Iterator<OMElement> it = ((OMElement)value).getChildrenWithName(new QName("mapping")); it.hasNext(); ) { OMElement mapping = it.next(); ns2jnsMap.put(mapping.getAttributeValue(new QName("xmlNamespace")), mapping.getAttributeValue(new QName("jsonNamespace"))); } } else { throw new IllegalArgumentException("Expected <mappings> element"); } } else { // If no namespace map is defined, use a default map compatible with earlier Axis2 versions ns2jnsMap.put("", ""); } return ns2jnsMap; } }
public static Map<String,String> getNS2JNSMap(AxisService service) { Map<String,String> ns2jnsMap = new HashMap<String,String>(); Object value = service.getParameterValue("xmlToJsonNamespaceMap"); if (value != null) { if (value instanceof OMElement && ((OMElement)value).getLocalName().equals("mappings")) { for (Iterator it = ((OMElement)value).getChildrenWithName(new QName("mapping")); it.hasNext(); ) { OMElement mapping = (OMElement)it.next(); ns2jnsMap.put(mapping.getAttributeValue(new QName("xmlNamespace")), mapping.getAttributeValue(new QName("jsonNamespace"))); } } else { throw new IllegalArgumentException("Expected <mappings> element"); } } else { // If no namespace map is defined, use a default map compatible with earlier Axis2 versions ns2jnsMap.put("", ""); } return ns2jnsMap; } }
public void engageNotify(AxisDescription axisDescription) throws AxisFault { if (axisDescription instanceof AxisService) { try { AxisService axisService = (AxisService) axisDescription; String implClassName = (String) axisService .getParameterValue(WSTransferModule.ATTR_SERVICE_CLASS); if (implClassName == null || (implClassName = implClassName.trim()).length() == 0) { if (LOG.isDebugEnabled()) { LOG .debug("WSTransferModule is not to engaged to service " + axisService.getName() + " because it doesn't contain an implementation class."); } return; } ClassLoader classLoader = axisService.getClassLoader(); Class implClass = classLoader.loadClass(implClassName); processAxisService(axisService, implClass); } catch (Exception ex) { throw AxisFault.makeFault(ex); } } }
private Boolean getDisableAck(MessageContext msgContext) throws AxisFault { // We should send an early ack to the transport whever possible, but some modules need // to use the backchannel, so we need to check if they have disabled this code. Boolean disableAck = (Boolean) msgContext.getProperty(Constants.Configuration.DISABLE_RESPONSE_ACK); if(disableAck == null) { disableAck = (Boolean) (msgContext.getAxisService() != null ? msgContext.getAxisService().getParameterValue(Constants.Configuration.DISABLE_RESPONSE_ACK) : null); } return disableAck; }
private Boolean getDisableAck(MessageContext msgContext) throws AxisFault { // We should send an early ack to the transport whever possible, but some modules need // to use the backchannel, so we need to check if they have disabled this code. Boolean disableAck = (Boolean) msgContext.getProperty(Constants.Configuration.DISABLE_RESPONSE_ACK); if(disableAck == null) { disableAck = (Boolean) (msgContext.getAxisService() != null ? msgContext.getAxisService().getParameterValue(Constants.Configuration.DISABLE_RESPONSE_ACK) : null); } return disableAck; }
private static Boolean getDisableAck(MessageContext msgContext) throws AxisFault { // We should send an early ack to the transport whenever possible, but // some modules need // to use the back channel, so we need to check if they have disabled // this code. Boolean disableAck = (Boolean) msgContext .getProperty(Constants.Configuration.DISABLE_RESPONSE_ACK); if (disableAck == null) { disableAck = (Boolean) (msgContext.getAxisService() != null ? msgContext .getAxisService().getParameterValue( Constants.Configuration.DISABLE_RESPONSE_ACK) : null); } return disableAck; }
String portTypeName = (String) axisService.getParameterValue(WSDL2Constants.INTERFACE_LOCAL_NAME); portTypeName = resolveNameCollision(portTypeName, packageName, TYPE_SUFFIX); this.axisService.addParameter(JAXWS_PORT_TYPE_NAME, portTypeName);
public void serviceUpdate(AxisEvent axisEvent, AxisService axisService) { if(SystemFilter.isFilteredOutService(axisService.getAxisServiceGroup()) || axisService.isClientSide()) { return; } if (axisEvent.getEventType() == AxisEvent.SERVICE_DEPLOY) { for (Iterator iter = axisService.getOperations(); iter.hasNext();) { AxisOperation op = (AxisOperation) iter.next(); setCountersAndProcessors(op) ; } // set counters for default operation in case of JAX-WS backends // see // see ESBJAVA-2327 if (JavaUtils.isTrueExplicitly(axisService.getParameterValue("disableOperationValidation"))){ AxisOperation defaultOp = (AxisOperation) axisService.getParameterValue("_default_mediate_operation_"); if(defaultOp != null ){ setCountersAndProcessors(defaultOp); } } // Service response time processor Parameter responseTimeProcessor = new Parameter(); responseTimeProcessor.setName(StatisticsConstants.SERVICE_RESPONSE_TIME_PROCESSOR); responseTimeProcessor.setValue(new ResponseTimeProcessor()); try { axisService.addParameter(responseTimeProcessor); } catch (AxisFault axisFault) { // will not occur } } }