cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cschnei...@apache.org
Subject svn commit: r1238358 - in /cxf/xjc-utils/trunk: ./ runtime/ runtime/src/ runtime/src/main/ runtime/src/main/java/ runtime/src/main/java/org/ runtime/src/main/java/org/apache/ runtime/src/main/java/org/apache/cxf/ runtime/src/main/java/org/apache/cxf/xj...
Date Tue, 31 Jan 2012 10:12:59 GMT
Author: cschneider
Date: Tue Jan 31 10:12:58 2012
New Revision: 1238358

URL: http://svn.apache.org/viewvc?rev=1238358&view=rev
Log:
CXF-4069 Add a new module for JAX DataTypeAdapter and the ToString classes so generated code
does not have to depend on cxf

Added:
    cxf/xjc-utils/trunk/runtime/   (with props)
    cxf/xjc-utils/trunk/runtime/pom.xml
    cxf/xjc-utils/trunk/runtime/src/
    cxf/xjc-utils/trunk/runtime/src/main/
    cxf/xjc-utils/trunk/runtime/src/main/java/
    cxf/xjc-utils/trunk/runtime/src/main/java/org/
    cxf/xjc-utils/trunk/runtime/src/main/java/org/apache/
    cxf/xjc-utils/trunk/runtime/src/main/java/org/apache/cxf/
    cxf/xjc-utils/trunk/runtime/src/main/java/org/apache/cxf/xjc/
    cxf/xjc-utils/trunk/runtime/src/main/java/org/apache/cxf/xjc/runtime/
    cxf/xjc-utils/trunk/runtime/src/main/java/org/apache/cxf/xjc/runtime/DataTypeAdapter.java
    cxf/xjc-utils/trunk/runtime/src/main/java/org/apache/cxf/xjc/runtime/JAXBToStringBuilder.java
    cxf/xjc-utils/trunk/runtime/src/main/java/org/apache/cxf/xjc/runtime/JAXBToStringStyle.java
    cxf/xjc-utils/trunk/runtime/src/test/
    cxf/xjc-utils/trunk/runtime/src/test/java/
    cxf/xjc-utils/trunk/runtime/src/test/java/org/
    cxf/xjc-utils/trunk/runtime/src/test/java/org/apache/
    cxf/xjc-utils/trunk/runtime/src/test/java/org/apache/cxf/
    cxf/xjc-utils/trunk/runtime/src/test/java/org/apache/cxf/xjc/
    cxf/xjc-utils/trunk/runtime/src/test/java/org/apache/cxf/xjc/runtime/
    cxf/xjc-utils/trunk/runtime/src/test/java/org/apache/cxf/xjc/runtime/JAXBElementToStringStyleTest.java
    cxf/xjc-utils/trunk/runtime/src/test/java/org/apache/cxf/xjc/runtime/JAXBToStringBuilderTest.java
    cxf/xjc-utils/trunk/runtime/src/test/resources/
    cxf/xjc-utils/trunk/runtime/src/test/resources/binding.xml
Modified:
    cxf/xjc-utils/trunk/pom.xml
    cxf/xjc-utils/trunk/ts/src/main/java/org/apache/cxf/xjc/ts/ToStringPlugin.java

Modified: cxf/xjc-utils/trunk/pom.xml
URL: http://svn.apache.org/viewvc/cxf/xjc-utils/trunk/pom.xml?rev=1238358&r1=1238357&r2=1238358&view=diff
==============================================================================
--- cxf/xjc-utils/trunk/pom.xml (original)
+++ cxf/xjc-utils/trunk/pom.xml Tue Jan 31 10:12:58 2012
@@ -59,6 +59,7 @@
         <module>wsdlextension-test</module>
         <module>bug671</module>
         <module>property-listener</module>
+        <module>runtime</module>
     </modules>
     <repositories>
          <repository>

Propchange: cxf/xjc-utils/trunk/runtime/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Jan 31 10:12:58 2012
@@ -0,0 +1,4 @@
+.classpath
+.project
+.settings
+target

