You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2010/06/01 17:55:07 UTC
svn commit: r950130 - in /cxf/branches/2.2.x-fixes: ./
rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/
tools/javato/ws/src/test/resources/org/apache/cxf/tools/java2wsdl/processor/expected/
Author: dkulp
Date: Tue Jun 1 15:55:07 2010
New Revision: 950130
URL: http://svn.apache.org/viewvc?rev=950130&view=rev
Log:
Merged revisions 949219 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r949219 | dkulp | 2010-05-28 12:21:48 -0400 (Fri, 28 May 2010) | 1 line
More updates to make the wsa action and soap:action stuff match
........
Modified:
cxf/branches/2.2.x-fixes/ (props changed)
cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java
cxf/branches/2.2.x-fixes/tools/javato/ws/src/test/resources/org/apache/cxf/tools/java2wsdl/processor/expected/add_numbers_expected.wsdl
Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java?rev=950130&r1=950129&r2=950130&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java (original)
+++ cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java Tue Jun 1 15:55:07 2010
@@ -40,6 +40,7 @@ import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.ParameterStyle;
import javax.jws.soap.SOAPBinding.Style;
import javax.xml.namespace.QName;
+import javax.xml.ws.Action;
import javax.xml.ws.Holder;
import javax.xml.ws.RequestWrapper;
import javax.xml.ws.Response;
@@ -798,11 +799,17 @@ public class JaxWsServiceConfiguration e
public String getAction(OperationInfo op, Method method) {
method = getDeclaredMethod(method);
WebMethod wm = method.getAnnotation(WebMethod.class);
+ String action = "";
if (wm != null) {
- return wm.action();
- } else {
- return "";
+ action = wm.action();
+ }
+ if (StringUtils.isEmpty(action)) {
+ Action act = method.getAnnotation(Action.class);
+ if (act != null) {
+ action = act.input();
+ }
}
+ return action;
}
public Boolean isHolder(Class<?> cls, Type type) {
return Holder.class.equals(cls);
Modified: cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java?rev=950130&r1=950129&r2=950130&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java (original)
+++ cxf/branches/2.2.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java Tue Jun 1 15:55:07 2010
@@ -31,6 +31,7 @@ import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
+import javax.jws.WebMethod;
import javax.wsdl.Operation;
import javax.xml.bind.annotation.XmlNsForm;
import javax.xml.bind.annotation.XmlSchema;
@@ -478,11 +479,22 @@ public class JaxWsServiceFactoryBean ext
if (action == null && addressing == null) {
return;
}
+ WebMethod wm = method.getAnnotation(WebMethod.class);
+ String inputAction = "";
+ if (action != null) {
+ inputAction = action.input();
+ }
+ if (wm != null && StringUtils.isEmpty(inputAction)) {
+ inputAction = wm.action();
+ }
+ if (StringUtils.isEmpty(inputAction)) {
+ inputAction = computeAction(operation, "Request");
+ }
if (action == null && addressing != null) {
operation.getInput().addExtensionAttribute(JAXWSAConstants.WSAM_ACTION_QNAME,
- computeAction(operation, "Request"));
+ inputAction);
operation.getInput().addExtensionAttribute(JAXWSAConstants.WSAW_ACTION_QNAME,
- computeAction(operation, "Request"));
+ inputAction);
operation.getOutput().addExtensionAttribute(JAXWSAConstants.WSAM_ACTION_QNAME,
computeAction(operation, "Response"));
operation.getOutput().addExtensionAttribute(JAXWSAConstants.WSAW_ACTION_QNAME,
@@ -490,13 +502,9 @@ public class JaxWsServiceFactoryBean ext
} else {
MessageInfo input = operation.getInput();
+ input.addExtensionAttribute(JAXWSAConstants.WSAM_ACTION_QNAME, inputAction);
if (!StringUtils.isEmpty(action.input())) {
- input.addExtensionAttribute(JAXWSAConstants.WSAW_ACTION_QNAME, action.input());
- input.addExtensionAttribute(JAXWSAConstants.WSAM_ACTION_QNAME, action.input());
- } else {
- input.addExtensionAttribute(JAXWSAConstants.WSAM_ACTION_QNAME, computeAction(operation,
- "Request"));
-
+ input.addExtensionAttribute(JAXWSAConstants.WSAW_ACTION_QNAME, inputAction);
}
MessageInfo output = operation.getOutput();
@@ -544,7 +552,7 @@ public class JaxWsServiceFactoryBean ext
}
}
- private Object computeAction(OperationInfo op, String postFix) {
+ private String computeAction(OperationInfo op, String postFix) {
StringBuilder s = new StringBuilder(op.getName().getNamespaceURI());
if (s.charAt(s.length() - 1) != '/') {
s.append('/');
Modified: cxf/branches/2.2.x-fixes/tools/javato/ws/src/test/resources/org/apache/cxf/tools/java2wsdl/processor/expected/add_numbers_expected.wsdl
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/tools/javato/ws/src/test/resources/org/apache/cxf/tools/java2wsdl/processor/expected/add_numbers_expected.wsdl?rev=950130&r1=950129&r2=950130&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/tools/javato/ws/src/test/resources/org/apache/cxf/tools/java2wsdl/processor/expected/add_numbers_expected.wsdl (original)
+++ cxf/branches/2.2.x-fixes/tools/javato/ws/src/test/resources/org/apache/cxf/tools/java2wsdl/processor/expected/add_numbers_expected.wsdl Tue Jun 1 15:55:07 2010
@@ -133,7 +133,7 @@
<wsaw:UsingAddressing wsdl:required="false"/>
<wsp:PolicyReference URI="#AddNumbersImplServiceSoapBinding_WSAM_Addressing_Policy"/>
<wsdl:operation name="addNumbers">
- <soap:operation soapAction="" style="document"/>
+ <soap:operation soapAction="http://cxf.apache.org/input" style="document"/>
<wsdl:input name="addNumbers">
<soap:body use="literal"/>
</wsdl:input>
@@ -145,7 +145,7 @@
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="addNumbers4">
- <soap:operation soapAction="" style="document"/>
+ <soap:operation soapAction="http://cxf.apache.org/input4" style="document"/>
<wsdl:input name="addNumbers4">
<soap:body use="literal"/>
</wsdl:input>
@@ -157,7 +157,7 @@
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="addNumbers3">
- <soap:operation soapAction="" style="document"/>
+ <soap:operation soapAction="http://cxf.apache.org/input3" style="document"/>
<wsdl:input name="addNumbers3">
<soap:body use="literal"/>
</wsdl:input>