You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by de...@apache.org on 2007/11/28 09:05:46 UTC
svn commit: r598898 -
/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java
Author: deepal
Date: Wed Nov 28 00:05:45 2007
New Revision: 598898
URL: http://svn.apache.org/viewvc?rev=598898&view=rev
Log:
annotation and wsdl issue
Modified:
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java?rev=598898&r1=598897&r2=598898&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java Wed Nov 28 00:05:45 2007
@@ -364,11 +364,11 @@
for (int i = 0; i < method.length; i++) {
JMethod jmethod = method[i];
- String opName = jmethod.getSimpleName();
+ String opName = getSimpleName(jmethod);
AxisOperation operation = axisService.getOperation(new QName(opName));
// if the operation there in services.xml then try to set it schema element name
if (operation == null) {
- operation = axisService.getOperation(new QName(jmethod.getSimpleName()));
+ operation = axisService.getOperation(new QName(getSimpleName(jmethod)));
}
MessageReceiver mr = axisService.getMessageReceiver(
operation.getMessageExchangePattern());
@@ -401,7 +401,7 @@
operation = AxisOperationFactory.getAxisOperation(
WSDLConstants.MEP_CONSTANT_IN_OUT);
}
- String opName = jmethod.getSimpleName();
+ String opName = getSimpleName(jmethod);
operation.setName(new QName(opName));
JAnnotation methodAnnon = jmethod.getAnnotation(AnnotationConstants.WEB_METHOD);
if (methodAnnon != null) {
@@ -412,6 +412,17 @@
}
return operation;
}
+
+ public static String getSimpleName(JMethod method) {
+ JAnnotation methodAnnon = method.getAnnotation(AnnotationConstants.WEB_METHOD);
+ if (methodAnnon != null) {
+ if (methodAnnon.getValue(AnnotationConstants.OPERATION_NAME) !=null) {
+ return methodAnnon.getValue(AnnotationConstants.OPERATION_NAME).asString();
+ }
+ }
+ return method.getSimpleName();
+ }
+
public static OMElement getParameter(String name, String value, boolean locked) {
OMFactory fac = OMAbstractFactory.getOMFactory();
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org