Author: dkulp
Date: Mon Jun 2 10:31:40 2008
New Revision: 662492
URL: http://svn.apache.org/viewvc?rev=662492&view=rev
Log:
[CXF-1625] Allow decoupled responses from servlet transport by promoting the
getConduitInitiator method to the super class.
Added:
cxf/trunk/distribution/src/main/release/samples/ws_addressing/wsdl/cxf-servlet.xml
(with props)
Modified:
cxf/trunk/distribution/src/main/release/samples/ws_addressing/build.xml
cxf/trunk/distribution/src/main/release/samples/ws_addressing/src/demo/ws_addressing/client/Client.java
cxf/trunk/distribution/src/main/release/samples/ws_addressing/src/demo/ws_addressing/server/GreeterImpl.java
cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java
cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletTransportFactory.java
Modified:
cxf/trunk/distribution/src/main/release/samples/ws_addressing/build.xml
URL:
http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_addressing/build.xml?rev=662492&r1=662491&r2=662492&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/ws_addressing/build.xml
(original)
+++ cxf/trunk/distribution/src/main/release/samples/ws_addressing/build.xml Mon
Jun 2 10:31:40 2008
@@ -39,4 +39,20 @@
<echo level="info" message="Generating code using wsdl2java..."/>
<wsdl2java file="hello_world_addr.wsdl"/>
</target>
+
+
+ <property name="cxf.war.file.name" value="helloworld_wsaddr"/>
+ <target name="war" depends="build">
+ <cxfwar wsdl="hello_world_addr.wsdl"
filename="${cxf.war.file.name}.war"/>
+ </target>
+
+ <target name="client-servlet" description="run demo client hitting
servlet" depends="build">
+ <property name="param" value=""/>
+ <cxfrun classname="demo.ws_addressing.client.Client"
+ jvmarg1="-Dcxf.config.file=client.xml"
+ param1="${base.url}/helloworld_wsaddr/services/hello_world?wsdl"
+ param2="${op}" param3="${param}"/>
+ </target>
+
+
</project>
Modified:
cxf/trunk/distribution/src/main/release/samples/ws_addressing/src/demo/ws_addressing/client/Client.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_addressing/src/demo/ws_addressing/client/Client.java?rev=662492&r1=662491&r2=662492&view=diff
==============================================================================
---
cxf/trunk/distribution/src/main/release/samples/ws_addressing/src/demo/ws_addressing/client/Client.java
(original)
+++
cxf/trunk/distribution/src/main/release/samples/ws_addressing/src/demo/ws_addressing/client/Client.java
Mon Jun 2 10:31:40 2008
@@ -21,6 +21,7 @@
import java.io.File;
import java.lang.reflect.UndeclaredThrowableException;
+import java.net.URL;
import java.util.Map;
import javax.xml.namespace.QName;
import javax.xml.ws.BindingProvider;
@@ -55,9 +56,16 @@
System.exit(1);
}
- try {
- File wsdl = new File(args[0]);
- SOAPService service = new SOAPService(wsdl.toURL(), SERVICE_NAME);
+ try {
+ URL wsdlURL;
+ File wsdlFile = new File(args[0]);
+ if (wsdlFile.exists()) {
+ wsdlURL = wsdlFile.toURL();
+ } else {
+ wsdlURL = new URL(args[0]);
+ }
+
+ SOAPService service = new SOAPService(wsdlURL, SERVICE_NAME);
Greeter port = service.getSoapPort();
implicitPropagation(port);
Modified:
cxf/trunk/distribution/src/main/release/samples/ws_addressing/src/demo/ws_addressing/server/GreeterImpl.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_addressing/src/demo/ws_addressing/server/GreeterImpl.java?rev=662492&r1=662491&r2=662492&view=diff
==============================================================================
---
cxf/trunk/distribution/src/main/release/samples/ws_addressing/src/demo/ws_addressing/server/GreeterImpl.java
(original)
+++
cxf/trunk/distribution/src/main/release/samples/ws_addressing/src/demo/ws_addressing/server/GreeterImpl.java
Mon Jun 2 10:31:40 2008
@@ -27,7 +27,8 @@
import org.apache.hello_world_soap_http.PingMeFault;
import org.apache.hello_world_soap_http.types.FaultDetail;
[EMAIL PROTECTED](name = "Greeter",
[EMAIL PROTECTED](name = "SoapPort",
+ portName = "SoapPort",
serviceName = "SOAPService",
targetNamespace = "http://apache.org/hello_world_soap_http",
wsdlLocation = "file:./wsdl/hello_world_addr.wsdl")
Added:
cxf/trunk/distribution/src/main/release/samples/ws_addressing/wsdl/cxf-servlet.xml
URL:
http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/ws_addressing/wsdl/cxf-servlet.xml?rev=662492&view=auto
==============================================================================
---
cxf/trunk/distribution/src/main/release/samples/ws_addressing/wsdl/cxf-servlet.xml
(added)
+++
cxf/trunk/distribution/src/main/release/samples/ws_addressing/wsdl/cxf-servlet.xml
Mon Jun 2 10:31:40 2008
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:jaxws="http://cxf.apache.org/jaxws"
+ xmlns:soap="http://cxf.apache.org/bindings/soap"
+ xmlns:wsa="http://cxf.apache.org/ws/addressing"
+ xsi:schemaLocation="
+http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+http://cxf.apache.org/bindings/soap
http://cxf.apache.org/schemas/configuration/soap.xsd
+http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
+
+ <jaxws:endpoint
+ id="hello_world"
+ implementor="demo.ws_addressing.server.GreeterImpl"
+ wsdlLocation="WEB-INF/wsdl/hello_world_addr.wsdl"
+ address="/hello_world">
+ <jaxws:features>
+ <bean class="org.apache.cxf.feature.LoggingFeature"/>
+ <wsa:addressing/>
+ </jaxws:features>
+ </jaxws:endpoint>
+</beans>
Propchange:
cxf/trunk/distribution/src/main/release/samples/ws_addressing/wsdl/cxf-servlet.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
cxf/trunk/distribution/src/main/release/samples/ws_addressing/wsdl/cxf-servlet.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange:
cxf/trunk/distribution/src/main/release/samples/ws_addressing/wsdl/cxf-servlet.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified:
cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java?rev=662492&r1=662491&r2=662492&view=diff
==============================================================================
---
cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java
(original)
+++
cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestination.java
Mon Jun 2 10:31:40 2008
@@ -37,7 +37,6 @@
import org.apache.cxf.message.ExchangeImpl;
import org.apache.cxf.message.MessageImpl;
import org.apache.cxf.service.model.EndpointInfo;
-import org.apache.cxf.transport.ConduitInitiator;
import org.apache.cxf.transport.http.AbstractHTTPDestination;
import org.apache.cxf.transport.http.HTTPSession;
import org.apache.cxf.transports.http.QueryHandler;
@@ -160,12 +159,6 @@
}
- /**
- * @return the associated conduit initiator
- */
- protected ConduitInitiator getConduitInitiator() {
- return conduitInitiator;
- }
protected String getBasePathForFullAddress(String addr) {
try {
Modified:
cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java?rev=662492&r1=662491&r2=662492&view=diff
==============================================================================
---
cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
(original)
+++
cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
Mon Jun 2 10:31:40 2008
@@ -172,6 +172,13 @@
Exchange ex = message.getExchange();
return ex == null ? false : ex.isOneWay();
}
+
+ /**
+ * @return the associated conduit initiator
+ */
+ protected ConduitInitiator getConduitInitiator() {
+ return conduitInitiator;
+ }
/**
* Copy the request headers into the message.
Modified:
cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletTransportFactory.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletTransportFactory.java?rev=662492&r1=662491&r2=662492&view=diff
==============================================================================
---
cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletTransportFactory.java
(original)
+++
cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletTransportFactory.java
Mon Jun 2 10:31:40 2008
@@ -92,7 +92,7 @@
ServletDestination d =
getDestinationForPath(endpointInfo.getAddress());
if (d == null) {
String path = getTrimmedPath(endpointInfo.getAddress());
- d = new ServletDestination(getBus(), null, endpointInfo, this,
path);
+ d = new ServletDestination(getBus(), this, endpointInfo, this,
path);
destinations.put(path, d);
}
return d;