You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by ni...@apache.org on 2006/10/04 15:50:56 UTC
svn commit: r452890 - in
/incubator/cxf/trunk/distribution/src/main/release/samples: README.txt
mtom/src/demo/mtom/client/Client.java mtom/src/demo/mtom/server/Server.java
Author: ningjiang
Date: Wed Oct 4 06:50:53 2006
New Revision: 452890
URL: http://svn.apache.org/viewvc?view=rev&rev=452890
Log:
Changed README.txt's install dir CeltiXfire to cxf
Trun on mtom enable option in mtom sample to make it work with new rt (mtom defalt is false)
Modified:
incubator/cxf/trunk/distribution/src/main/release/samples/README.txt
incubator/cxf/trunk/distribution/src/main/release/samples/mtom/src/demo/mtom/client/Client.java
incubator/cxf/trunk/distribution/src/main/release/samples/mtom/src/demo/mtom/server/Server.java
Modified: incubator/cxf/trunk/distribution/src/main/release/samples/README.txt
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/README.txt?view=diff&rev=452890&r1=452889&r2=452890
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/README.txt (original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/README.txt Wed Oct 4 06:50:53 2006
@@ -3,7 +3,7 @@
As described in the installation notes, extract the celtixfire
binary distribution archive into an installation directory
-under the root drive. This creates the sub-directory celtixfire,
+under the root drive. This creates the sub-directory cxf,
which includes all of the product directories.
To build and run the demos, you must install the J2SE Development
@@ -18,7 +18,7 @@
is on the CLASSPATH and to insure that the JDK, ant and
celtixfire bin directories are on the PATH.
-To build and run the demos provided in the celtixfire source distribution
+To build and run the demos provided in the cxf source distribution
using ant you will need to edit the common_build.xml file.
Uncomment the line:
<import file="../../../target/srcbuild_paths.xml" optional="true"/>
@@ -33,7 +33,7 @@
environment variables.
For UNIX:
- CXF_HOME=/<installation_directory>/celtixfire
+ CXF_HOME=/<installation_directory>/cxf
JAVA_HOME=/<jdk_installation_directory>
ANT_HOME=/<ant_installation_directory>/apache-ant-1.6.5
@@ -41,7 +41,7 @@
export CLASSPATH=.:$CXF_HOME/lib/cxf-incubator.jar:./build/classes
For Windows:
- set CXF_HOME=C:\<installation_directory>\celtixfire
+ set CXF_HOME=C:\<installation_directory>\cxf
set JAVA_HOME=C:\<jdk_installation_directory>
set ANT_HOME=C:\<ant_installation_directory>\apache-ant-1.6.5
Modified: incubator/cxf/trunk/distribution/src/main/release/samples/mtom/src/demo/mtom/client/Client.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/mtom/src/demo/mtom/client/Client.java?view=diff&rev=452890&r1=452889&r2=452890
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/mtom/src/demo/mtom/client/Client.java (original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/mtom/src/demo/mtom/client/Client.java Wed Oct 4 06:50:53 2006
@@ -30,8 +30,11 @@
import javax.activation.DataSource;
import javax.imageio.ImageIO;
import javax.mail.util.ByteArrayDataSource;
+import javax.xml.ws.Binding;
+import javax.xml.ws.BindingProvider;
import javax.xml.namespace.QName;
import javax.xml.ws.Holder;
+import javax.xml.ws.soap.SOAPBinding;
import org.apache.cxf.mime.Hello;
import org.apache.cxf.mime.HelloService;
@@ -65,6 +68,8 @@
HelloService ss = new HelloService(wsdlURL, SERVICE_NAME);
Hello port = (Hello) ss.getPort(PORT_NAME, Hello.class);
+ Binding binding = ((BindingProvider)port).getBinding();
+ ((SOAPBinding)binding).setMTOMEnabled(true);
ByteArrayDataSource bads = new ByteArrayDataSource(getResourceStream(wsdlFile),
"Application/octet-stream");
Modified: incubator/cxf/trunk/distribution/src/main/release/samples/mtom/src/demo/mtom/server/Server.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/mtom/src/demo/mtom/server/Server.java?view=diff&rev=452890&r1=452889&r2=452890
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/mtom/src/demo/mtom/server/Server.java (original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/mtom/src/demo/mtom/server/Server.java Wed Oct 4 06:50:53 2006
@@ -19,7 +19,10 @@
package demo.mtom.server;
+import javax.xml.ws.Binding;
+import javax.xml.ws.BindingProvider;
import javax.xml.ws.Endpoint;
+import javax.xml.ws.soap.SOAPBinding;
public class Server {
@@ -27,7 +30,9 @@
System.out.println("Starting Server");
Object implementor = new HelloImpl();
String address = "http://localhost:9000/mime-test";
- Endpoint.publish(address, implementor);
+ Endpoint ep = Endpoint.publish(address, implementor);
+ Binding binding = ep.getBinding();
+ ((SOAPBinding)binding).setMTOMEnabled(true);
}
public static void main(String args[]) throws Exception {