String tempParam=null;
String tempHTTPMethodParam=null;
String tempHTTPLocationParam=null;
// dealing with the REST data specified in Service.xml @ service class itself(using annotations)
Parameter parameter = operation.getParameter(Constants.JSR311_ANNOTATIONS);
JAXRSModel methodModel = (parameter != null && (parameter.getValue() instanceof
JAXRSModel)) ? (JAXRSModel) parameter.getValue() : null;
// Setting the Produces value in the operation
if ( (tempParam=Utils.getHTTPOutputSerializationFromservicesXML(operation)) != null) { // first we get produce from services xml if available
axisBindingOperation.setProperty(
WSDL2Constants.ATTR_WHTTP_OUTPUT_SERIALIZATION,
tempParam);
} else if (methodModel != null && methodModel.getProduces() !=
null) { // then get it from the JAX-RS if available
axisBindingOperation.setProperty(
WSDL2Constants.ATTR_WHTTP_OUTPUT_SERIALIZATION,
methodModel.getProduces());
}
//Setting the Consumes value in the operation
if ((tempParam=Utils.getHTTPInputSerializationFromServicesXML(operation)) != null) { // first we get Consumes from services xml if available
axisBindingOperation.setProperty(
WSDL2Constants.ATTR_WHTTP_INPUT_SERIALIZATION,
tempParam);
} else if (methodModel != null && methodModel.getConsumes() !=
null) { // then get it from the JAX-RS if available
axisBindingOperation.setProperty(
WSDL2Constants.ATTR_WHTTP_INPUT_SERIALIZATION,
methodModel.getConsumes());
}
//Setting the HttpMethod in the operation
if ((tempHTTPMethodParam=Utils.getHTTPMethodFromServicesXML(operation))!=null) { // first we get Consumes from services xml if available
axisBindingOperation.setProperty(
WSDL2Constants.ATTR_WHTTP_METHOD,
tempHTTPMethodParam);
} else if (methodModel != null && (tempHTTPMethodParam=methodModel.getHTTPMethod()) !=
null) { // then get it from the JAX-RS if available
if (tempHTTPMethodParam.equals(Constants.Configuration.HTTP_METHOD_HEAD)) {
log.warn("[JAXRS] http method HEAD is not supported by AXIS2 " +
operation.getName());
tempHTTPMethodParam=null; // resetting the HTTP Method if it is head
} else {
axisBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_METHOD,
tempHTTPMethodParam);
}
}
//setting the Http Location in the operation
if((tempHTTPLocationParam=Utils.getHTTPLoacationFromServicesXML(operation) )==null){
tempHTTPLocationParam=(methodModel!=null)?methodModel.getPath():null;
}
if (tempHTTPLocationParam!=null && tempHTTPMethodParam != null ){
axisBindingOperation