You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by ff...@apache.org on 2010/05/05 09:37:35 UTC
svn commit: r941187 - in
/cxf/trunk/distribution/src/main/release/samples/wsdl_first: build.xml
src/main/java/com/example/customerservice/client/CustomerServiceClient.java
wsdl/cxf-servlet.xml
Author: ffang
Date: Wed May 5 07:37:34 2010
New Revision: 941187
URL: http://svn.apache.org/viewvc?rev=941187&view=rev
Log:
[CXF-2799]ant client-servlet doesn't work for wsdl-first demo anymore
Added:
cxf/trunk/distribution/src/main/release/samples/wsdl_first/wsdl/cxf-servlet.xml (with props)
Modified:
cxf/trunk/distribution/src/main/release/samples/wsdl_first/build.xml
cxf/trunk/distribution/src/main/release/samples/wsdl_first/src/main/java/com/example/customerservice/client/CustomerServiceClient.java
Modified: cxf/trunk/distribution/src/main/release/samples/wsdl_first/build.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/wsdl_first/build.xml?rev=941187&r1=941186&r2=941187&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/wsdl_first/build.xml (original)
+++ cxf/trunk/distribution/src/main/release/samples/wsdl_first/build.xml Wed May 5 07:37:34 2010
@@ -51,6 +51,6 @@
<target name="client-servlet" description="run demo client hitting servlet" depends="build">
<property name="param" value=""/>
- <cxfrun classname="com.example.customerservice.client.Client" param1="${base.url}/helloworld/services/hello_world?wsdl" param2="${op}" param3="${param}"/>
+ <cxfrun classname="com.example.customerservice.client.CustomerServiceClient" param1="${base.url}/helloworld/services/CustomerServicePort?wsdl" param2="${op}" param3="${param}"/>
</target>
</project>
Modified: cxf/trunk/distribution/src/main/release/samples/wsdl_first/src/main/java/com/example/customerservice/client/CustomerServiceClient.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/wsdl_first/src/main/java/com/example/customerservice/client/CustomerServiceClient.java?rev=941187&r1=941186&r2=941187&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/wsdl_first/src/main/java/com/example/customerservice/client/CustomerServiceClient.java (original)
+++ cxf/trunk/distribution/src/main/release/samples/wsdl_first/src/main/java/com/example/customerservice/client/CustomerServiceClient.java Wed May 5 07:37:34 2010
@@ -18,6 +18,9 @@
*/
package com.example.customerservice.client;
+import java.io.File;
+import java.net.URL;
+
import com.example.customerservice.CustomerService;
import com.example.customerservice.CustomerServiceService;
import com.example.customerservice.NoSuchCustomerException;
@@ -26,9 +29,23 @@ public class CustomerServiceClient {
protected CustomerServiceClient() {
}
- public static void main(String args[]) throws NoSuchCustomerException {
- // Create the service client with its default wsdlurl
- CustomerServiceService customerServiceService = new CustomerServiceService();
+ public static void main(String args[]) throws Exception {
+ CustomerServiceService customerServiceService;
+ if (args.length != 0 && args[0].length() != 0) {
+ File wsdlFile = new File(args[0]);
+ URL wsdlURL;
+ if (wsdlFile.exists()) {
+ wsdlURL = wsdlFile.toURL();
+ } else {
+ wsdlURL = new URL(args[0]);
+ }
+ // Create the service client with specified wsdlurl
+ customerServiceService = new CustomerServiceService(wsdlURL);
+ } else {
+ // Create the service client with its default wsdlurl
+ customerServiceService = new CustomerServiceService();
+ }
+
CustomerService customerService = customerServiceService.getCustomerServicePort();
// Initialize the test class and call the tests
Added: cxf/trunk/distribution/src/main/release/samples/wsdl_first/wsdl/cxf-servlet.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/wsdl_first/wsdl/cxf-servlet.xml?rev=941187&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/wsdl_first/wsdl/cxf-servlet.xml (added)
+++ cxf/trunk/distribution/src/main/release/samples/wsdl_first/wsdl/cxf-servlet.xml Wed May 5 07:37:34 2010
@@ -0,0 +1,35 @@
+<?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"
+ 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 xmlns:customer="http://customerservice.example.com/"
+ id="CustomerServiceHTTP" address="/CustomerServicePort"
+ serviceName="customer:CustomerServiceService" endpointName="customer:CustomerServicePort"
+ implementor="com.example.customerservice.server.CustomerServiceImpl">
+ </jaxws:endpoint>
+
+</beans>
Propchange: cxf/trunk/distribution/src/main/release/samples/wsdl_first/wsdl/cxf-servlet.xml
------------------------------------------------------------------------------
svn:executable = *