Added: cxf/xjc-utils/trunk/runtime/pom.xml
URL: http://svn.apache.org/viewvc/cxf/xjc-utils/trunk/runtime/pom.xml?rev=1238358&view=auto
==============================================================================
--- cxf/xjc-utils/trunk/runtime/pom.xml (added)
+++ cxf/xjc-utils/trunk/runtime/pom.xml Tue Jan 31 10:12:58 2012
@@ -0,0 +1,51 @@
+<!--
+  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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>org.apache.cxf.xjc-utils</groupId>
+    <artifactId>cxf-xjc-runtime</artifactId>
+    <packaging>jar</packaging>
+    <name>Apache CXF XJC Runtime</name>
+    <url>http://cxf.apache.org</url>
+
+    <parent>
+        <groupId>org.apache.cxf.xjc-utils</groupId>
+        <artifactId>xjc-utils</artifactId>
+        <version>2.4.1-SNAPSHOT</version>
+    </parent>
+
+
+    <properties>
+        <maven.test.skip>true</maven.test.skip>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>commons-lang</groupId>
+            <artifactId>commons-lang</artifactId>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+</project>

Added: cxf/xjc-utils/trunk/runtime/src/main/java/org/apache/cxf/xjc/runtime/DataTypeAdapter.java
URL: http://svn.apache.org/viewvc/cxf/xjc-utils/trunk/runtime/src/main/java/org/apache/cxf/xjc/runtime/DataTypeAdapter.java?rev=1238358&view=auto
==============================================================================
--- cxf/xjc-utils/trunk/runtime/src/main/java/org/apache/cxf/xjc/runtime/DataTypeAdapter.java
(added)
+++ cxf/xjc-utils/trunk/runtime/src/main/java/org/apache/cxf/xjc/runtime/DataTypeAdapter.java
Tue Jan 31 10:12:58 2012
@@ -0,0 +1,75 @@
+/**
+ * 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 org.apache.cxf.xjc.runtime;
+
+import java.util.Calendar;
+import java.util.Date;
+
+import javax.xml.bind.DatatypeConverter;
+
+public final class DataTypeAdapter {
+
+    private DataTypeAdapter() {
+    }
+
+    public static Date parseDate(String s) {
+        if (s == null) {
+            return null;
+        }
+        return DatatypeConverter.parseDate(s).getTime();
+    }
+    public static String printDate(Date dt) {
+        if (dt == null) {
+            return null;
+        }
+        Calendar c = Calendar.getInstance();
+        c.setTime(dt);
+        return DatatypeConverter.printDate(c);
+    }
+
+    public static Date parseTime(String s) {
+        if (s == null) {
+            return null;
+        }
+        return DatatypeConverter.parseTime(s).getTime();
+    }
+    public static String printTime(Date dt) {
+        if (dt == null) {
+            return null;
+        }
+        Calendar c = Calendar.getInstance();
+        c.setTime(dt);
+        return DatatypeConverter.printTime(c);
+    }
+
+    public static Date parseDateTime(String s) {
+        if (s == null) {
+            return null;
+        }
+        return DatatypeConverter.parseDateTime(s).getTime();
+    }
+    public static String printDateTime(Date dt) {
+        if (dt == null) {
+            return null;
+        }
+        Calendar c = Calendar.getInstance();
+        c.setTime(dt);
+        return DatatypeConverter.printDateTime(c);
+    }
+}
\ No newline at end of file

Added: cxf/xjc-utils/trunk/runtime/src/main/java/org/apache/cxf/xjc/runtime/JAXBToStringBuilder.java
URL: http://svn.apache.org/viewvc/cxf/xjc-utils/trunk/runtime/src/main/java/org/apache/cxf/xjc/runtime/JAXBToStringBuilder.java?rev=1238358&view=auto
==============================================================================
--- cxf/xjc-utils/trunk/runtime/src/main/java/org/apache/cxf/xjc/runtime/JAXBToStringBuilder.java
(added)
+++ cxf/xjc-utils/trunk/runtime/src/main/java/org/apache/cxf/xjc/runtime/JAXBToStringBuilder.java
Tue Jan 31 10:12:58 2012
@@ -0,0 +1,44 @@
+/**
+ * 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 org.apache.cxf.xjc.runtime;
+
+import java.util.Collection;
+
+import org.apache.commons.lang.builder.ToStringBuilder;
+import org.apache.commons.lang.builder.ToStringStyle;
+
+public final class JAXBToStringBuilder {
+    private JAXBToStringBuilder() {        
+    }
+    
+    public static String valueOf(Object object) {
+        return valueOf(object, JAXBToStringStyle.DEFAULT_STYLE);        
+    }
+    
+    public static String valueOf(Object object, ToStringStyle style) {
+        if (object instanceof String) {
+            return (String)object;
+        }
+        if (object instanceof Collection) {
+            object = ((Collection<?>) object).toArray();
+        }
+        return ToStringBuilder.reflectionToString(object, style);        
+    }
+}

Added: cxf/xjc-utils/trunk/runtime/src/main/java/org/apache/cxf/xjc/runtime/JAXBToStringStyle.java
URL: http://svn.apache.org/viewvc/cxf/xjc-utils/trunk/runtime/src/main/java/org/apache/cxf/xjc/runtime/JAXBToStringStyle.java?rev=1238358&view=auto
==============================================================================
--- cxf/xjc-utils/trunk/runtime/src/main/java/org/apache/cxf/xjc/runtime/JAXBToStringStyle.java
(added)
+++ cxf/xjc-utils/trunk/runtime/src/main/java/org/apache/cxf/xjc/runtime/JAXBToStringStyle.java
Tue Jan 31 10:12:58 2012
@@ -0,0 +1,85 @@
+/**
+ * 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 org.apache.cxf.xjc.runtime;
+
+import javax.xml.bind.JAXBElement;
+
+import org.apache.commons.lang.SystemUtils;
+import org.apache.commons.lang.builder.ToStringBuilder;
+import org.apache.commons.lang.builder.ToStringStyle;
+
+/*
+ * Override default styles to recognise JAXBElement as needing introspection
+ */
+public final class JAXBToStringStyle {
+
+    public static final ToStringStyle MULTI_LINE_STYLE =
+        new JAXBToStringStyleImpl(true);
+
+    public static final ToStringStyle SIMPLE_STYLE =
+        new JAXBToStringStyleImpl(false);
+
+    public static final ToStringStyle DEFAULT_STYLE =
+        new JAXBToStringStyleImpl();
+    
+    private JAXBToStringStyle() {
+        //utility class
+    }
+}
+
+class JAXBToStringStyleImpl extends ToStringStyle {
+    private static final long serialVersionUID = -584903238590491314L;
+
+    JAXBToStringStyleImpl() {
+        super();
+    }
+            
+    JAXBToStringStyleImpl(boolean multiLine) {
+        super();
+        if (multiLine) {
+            this.setContentStart("[");
+            this.setFieldSeparator(SystemUtils.LINE_SEPARATOR + "  ");
+            this.setFieldSeparatorAtStart(true);
+            this.setContentEnd(SystemUtils.LINE_SEPARATOR + "]");
+        } else {
+            // simple
+            this.setUseClassName(false);
+            this.setUseIdentityHashCode(false);
+            this.setUseFieldNames(false);
+            this.setContentStart("");
+            this.setContentEnd("");
+        }
+    }
+        
+    /*
+     * Introspect into JAXBElement as a special case as it does not have a
+     * toString() and we loose the content
+     * 
+     * @see org.apache.commons.lang.builder.ToStringStyle
+     */
+    @Override
+    protected void appendDetail(StringBuffer buffer, String fieldName, Object value) {
+        if (value instanceof JAXBElement) {
+            buffer.append(ToStringBuilder.reflectionToString(value, this));
+        } else {
+            buffer.append(value);
+        }
+    } 
+}

