[ 
https://issues.apache.org/jira/browse/CXF-787?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gary Tully updated CXF-787:
---------------------------

    Attachment: xjc-ts-plugin.gtully.patch

Thsi plugin provides a toString method on generated types.

The plugin is enabled throug the command line of through the wsdl2java via
                <arg value="-xjc-Xts"/>

there are three options:  

default: single line with fieldnames

<arg value="-xjc-Xts,-Xts:style:simple> : single line with no field names

<arg value="-xjc-Xts,-Xts:style:multiline> : mulit line with fieldnames

This is an example of the output with 

a System.out("ref=", ref) of EndpointReferenType (ref) in the callback Client 
with the default output style produces:

     [java] [EMAIL PROTECTED]<null>,referenceParameters=<null>,[EMAIL 
PROTECTED]@14b2f1a, [EMAIL 
PROTECTED],otherAttributes={{http://www.w3.org/2006/01/wsdl-instance}wsdlLocation=file:/C:/tnd/cxf_trunk/distribution/target/apache-cxf-2.1-incubator-SNAPSHOT.dir/apache-cxf-2.1-incubator-SNAPSHOT/samples/callback/wsdl/basic_callback.wsdl}],any=<null>,otherAttributes={}]


> Add optional support for a toString method to JAXB generated types
> ------------------------------------------------------------------
>
>                 Key: CXF-787
>                 URL: https://issues.apache.org/jira/browse/CXF-787
>             Project: CXF
>          Issue Type: New Feature
>          Components: Tooling
>    Affects Versions: 2.0.1
>            Reporter: Gary Tully
>         Attachments: xjc-ts-plugin.gtully.patch
>
>
> A toString that gives a string representation of the xml content is required 
> for generated JAXB types. This is an option that is available at code gen 
> type, when wsdl2java is used and the result is a toString method that will 
> coaless the content. A <null> string should be produced when a field in the 
> type is absent. 
> This is handy for debugging and for logging.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to