Le 20/10/2010 04:59, Daniel Kulp a écrit :
On Tuesday 19 October 2010 9:06:03 am Guillaume Sauthier wrote:
(re-sending to the list this time)
Thanks for the tips Dan.
I've attached patches to the original issue:
https://issues.apache.org/jira/browse/CXF-2839
It's for the 2.2.x branch (Sorry that was my primary target).
Very cool. Looked perfect.
Thanks for applying.
As per the last comment, I was wondering what was the best option to
contribute things to CXF when using git ?
There is a git mirror of CXF in github, so we could fork that repository
and you could see the progress directly (no more patches exchanges)...
Do you have any prior experience ?
I'm definitely OK with it. I've worked with a couple things that way. Not
so sure about some of the other committers though. The only issue is you
would need to state in the JIRA comment or similar that the contribution is
contributable under the Apache license. Nothing major though.
OK, next time I will make a try using github :)
thanks
--G
Dan
Thanks
--G
Le 18/10/2010 18:47, Daniel Kulp a écrit :
On Monday 18 October 2010 7:57:50 am Guillaume Sauthier wrote:
OK, I need a little help on this.
I'm trying to imlpement the new HTTPClientPolicy "NonProxyHosts"
attributes. Ideally, I would like to directly have in the bean a Pattern
so that it's only initiallized once at parsing time.
How to deal with that in JAXB ?
It's simple to add a String attribute in the schema resulting in a new
property in the generated bean, but how can I convert it into a regular
Pattern ?
Some ideas ?
You'll probably need a jaxb binding file for the http-conf.xsd. Not a
huge deal.
It would need to do two thing:
1) For this element, it would need to set the java class to Pattern (or
whatever)
2) Provide parse and print methods. (which would have to be added to a
utility class in HTTP component someplace.
Here is an example for a Calendar thing:
<jxb:bindings schemaLocation="hello_schema2.xsd" node="/xs:schema">
<jxb:globalBindings xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<jxb:javaType name="java.util.Calendar" xmlType="xs:dateTime"
parseMethod="javax.xml.bind.DatatypeConverter.parseDateTime"
printMethod="javax.xml.bind.DatatypeConverter.printDateTime"/>
</jxb:globalBindings>
</jxb:bindings>
However, that sets it on a global level which isn't what you'd want. You
would need to xpath it into the right element and set it that way.