Added: cxf/xjc-utils/trunk/runtime/src/test/java/org/apache/cxf/xjc/runtime/JAXBElementToStringStyleTest.java
URL: http://svn.apache.org/viewvc/cxf/xjc-utils/trunk/runtime/src/test/java/org/apache/cxf/xjc/runtime/JAXBElementToStringStyleTest.java?rev=1238358&view=auto
==============================================================================
--- cxf/xjc-utils/trunk/runtime/src/test/java/org/apache/cxf/xjc/runtime/JAXBElementToStringStyleTest.java
(added)
+++ cxf/xjc-utils/trunk/runtime/src/test/java/org/apache/cxf/xjc/runtime/JAXBElementToStringStyleTest.java
Tue Jan 31 10:12:58 2012
@@ -0,0 +1,96 @@
+/**
+ * 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 org.apache.cxf.xjc.runtime;
+
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.namespace.QName;
+
+import org.apache.commons.lang.builder.ToStringBuilder;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class JAXBElementToStringStyleTest {
+    
+    class Holder {
+        String name = "HolderName";
+        Object obj;
+        Holder(Object o) {
+            this.obj = o;
+        }
+    }
+    
+    JAXBElement<String> nel = 
+        new JAXBElement<String>(
+            new QName("ab", "bv"),
+            String.class, "SomeText");
+
+    Holder h = new Holder(nel);
+    
+    @Test
+    public void testToStringDefault() throws Exception {    
+                
+        String ts = ToStringBuilder.reflectionToString(h);
+
+        validateHolderString(ts);
+
+        // JAXBElement contents not present
+        Assert.assertTrue("has no value", ts.indexOf("value") == -1);
+        Assert.assertTrue("has no bv", ts.indexOf("bv") == -1);
+
+    }
+
+    @Test
+    public void testToStringMultiLineStyle() throws Exception {
+        String ts = 
+            ToStringBuilder.reflectionToString(h, JAXBToStringStyle.MULTI_LINE_STYLE);
+
+        validateHolderString(ts);
+        validateElementString(ts);
+    }
+
+    @Test
+    public void testToStringSimpleStyle() throws Exception {
+        String ts = 
+            ToStringBuilder.reflectionToString(h, JAXBToStringStyle.SIMPLE_STYLE);
+
+        // field names are missing
+        Assert.assertTrue("has no obj field", ts.indexOf("obj") == -1);
+        Assert.assertTrue("has HolderName", ts.indexOf("HolderName") != -1);
+        Assert.assertTrue("has SomeText", ts.indexOf("SomeText") != -1);
+    }
+
+    private void validateHolderString(String ts) {
+        Assert.assertTrue("has HolderName", ts.indexOf("HolderName") != -1);
+        Assert.assertTrue("has JAXBElement", ts.indexOf("JAXBElement") != -1);
+        Assert.assertTrue("has obj", ts.indexOf("obj") != -1);
+    }
+    
+    private void validateElementString(String ts) {
+        Assert.assertTrue("has  value", ts.indexOf("value") != -1);
+        Assert.assertTrue("has scope", ts.indexOf("scope") != -1);
+        Assert.assertTrue("has bv", ts.indexOf("bv") != -1);
+       
+        
+    }
+
+
+}

Added: cxf/xjc-utils/trunk/runtime/src/test/java/org/apache/cxf/xjc/runtime/JAXBToStringBuilderTest.java
URL: http://svn.apache.org/viewvc/cxf/xjc-utils/trunk/runtime/src/test/java/org/apache/cxf/xjc/runtime/JAXBToStringBuilderTest.java?rev=1238358&view=auto
==============================================================================
--- cxf/xjc-utils/trunk/runtime/src/test/java/org/apache/cxf/xjc/runtime/JAXBToStringBuilderTest.java
(added)
+++ cxf/xjc-utils/trunk/runtime/src/test/java/org/apache/cxf/xjc/runtime/JAXBToStringBuilderTest.java
Tue Jan 31 10:12:58 2012
@@ -0,0 +1,67 @@
+/**
+ * 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 org.apache.cxf.xjc.runtime;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+
+public class JAXBToStringBuilderTest {
+
+    final String dataV = "someData";    
+
+    @Test
+    public void testToString() throws Exception {    
+        String res = JAXBToStringBuilder.valueOf(dataV);
+        Assert.assertEquals(res, dataV);
+    }
+
+    @Test
+    public void testToStringArray() throws Exception {  
+        String[] data = new String[]{dataV};
+        String res = JAXBToStringBuilder.valueOf(data);
+        Assert.assertTrue(res.indexOf(dataV) != -1);
+    }
+
+    @Test
+    public void testToStringCollection() throws Exception {  
+        List<String> data = new ArrayList<String>();
+        data.add(dataV);
+        String res = JAXBToStringBuilder.valueOf(data);
+        Assert.assertTrue(res.indexOf(dataV) != -1);
+    }
+
+    
+    @Test
+    public void testToStringMap() throws Exception {  
+        Map<String, String> data = new HashMap<String, String>();
+        data.put(dataV, dataV);
+        
+        // no content as it is not a Collection
+        String res = JAXBToStringBuilder.valueOf(data);
+        Assert.assertTrue(res.indexOf(dataV) == -1);
+    }
+
+}

Added: cxf/xjc-utils/trunk/runtime/src/test/resources/binding.xml
URL: http://svn.apache.org/viewvc/cxf/xjc-utils/trunk/runtime/src/test/resources/binding.xml?rev=1238358&view=auto
==============================================================================
--- cxf/xjc-utils/trunk/runtime/src/test/resources/binding.xml (added)
+++ cxf/xjc-utils/trunk/runtime/src/test/resources/binding.xml Tue Jan 31 10:12:58 2012
@@ -0,0 +1,42 @@
+<!--
+  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.
+-->
+
+<!-- 
+    Sample JAX-WS / JAXB binding config to be used by CXF users
+ 
+    Create Date for xs:date or xs:dateTime types instead of XmlGregorianCalendar 
+-->
+<jaxws:bindings wsdlLocation="CustomerService.wsdl"
+          xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
+          xmlns:xs="http://www.w3.org/2001/XMLSchema"
+          xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
+          xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+  <!-- <jaxws:enableAsyncMapping>true</jaxws:enableAsyncMapping> -->
+  <jaxws:bindings  node="wsdl:definitions/wsdl:types/xs:schema">
+   
+      <jxb:globalBindings>
+        <jxb:javaType name="java.util.Date" xmlType="xs:dateTime"
+                      parseMethod="org.apache.cxf.xjc.runtime.DataTypeAdapter.parseDateTime"
+                      printMethod="org.apache.cxf.xjc.runtime.DataTypeAdapter.printDateTime"/>
+        <jxb:javaType name="java.util.Date" xmlType="xs:date"
+                      parseMethod="org.apache.cxf.xjc.runtime.DataTypeAdapter.parseDate"
+                      printMethod="org.apache.cxf.xjc.runtime.DataTypeAdapter.printDate"/>
+      </jxb:globalBindings>
+  </jaxws:bindings>
+</jaxws:bindings>
\ No newline at end of file

Modified: cxf/xjc-utils/trunk/ts/src/main/java/org/apache/cxf/xjc/ts/ToStringPlugin.java
URL: http://svn.apache.org/viewvc/cxf/xjc-utils/trunk/ts/src/main/java/org/apache/cxf/xjc/ts/ToStringPlugin.java?rev=1238358&r1=1238357&r2=1238358&view=diff
==============================================================================
--- cxf/xjc-utils/trunk/ts/src/main/java/org/apache/cxf/xjc/ts/ToStringPlugin.java (original)
+++ cxf/xjc-utils/trunk/ts/src/main/java/org/apache/cxf/xjc/ts/ToStringPlugin.java Tue Jan
31 10:12:58 2012
@@ -46,7 +46,7 @@ public class ToStringPlugin {
     private static final Logger LOG = Logger.getLogger(ToStringPlugin.class.getName()); //NOPMD
 
     private String styleFieldName = "DEFAULT_STYLE";
-    private String styleClassName = "org.apache.cxf.jaxb.JAXBToStringStyle";
+    private String styleClassName = "org.apache.cxf.xjc.runtime.JAXBToStringStyle";
     private boolean active;
     
     public String getOptionName() {
@@ -55,11 +55,14 @@ public class ToStringPlugin {
 
     public String getUsage() {
         return "  -Xts                 : Activate plugin to add a toString() method to generated
classes\n"
-            +  "         equivalent to: -Xts:style:org.apache.cxf.jaxb.JAXBToStringStyle.DEFAULT_STYLE\n"
+            +  "         equivalent to: " 
+            +  "-Xts:style:org.apache.cxf.xjc.runtime.JAXBToStringStyle.DEFAULT_STYLE\n"
             +  "  -Xts:style:multiline : Have toString produce multi line output\n"
-            +  "         equivalent to: -Xts:style:org.apache.cxf.jaxb.JAXBToStringStyle.MULTI_LINE_STYLE\n"
+            +  "         equivalent to: " 
+            +  "-Xts:style:org.apache.cxf.xjc.runtime.JAXBToStringStyle.MULTI_LINE_STYLE\n"
             +  "  -Xts:style:simple    : Have toString produce single line terse output\n"
-            +  "         equivalent to: -Xts:style:org.apache.cxf.jaxb.JAXBToStringStyle.SIMPLE_STYLE\n"
+            +  "         equivalent to: "
+            +  "-Xts:style:org.apache.cxf.xjc.runtime.JAXBToStringStyle.SIMPLE_STYLE\n"
             +  "  -Xts:style:org.apache.commons.lang.builder.ToStringStyle.FIELD : The full
class+field\n"
             +  "         name of the ToStringStyle to use.";
     }



Mime
View raw message