You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by ay...@apache.org on 2014/12/11 12:03:53 UTC
cxf git commit: [CXF-6147] Part of demo wsdl_first_soap12 doesnt work
Repository: cxf
Updated Branches:
refs/heads/master d7f7c7cf3 -> d222f3e51
[CXF-6147] Part of demo wsdl_first_soap12 doesnt work
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/d222f3e5
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/d222f3e5
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/d222f3e5
Branch: refs/heads/master
Commit: d222f3e51e53e8fe9bd8a55a56fb5cfc0e9404cd
Parents: d7f7c7c
Author: Akitoshi Yoshida <ay...@apache.org>
Authored: Wed Dec 10 18:48:31 2014 +0100
Committer: Akitoshi Yoshida <ay...@apache.org>
Committed: Thu Dec 11 12:02:40 2014 +0100
----------------------------------------------------------------------
.../samples/wsdl_first_soap12/README.txt | 1 -
.../release/samples/wsdl_first_soap12/pom.xml | 26 -----
.../src/main/java/demo/hw/client/Get.java | 117 -------------------
3 files changed, 144 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/d222f3e5/distribution/src/main/release/samples/wsdl_first_soap12/README.txt
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/wsdl_first_soap12/README.txt b/distribution/src/main/release/samples/wsdl_first_soap12/README.txt
index 1cf0726..9143ec7 100644
--- a/distribution/src/main/release/samples/wsdl_first_soap12/README.txt
+++ b/distribution/src/main/release/samples/wsdl_first_soap12/README.txt
@@ -18,7 +18,6 @@ Using either UNIX or Windows:
mvn install (builds the demo)
mvn -Pserver (from one command line window)
mvn -Pclient (from a second command line window)
- mvn -Pclient.get (client uses http GET)
To remove the code generated from the WSDL file and the .class
files, run "mvn clean".
http://git-wip-us.apache.org/repos/asf/cxf/blob/d222f3e5/distribution/src/main/release/samples/wsdl_first_soap12/pom.xml
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/wsdl_first_soap12/pom.xml b/distribution/src/main/release/samples/wsdl_first_soap12/pom.xml
index 9a26564..36eb108 100644
--- a/distribution/src/main/release/samples/wsdl_first_soap12/pom.xml
+++ b/distribution/src/main/release/samples/wsdl_first_soap12/pom.xml
@@ -109,32 +109,6 @@
</plugins>
</build>
</profile>
- <profile>
- <id>client.get</id>
- <build>
- <defaultGoal>test</defaultGoal>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <executions>
- <execution>
- <phase>test</phase>
- <goals>
- <goal>java</goal>
- </goals>
- <configuration>
- <mainClass>demo.hw.client.Get</mainClass>
- <arguments>
- <argument>${basedir}/wsdl/hello_world_soap12.wsdl</argument>
- </arguments>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
</profiles>
<dependencies>
<dependency>
http://git-wip-us.apache.org/repos/asf/cxf/blob/d222f3e5/distribution/src/main/release/samples/wsdl_first_soap12/src/main/java/demo/hw/client/Get.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/wsdl_first_soap12/src/main/java/demo/hw/client/Get.java b/distribution/src/main/release/samples/wsdl_first_soap12/src/main/java/demo/hw/client/Get.java
deleted file mode 100644
index 85b83d0..0000000
--- a/distribution/src/main/release/samples/wsdl_first_soap12/src/main/java/demo/hw/client/Get.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/**
- * 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.
- */
-
-package demo.hw.client;
-
-import java.io.ByteArrayOutputStream;
-import java.io.InputStream;
-import java.net.HttpURLConnection;
-import java.net.URL;
-import java.util.Properties;
-
-import javax.xml.transform.OutputKeys;
-import javax.xml.transform.Source;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.stream.StreamResult;
-import javax.xml.transform.stream.StreamSource;
-
-public final class Get {
-
- private Get() {
- }
-
- public static void main(String args[]) throws Exception {
- // Sent HTTP GET request to invoke sayHi
- String target = "http://localhost:9000/SoapContext/SoapPort/sayHi";
- URL url = new URL(target);
- HttpURLConnection httpConnection = (HttpURLConnection) url.openConnection();
- httpConnection.connect();
- System.out.println("Invoking server through HTTP GET to invoke sayHi");
-
- InputStream in = httpConnection.getInputStream();
- StreamSource source = new StreamSource(in);
- printSource(source);
-
- // Sent HTTP GET request to invoke greetMe FAULT
- target = "http://localhost:9000/SoapContext/SoapPort/greetMe/me/CXF";
- url = new URL(target);
- httpConnection = (HttpURLConnection) url.openConnection();
- httpConnection.connect();
- System.out.println("Invoking server through HTTP GET to invoke greetMe");
-
- try {
- in = httpConnection.getInputStream();
- source = new StreamSource(in);
- printSource(source);
- } catch (Exception e) {
- System.err.println("GreetMe Fault: " + e.getMessage());
- }
- InputStream err = httpConnection.getErrorStream();
- source = new StreamSource(err);
- printSource(source);
-
- // Sent HTTP GET request to invoke greetMe
- target = "http://localhost:9000/SoapContext/SoapPort/greetMe/requestType/CXF";
- url = new URL(target);
- httpConnection = (HttpURLConnection) url.openConnection();
- httpConnection.connect();
- System.out.println("Invoking server through HTTP GET to invoke greetMe");
-
- in = httpConnection.getInputStream();
- source = new StreamSource(in);
- printSource(source);
-
- // Sent HTTP GET request to invoke pingMe
- target = "http://localhost:9000/SoapContext/SoapPort/pingMe";
- url = new URL(target);
- httpConnection = (HttpURLConnection) url.openConnection();
- httpConnection.connect();
- System.out.println("Invoking server through HTTP GET to invoke pingMe");
-
- try {
- in = httpConnection.getInputStream();
- } catch (Exception e) {
- System.out.println("PingMe fault raised");
- }
- err = httpConnection.getErrorStream();
- source = new StreamSource(err);
- printSource(source);
- }
-
- private static void printSource(Source source) {
- try {
- ByteArrayOutputStream bos = new ByteArrayOutputStream();
- StreamResult sr = new StreamResult(bos);
- Transformer trans = TransformerFactory.newInstance().newTransformer();
- Properties oprops = new Properties();
- oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
- trans.setOutputProperties(oprops);
- trans.transform(source, sr);
- System.out.println();
- System.out.println("**** Response ******");
- System.out.println();
- System.out.println(bos.toString());
- bos.close();
- System.out.println();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-}