You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@axis.apache.org by ve...@apache.org on 2012/01/06 11:42:53 UTC
svn commit: r1228069 - in
/axis/axis1/java/trunk/axis/src/main/java/org/apache/axis:
deployment/wsdd/WSDDOperation.java description/OperationDesc.java
Author: veithen
Date: Fri Jan 6 10:42:53 2012
New Revision: 1228069
URL: http://svn.apache.org/viewvc?rev=1228069&view=rev
Log:
AXIS-2538: Properly serialize the mep attribute in server-config.wsdd.
Modified:
axis/axis1/java/trunk/axis/src/main/java/org/apache/axis/deployment/wsdd/WSDDOperation.java
axis/axis1/java/trunk/axis/src/main/java/org/apache/axis/description/OperationDesc.java
Modified: axis/axis1/java/trunk/axis/src/main/java/org/apache/axis/deployment/wsdd/WSDDOperation.java
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/axis/src/main/java/org/apache/axis/deployment/wsdd/WSDDOperation.java?rev=1228069&r1=1228068&r2=1228069&view=diff
==============================================================================
--- axis/axis1/java/trunk/axis/src/main/java/org/apache/axis/deployment/wsdd/WSDDOperation.java (original)
+++ axis/axis1/java/trunk/axis/src/main/java/org/apache/axis/deployment/wsdd/WSDDOperation.java Fri Jan 6 10:42:53 2012
@@ -171,6 +171,10 @@ public class WSDDOperation extends WSDDE
attrs.addAttribute("", ATTR_SOAPACTION, ATTR_SOAPACTION, "CDATA", desc.getSoapAction());
}
+ if (desc.getMep() != null) {
+ attrs.addAttribute("", ATTR_MEP, ATTR_MEP, "CDATA", desc.getMepString());
+ }
+
context.startElement(getElementName(), attrs);
if (desc.getDocumentation() != null) {
Modified: axis/axis1/java/trunk/axis/src/main/java/org/apache/axis/description/OperationDesc.java
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/axis/src/main/java/org/apache/axis/description/OperationDesc.java?rev=1228069&r1=1228068&r2=1228069&view=diff
==============================================================================
--- axis/axis1/java/trunk/axis/src/main/java/org/apache/axis/description/OperationDesc.java (original)
+++ axis/axis1/java/trunk/axis/src/main/java/org/apache/axis/description/OperationDesc.java Fri Jan 6 10:42:53 2012
@@ -53,13 +53,19 @@ public class OperationDesc implements Se
public static final int MSG_METHOD_NONCONFORMING = -4;
- public static Map mepStrings = new HashMap();
+ private static final Map mepStringToOperationType = new HashMap();
+ private static final Map operationTypeToMepString = new HashMap();
static {
- mepStrings.put("request-response", OperationType.REQUEST_RESPONSE);
- mepStrings.put("oneway", OperationType.ONE_WAY);
- mepStrings.put("solicit-response", OperationType.SOLICIT_RESPONSE);
- mepStrings.put("notification", OperationType.NOTIFICATION);
+ addMep("request-response", OperationType.REQUEST_RESPONSE);
+ addMep("oneway", OperationType.ONE_WAY);
+ addMep("solicit-response", OperationType.SOLICIT_RESPONSE);
+ addMep("notification", OperationType.NOTIFICATION);
+ }
+
+ private static void addMep(String mepString, OperationType operationType) {
+ mepStringToOperationType.put(mepString, operationType);
+ operationTypeToMepString.put(operationType, mepString);
}
protected static Log log =
@@ -585,11 +591,20 @@ public class OperationDesc implements Se
}
/**
+ * Get the MEP as a string.
+ *
+ * @return the string representation of the MEP
+ */
+ public String getMepString() {
+ return (String)operationTypeToMepString.get(mep);
+ }
+
+ /**
* Set the MEP using a string like "request-response"
* @param mepString
*/
public void setMep(String mepString) {
- OperationType newMep = (OperationType)mepStrings.get(mepString);
+ OperationType newMep = (OperationType)mepStringToOperationType.get(mepString);
if (newMep != null) {
mep = newMep;
}