Author: dkulp
Date: Fri Feb 8 11:07:49 2008
New Revision: 619978
URL: http://svn.apache.org/viewvc?rev=619978&view=rev
Log:
Merged revisions 619152 via svnmerge from
https://svn.apache.org/repos/asf/incubator/cxf/trunk
........
r619152 | dkulp | 2008-02-06 16:00:08 -0500 (Wed, 06 Feb 2008) | 4 lines
[CXF-1419, CXF-1418] Patch from Balaji applied (with fixes to pass tests)
Added flags to AbstractPhaseInterceptor to create unique id
Delay creation of databinding till needed so we don't create one if it's just
going to be discard. (example: databinding configured in spring)
........
Modified:
incubator/cxf/branches/2.0.x-fixes/ (props changed)
incubator/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/phase/AbstractPhaseInterceptor.java
incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
incubator/cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/rest/RestClientServerBookTest.java
incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/rest/resources/expected_get_book123_xmlwrapped.txt
incubator/cxf/branches/2.0.x-fixes/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSIBPValidator.java
Propchange: incubator/cxf/branches/2.0.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified:
incubator/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/phase/AbstractPhaseInterceptor.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/phase/AbstractPhaseInterceptor.java?rev=619978&r1=619977&r2=619978&view=diff
==============================================================================
---
incubator/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/phase/AbstractPhaseInterceptor.java
(original)
+++
incubator/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/phase/AbstractPhaseInterceptor.java
Fri Feb 8 11:07:49 2008
@@ -34,14 +34,25 @@
private final Set<String> after = new SortedArraySet<String>();
public AbstractPhaseInterceptor(String phase) {
- this(null, phase);
+ this(null, phase, false);
}
public AbstractPhaseInterceptor(String i, String p) {
- super();
- id = i == null ? getClass().getName() : i;
+ this(i, p, false);
+ }
+ public AbstractPhaseInterceptor(String phase, boolean uniqueId) {
+ this(null, phase, uniqueId);
+ }
+ public AbstractPhaseInterceptor(String i, String p, boolean uniqueId) {
+ if (i == null) {
+ i = getClass().getName();
+ }
+ if (uniqueId) {
+ i += System.identityHashCode(this);
+ }
+ id = i;
phase = p;
}
-
+
public void setBefore(Collection<String> i) {
before.clear();
before.addAll(i);
Modified:
incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java?rev=619978&r1=619977&r2=619978&view=diff
==============================================================================
---
incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
(original)
+++
incubator/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
Fri Feb 8 11:07:49 2008
@@ -153,6 +153,12 @@
return new JAXBDataBinding(getQualifyWrapperSchema());
}
+
+
+ protected DataBinding createDefaultDataBinding() {
+ return new JAXBDataBinding(getQualifyWrapperSchema());
+ }
+
@Override
public Service create() {
initializeServiceConfigurations();
Modified:
incubator/cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java?rev=619978&r1=619977&r2=619978&view=diff
==============================================================================
---
incubator/cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
(original)
+++
incubator/cxf/branches/2.0.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
Fri Feb 8 11:07:49 2008
@@ -374,6 +374,12 @@
// setup the message to be send back
message.put(JMSConstants.JMS_REQUEST_MESSAGE,
inMessage.get(JMSConstants.JMS_REQUEST_MESSAGE));
+
+ if (!message.containsKey(JMSConstants.JMS_SERVER_RESPONSE_HEADERS)
+ &&
inMessage.containsKey(JMSConstants.JMS_SERVER_RESPONSE_HEADERS)) {
+ message.put(JMSConstants.JMS_SERVER_RESPONSE_HEADERS,
+
inMessage.get(JMSConstants.JMS_SERVER_RESPONSE_HEADERS));
+ }
message.setContent(OutputStream.class,
new JMSOutputStream(inMessage, message));
}
@@ -402,7 +408,7 @@
private void commitOutputMessage() throws IOException {
JMSMessageHeadersType headers =
- (JMSMessageHeadersType)
inMessage.get(JMSConstants.JMS_SERVER_RESPONSE_HEADERS);
+ (JMSMessageHeadersType)
outMessage.get(JMSConstants.JMS_SERVER_RESPONSE_HEADERS);
javax.jms.Message request =
(javax.jms.Message)
inMessage.get(JMSConstants.JMS_REQUEST_MESSAGE);
@@ -444,7 +450,6 @@
msgType);
setReplyCorrelationID(request, reply);
-
base.setMessageProperties(headers, reply);
Map<String, List<String>> protHeaders =
CastUtils.cast((Map<?,
?>)outMessage.get(Message.PROTOCOL_HEADERS));
Modified:
incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/rest/RestClientServerBookTest.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/rest/RestClientServerBookTest.java?rev=619978&r1=619977&r2=619978&view=diff
==============================================================================
---
incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/rest/RestClientServerBookTest.java
(original)
+++
incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/rest/RestClientServerBookTest.java
Fri Feb 8 11:07:49 2008
@@ -116,7 +116,6 @@
String expectedString = getStringFromInputStream(expected).trim();
String newString = getStringFromInputStream(in).trim();
- //System.out.println("---" + getStringFromInputStream(in));
assertEquals(expectedString, expectedString, newString);
}
Modified:
incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/rest/resources/expected_get_book123_xmlwrapped.txt
URL:
http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/rest/resources/expected_get_book123_xmlwrapped.txt?rev=619978&r1=619977&r2=619978&view=diff
==============================================================================
---
incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/rest/resources/expected_get_book123_xmlwrapped.txt
(original)
+++
incubator/cxf/branches/2.0.x-fixes/systests/src/test/java/org/apache/cxf/systest/rest/resources/expected_get_book123_xmlwrapped.txt
Fri Feb 8 11:07:49 2008
@@ -1 +1,2 @@
<ns1:getBookResponse xmlns:ns1="http://book.customer.cxf.apache.org/"><Book
xmlns:ns2="http://book.acme.com"><ns2:id>123</ns2:id><ns2:name>CXF in
Action</ns2:name></Book></ns1:getBookResponse>
+
Modified:
incubator/cxf/branches/2.0.x-fixes/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSIBPValidator.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSIBPValidator.java?rev=619978&r1=619977&r2=619978&view=diff
==============================================================================
---
incubator/cxf/branches/2.0.x-fixes/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSIBPValidator.java
(original)
+++
incubator/cxf/branches/2.0.x-fixes/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSIBPValidator.java
Fri Feb 8 11:07:49 2008
@@ -246,6 +246,13 @@
continue;
}
BindingOperation bop = wsdlHelper.getBindingOperation(def,
operation.getName());
+ if (bop == null) {
+ addErrorMessage(getErrorPrefix("WSI-BP-1.0 R2718")
+ + "A wsdl:binding in a DESCRIPTION MUST
have the same set of "
+ + "wsdl:operations as the wsdl:portType to
which it refers. "
+ + operation.getName() + " not found in
wsdl:binding.");
+ return false;
+ }
Binding binding = wsdlHelper.getBinding(bop, def);
String bindingStyle = binding != null ?
SOAPBindingUtil.getBindingStyle(binding) : "";
String style =
StringUtils.isEmpty(SOAPBindingUtil.getSOAPOperationStyle(bop))
@@ -258,7 +265,6 @@
return false;
}
} else {
- System.out.println("Style: " + style);
if (!checkR2717AndR2726(bop)) {
return false;
}