Pinpoint Quickstart TestApp : Script start-testapp.sh failed when running with no error log #2190

1. Delete source code which related to apache cxf in quickstart because can't build when can't connect www.webservicex.net situation.
This commit is contained in:
koo.taejin
2016-10-27 15:34:39 +09:00
committed by koo-taejin
parent 96567903b9
commit 116bfced6c
2 changed files with 0 additions and 137 deletions
-46
View File
@@ -17,7 +17,6 @@
<spring.version>4.1.7.RELEASE</spring.version>
<slf4j.version>1.7.5</slf4j.version>
<tomcat.version>7.0.47</tomcat.version>
<cxf.version>2.7.18</cxf.version>
</properties>
<dependencies>
@@ -131,17 +130,6 @@
<groupId>commons-io</groupId>
<version>2.4</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
<version>${cxf.version}</version>
</dependency>
</dependencies>
<build>
@@ -208,40 +196,6 @@
<warSourceDirectory>${basedir}/target/deploy</warSourceDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>${cxf.version}</version>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<configuration>
<sourceRoot>${basedir}/target/generated-sources/cxf</sourceRoot>
<wsdlOptions>
<wsdlOption>
<wsdl>http://www.webservicex.net/globalweather.asmx?wsdl</wsdl>
<extraargs>
<extraarg>-fe</extraarg>
<extraarg>jaxws21</extraarg>
</extraargs>
</wsdlOption>
<wsdlOption>
<wsdl>http://www.w3schools.com/xml/tempconvert.asmx?wsdl</wsdl>
<extraargs>
<extraarg>-fe</extraarg>
<extraarg>jaxws21</extraarg>
</extraargs>
</wsdlOption>
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
@@ -1,91 +0,0 @@
/*
* Copyright 2014 NAVER Corp.
*
* Licensed 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 com.navercorp.pinpoint.testapp.controller;
import java.util.HashMap;
import java.util.Map;
import net.webservicex.GlobalWeather;
import net.webservicex.GlobalWeatherSoap;
import org.apache.cxf.endpoint.Client;
import org.apache.cxf.frontend.ClientProxy;
import org.apache.cxf.interceptor.LoggingInInterceptor;
import org.apache.cxf.interceptor.LoggingOutInterceptor;
import org.apache.cxf.transports.http.configuration.HTTPClientPolicy;
import org.apache.cxf.transport.http.HTTPConduit;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import com.navercorp.pinpoint.testapp.util.Description;
import com.w3schools.xml.TempConvert;
import com.w3schools.xml.TempConvertSoap;
/**
* @author barney
*
*/
@Controller
@RequestMapping("/cxfclient")
public class CxfClientController {
private static long CONNECTION_TIMEOUT = 4000;
private static long RECEIVE_TIMEOUT = 10000;
@RequestMapping("weather")
@ResponseBody
@Description("Cxf GlobalWeather(http://www.webservicex.net/globalweather.asmx?wsdl)")
public String weather(@RequestParam(defaultValue = "seoul") String city) throws Exception {
GlobalWeather globalWeather = new GlobalWeather();
GlobalWeatherSoap globalWeatherSoap = globalWeather.getGlobalWeatherSoap12();
setClientPolicy(globalWeatherSoap);
return globalWeatherSoap.getWeather(city, "");
}
@RequestMapping("tempconvert")
@ResponseBody
@Description("Cxf TempConvert (http://www.w3schools.com/xml/tempconvert.asmx?wsdl)")
public Map<String, String> tempconvert(@RequestParam(defaultValue = "100") String celsius) throws Exception {
TempConvert tempConvert = new TempConvert();
TempConvertSoap tempConvertSoap = tempConvert.getTempConvertSoap12();
setClientPolicy(tempConvertSoap);
String fahrenheit = tempConvertSoap.celsiusToFahrenheit(celsius);
Map<String, String> result = new HashMap<String, String>();
result.put("celsius", celsius);
result.put("fahrenheit", fahrenheit);
return result;
}
private void setClientPolicy(Object obj) {
Client client = ClientProxy.getClient(obj);
if (client != null) {
client.getInInterceptors().add(new LoggingInInterceptor());
client.getOutInterceptors().add(new LoggingOutInterceptor());
HTTPConduit conduit = (HTTPConduit) client.getConduit();
HTTPClientPolicy policy = new HTTPClientPolicy();
policy.setConnectionTimeout(CONNECTION_TIMEOUT);
policy.setReceiveTimeout(RECEIVE_TIMEOUT);
policy.setAllowChunking(true);
conduit.setClient(policy);
}
}
}