[jibx-users] Why not allow flexible=true on ordered structures?

2010-08-19 Thread Archie Cobbs
I have a question about why setting flexible=true on a structure element is limited to situations in which ordered=false. First, I don't understand why this restriction is necessary. Why is it any harder to ignore unknown elements in the ordered case than in the unordered case? Can't you just

[jibx-users] Allowing a mapping to override an imported mapping with same type and element name

2010-08-19 Thread Archie Cobbs
Suppose I have an XML structure foo mapped in binding #1 to class A and this is used in some applications. Now I have a new application which uses a new extended version of the previous XML structure foo2 that contains the same stuff as foo but also allows a some additional elements, and I want

Re: [jibx-users] how would i bind this?

2010-08-19 Thread Archie Cobbs
Try: value style=text field=value usage=optional/ instead. -Archie On Thu, Aug 19, 2010 at 4:12 PM, Steel City Phantom scpha...@gmail.comwrote: my xml tag looks like this street line=11 compliant/street i tried the binding mapping name=street class=com.show.comm.ncc.Street value

Re: [jibx-users] Access to parent property inside a collection?

2010-09-21 Thread Archie Cobbs
You specify a factory method for creating each player that takes an Object parameter which you then cast to type Club. See the description for the factory attributehttp://jibx.sourceforge.net/binding/binding-attributes.html#objectfor details. -Archie On Tue, Sep 21, 2010 at 6:08 AM, Miguel

Re: [jibx-users] Cannot use flexible=true with collection

2010-10-19 Thread Archie Cobbs
Ironically, things get very inflexible when you specify flexible=true. Here are some other issues I've found: JIBX-402 http://jira.codehaus.org/browse/JIBX-402: JiBX fails when abstract type is used with flexible=true JIBX-397 http://jira.codehaus.org/browse/JIBX-397: Allow setting flexible=true

Re: [jibx-users] Cannot use flexible=true with collection

2010-11-19 Thread Archie Cobbs
On Fri, Nov 19, 2010 at 1:04 PM, Dennis Sosnoski d...@sosnoski.com wrote: What makes flexible='true' combined with ordered='true' more complex is the need to support optional elements. At any point in the parse, the next element in the input may be the next element in your schema sequence, or

[jibx-users] Open source JiBX bindings library

2010-12-02 Thread Archie Cobbs
Hi, While starting down the road of creating Java classes and a JiBX binding for an RFC-specified XML format, it occurred to me that there ought to be an open source library of pre-compiled JiBX bindings for some of the common standardized XML formats out there. Since I couldn't find one, I

Re: [jibx-users] Q: Replacing with gt; automatically?

2011-01-06 Thread Archie Cobbs
On Wed, Jan 5, 2011 at 7:51 PM, jamie.t...@oneamerica.com wrote: What I expected was that the LAST_NAME tag would have the special character's escaped - that the character value would be 'specialamp;characterlt;testgt;here'. However, that is not what I see when I generated the XML. Instead,

Re: [jibx-users] Anyone have a solution for JSR-303 validation?

2011-01-18 Thread Archie Cobbs
On Fri, Dec 31, 2010 at 10:54 AM, jcaristi jcari...@whisolutions.comwrote: We are using JiBX CodeGen to go from XML schema to Java for Axis2 web services. We code our XSD files with the appropriate constraints on each field. However, we are doing all of our request validation on the server

Re: [jibx-users] Anyone have a solution for JSR-303 validation?

2011-01-18 Thread Archie Cobbs
On Mon, Jan 17, 2011 at 3:24 AM, Dennis Sosnoski d...@sosnoski.com wrote: I'd planned to support annotations for schema constraints at some point, and it shouldn't be a huge job to add them in. It would involve changes to the actual code generation, though, and could not be handled by simple

[jibx-users] extends=type-name ?

2011-03-10 Thread Archie Cobbs
I always get confused when trying to use the extends attribute... Here's a simple question: whereas map-as allows either a class name or a type name, extends only allows a class name. Why? As it stands now, there's no way to extend a mapping that has a type-name. Thanks, -Archie -- Archie L.

Re: [jibx-users] extends=type-name ?

2011-03-12 Thread Archie Cobbs
and Web Services Consultinghttp://www.sosnoski.com/consult.html Axis2/CXF/Metro SOA and Web Services Traininghttp://www.sosnoski.com/training.html Web Services Jump-Start http://www.sosnoski.com/jumpstart.html On 03/11/2011 07:56 AM, Archie Cobbs wrote: I always get confused when trying to use

Re: [jibx-users] extends=type-name ?

2011-03-16 Thread Archie Cobbs
On Tue, Mar 15, 2011 at 10:28 PM, Dennis Sosnoski d...@sosnoski.com wrote: First, there doesn't seem to be any reason why you can't use type-names with substitution groups (i.e., extends=typename). This seems like a relatively simple limitation that could be fixed in the JiBX parsing engine.

[jibx-users] Optional elements always being set to zero/null ?

2011-03-29 Thread Archie Cobbs
I have a JiBX mapping for a serial port that looks like this: mapping abstract=true class=com.exampleSerialConfig value name=baudRate get-method=getBaudRate set-method=setBaudRate usage=optional/ ... /mapping The getBaudRate()/setBaudRate() methods take a value of type

Re: [jibx-users] Optional elements always being set to zero/null ?

2011-03-29 Thread Archie Cobbs
the Java and XML worlds without having to declare that default value twice (which is error-prone and redundant). -Archie On Tue, Mar 29, 2011 at 2:55 PM, Archie Cobbs arc...@dellroad.org wrote: I have a JiBX mapping for a serial port that looks like this: mapping abstract=true class

Re: [jibx-users] Optional elements always being set to zero/null ?

2011-03-29 Thread Archie Cobbs
FYI, I filed a bug: http://jira.codehaus.org/browse/JIBX-433 -Archie On Tue, Mar 29, 2011 at 3:10 PM, Archie Cobbs arc...@dellroad.org wrote: Looking more at the docs, I guess this is working as designed. However, this seems like sub-optimal behavior. I would expect JiBX to apply a default

Re: [jibx-users] Binding direction problem

2011-04-01 Thread Archie Cobbs
On Fri, Apr 1, 2011 at 7:32 AM, Voß, Marko marko.v...@fiz-karlsruhe.dewrote: So I guess JiBX will overwrite the values for the BindingFactory for a specific binding name. I would have expected JiBX to add the input bindings of binding name FORMAT_1 to the already compiled output bindings

Re: [jibx-users] Restrictions on multiple mappings

2011-05-19 Thread Archie Cobbs
But the object types are not the same: 1. com.myapp.mtpersister.domain.RouterMessage 2. com.air2web.mtpersister.domain.RouterMessage -Archie On Thu, May 19, 2011 at 8:58 AM, Mark Grizzaffi mark.grizza...@air2web.comwrote: I'm looking at an existing binding.xml that I did not originally

Re: [jibx-users] Cloning JiBX git repository fails

2011-06-05 Thread Archie Cobbs
FWIW, I did a couple of quick tests and was able to successfully git clone from that URL on both Linux and Mac OS X. -Archie On Sun, Jun 5, 2011 at 6:47 AM, Stevo Slavić ssla...@gmail.com wrote: Hello JiBX users, Cloning JiBX repo ( git://jibx.git.sourceforge.net/gitroot/jibx/jibx ) fails

Re: [jibx-users] Mapping help

2011-08-16 Thread Archie Cobbs
Sounds like a run-of-the-mill parse error, but impossible to tell without seeing your binding.xml. Does your binding allow the individualName tag (in the correct namespace - easy mistake to make) to nest inside responsibleParty? -Archie On Tue, Aug 16, 2011 at 8:50 PM, Nathan Wilhelmi

[jibx-users] JiBX allowing random attributes?

2011-08-24 Thread Archie Cobbs
I just noticed that JiBX is allowing arbitrary attributes in the input that I'm using. This is surprising because I've been using JiBX for years and never noticed this... For example, with this binding: binding name=binding mapping name=test class=Test value name=name field=name/

Re: [jibx-users] How to: abstract mappings with interface implementations?

2012-02-01 Thread Archie Cobbs
The terminology is confusing. A JiBX abstract mapping is just like a macro that declares a bunch of structure fields without declaring the name of the containing XML element. Give it a type-name and then dereference it elsewhere with map-as. The JiBX extends keywords simply means member of a

Re: [jibx-users] Splitting JIBX compile across two classes CORRECTION - two Projects

2012-02-01 Thread Archie Cobbs
One idea... Try defining abstract bindings for everything in the library, and then including the abstract binding files (Foo.xml, Bar.xml, etc.) in your library JAR file. Then don't do any JiBX binding when building the library. Only do it during the WAR build. You'll have to extract the Foo.xml

Re: [jibx-users] Splitting JIBX compile across two classes CORRECTION - two Projects

2012-02-01 Thread Archie Cobbs
the obvious solution of moving all the files which are relevant to a given jibx binding file into the same project - still its a pity that there isn't some kind of deferred binding solution. Just wondered how other people had handled this problem. Regards Alan On 2/1/2012 2:57 PM, Archie Cobbs

Re: [jibx-users] Simple Container (nested) tag requirement

2012-02-02 Thread Archie Cobbs
On Thu, Feb 2, 2012 at 11:36 AM, Syd Davenport findme...@gmail.com wrote: Here is my sample XML file person nameJohn/name address streetEl Camino/street citySan Jose/city /address /person My class: public class Peson { String name; String street; String city; }

Re: [jibx-users] Where to report Errors in Jibx

2012-05-08 Thread Archie Cobbs
Smells like JIBX-465 http://jira.codehaus.org/browse/JIBX-465... -Archie On Tue, May 8, 2012 at 7:04 AM, Rajesh Khan rajeshkhan...@gmail.com wrote: So i am convinced that there is an error in jibx no matter what i do I get the following error C:\jibx\tutorial\example26java -cp

Re: [jibx-users] How to unmarshall using JiBX and not use XSD?

2012-06-08 Thread Archie Cobbs
In my opinion XSDs are useless. 99% of the time validation must be performed in Java anyway, so why bother? For Java validation, JSR 303 validation works just fine. By the way JiBX has a bug and/or feature where it ignores unknown attributes, and there's no way to turn it off. In your case, this

[jibx-users] DomElementMapper deleting comments?

2012-08-04 Thread Archie Cobbs
I'm using the DomElementMapper to read/write a nested XSLT document contained in a larger XML document. This works OK, except that the DomElementMapper is deleting all the comments. That is, if I unmarshall and then marshall an XML document, all the comments that were in the nested XSL are gone.

Re: [jibx-users] Binding files are input or output?

2012-08-09 Thread Archie Cobbs
On Thu, Aug 9, 2012 at 11:35 AM, Alan Evangelista ala...@linux.vnet.ibm.com wrote: In the documentation, I read that codegen generates a binding file and a Java source file from a schema (xsd) file. If the binding file is used to define the mapping between xsd attributes and elements to Java

Re: [jibx-users] DomElementMapper deleting comments?

2012-09-06 Thread Archie Cobbs
For anyone interested... I figured out the problem. This is not a JiBX bug but rather a bug in Spring's JibxMarshaller adapter class. See https://jira.springsource.org/browse/SPR-9768 for details. -Archie On Sat, Aug 4, 2012 at 8:56 AM, Archie Cobbs arc...@dellroad.org wrote: I'm using

Re: [jibx-users] Parent Node that changes but only require read of child nodes.

2013-05-14 Thread Archie Cobbs
You could create a bunch of fake bean properties with corresponding names that all set the underlying real property accordingly. Alternately, insert an XSL transform in the pipeline that would get applied prior to JiBX seeing the XML. -Archie On Tue, May 14, 2013 at 12:00 PM, John Smith

Re: [jibx-users] Mutually exclusive tags

2013-05-17 Thread Archie Cobbs
On Thu, May 16, 2013 at 8:50 AM, John Smith java.dev@gmail.com wrote: In the XML I can either have only SomeCCCard1 or SomeCCCard2 but Jibx throws... Try removing name=details. Also is there a way to simplify the binding for this case I have up to 20 different mutually exclusive cards

Re: [jibx-users] Maps

2013-07-22 Thread Archie Cobbs
You can't use put as an add method because the add method must take only one argument. But the larger issue is that JiBX doesn't support Maps out of the box. FYI I wrote a helper class to facilitate solving this problem... see

Re: [jibx-users] Getting expected start tag error when unmarshalling unformatted xml

2013-08-27 Thread Archie Cobbs
I have no idea what is wrong, but that is weird. Just out of curiosity, I wonder if it has to do with the fact that Ogz is a prefix of OgzNr ? Try the same test with OgzNr replaced with Foo... -Archie On Tue, Aug 27, 2013 at 7:58 PM, njmuni . limow...@gmail.com wrote: I'm getting this

Re: [jibx-users] Multiple value elements pointing to the same field

2013-12-12 Thread Archie Cobbs
I think that's just the way JiBX works. You might consider a workaround of creating a new setter method setValueIfNull() that does nothing if the value is already set. -Archie On Thu, Dec 12, 2013 at 10:49 AM, Vincent Fumo vfumo.w...@gmail.com wrote: I've got 2 xml files to unmarshall using

Re: [jibx-users] JiBX 1.2.6 released

2015-03-27 Thread Archie Cobbs
Thanks Don. From that patch, it appears that no changes to JiBX 1.2.6 are needed. In other words, simply swapping in the newer BCEL 6.0 snapshot JAR makes it work with JDK 8. Is that correct? That seems to contradict the original poster's complaint: Using 1.2.6 + BCEL 6-SNAPSHOT, I was unable

Re: [jibx-users] JiBX and Java 8

2015-11-11 Thread Archie Cobbs
Hi Don, Understood. In the meantime, we've been using JiBX 1.2.6 successfully with BCEL 6.0-20150726.24-123. Presumably once BCEL 6.0 is actually released it will work also. Here's the Ivy RoundUp details:

Re: [jibx-users] JiBX 1.2.6 released

2015-09-03 Thread Archie Cobbs
FYI, A co-worker has tried JiBX with the latest BCEL release (BCEL_6_0_RC4) and claims that this combination works on Java 8. I have not tried this myself yet. I'd be interested to hear others' experiences if you do. -Archie On Fri, Mar 27, 2015 at 9:40 AM, Archie Cobbs <arc...@dellroad.

Re: [jibx-users] org.jibx.runtime.JiBXException: Duplicate element "{http://www.pcats.org/schema/naxml/loyalty/v01}Promotion"(line 1, col 1059)

2016-02-10 Thread Archie Cobbs
You have: wrapper, but your XML has them "inline" with no wrapper. Try removing name="Promotion" from the collection? -Archie On Wed, Feb 10, 2016 at 1:12 AM, PS Govind wrote: > Could anyone please assist me in resolving the Duplicate element error? > Any help would

Re: [jibx-users] Jibx 1.2.5 binding compiler with JAVA 7 pushes all generated code in a single package

2016-05-07 Thread Archie Cobbs
I've never seen that problem. And you are specifying the package in your binding files like this? ... FYI version 1.2.6 is the latest. -Archie On Sat, May 7, 2016 at 10:43 AM, Avila, Edgar wrote: > Hi, , I have not been able to find information out there

Re: [jibx-users] JIBX marshalling truncating namespaces intermittently

2018-04-27 Thread Archie Cobbs
I've never encountered any problem like that with JiBX. My guess is that there is some buffering bug in a lower layer of your I/O pipeline. -Archie On Fri, Apr 27, 2018 at 1:46 PM, Vadheraju, Rajeshwar wrote: > When we do marshalling of object into XML, the

Re: [jibx-users] JiBX 1.3.3

2020-01-27 Thread Archie Cobbs
Hi Don, Just wanted to say thank you! I'm still using JiBX in several projects and it continues to work beautifully for my purposes. Glad it's going to continue to be usable for a long time. -Archie On Mon, Jan 27, 2020 at 10:09 AM Don Corley wrote: > JiBX 1.3.3 has been released. > > This

Re: [jibx-users] Jibx 1.3.3 binding compliler with JDK 1.8 generating classes in single package

2022-03-31 Thread Archie Cobbs
Can you create and post a *minimal* test case Maven project demonstrating the problem? On Thu, Mar 31, 2022 at 10:35 AM Dickson Rodrigues < rodrigues.dick...@gmail.com> wrote: > Hi, > > I am facing the same issue as few others who have reported those here. >

Re: [jibx-users] Jibx 1.3.3 binding compliler with JDK 1.8 generating classes in single package

2022-03-31 Thread Archie Cobbs
account.AccountResult.listFactory"> > ordered="false"> > > usage="optional"/> > > > > > > > JiBX_accountBindingAccountResult_access.class is generated under package > com.blahblah.model.billing. Infact all the _access files for my bindings > are gene

Re: [jibx-users] Jibx 1.3.3 binding compliler with JDK 1.8 generating classes in single package

2022-04-01 Thread Archie Cobbs
Hi Dickson, On Fri, Apr 1, 2022 at 1:51 PM Dickson Rodrigues < rodrigues.dick...@gmail.com> wrote: > Will you please take a look at the attached project and see why we get the > access files generated in the billing package? I am using ant 1.9.14 and > running it on mac. > Hang on - the

Re: [jibx-users] Jibx 1.3.3 binding compliler with JDK 1.8 generating classes in single package

2022-04-01 Thread Archie Cobbs
Hi Dickson, On Fri, Apr 1, 2022 at 4:24 PM Dickson Rodrigues < rodrigues.dick...@gmail.com> wrote: > However when I introduced a second bindings file with a separate package > mentioned in both bindings.xml files. The access classes for both bindings > are generated in the package mentioned in

Re: [jibx-users] Jibx 1.3.3 binding compliler with JDK 1.8 generating classes in single package

2022-04-01 Thread Archie Cobbs
gt; Dickson Rodrigues > > > On Thu, Mar 31, 2022 at 4:10 PM Archie Cobbs > wrote: > >> Not sure why but I was unable to reproduce your issue using a slightly >> modified version of your files. >> >> Here's a shell script trace: >> >> $ tree >>

Re: [jibx-users] Recommended JIBX issue policy

2024-05-09 Thread Archie Cobbs
Hi Daniel, On Wed, May 8, 2024 at 10:35 AM Daniel Krügler via jibx-users < jibx-users@lists.sourceforge.net> wrote: > Is this the right approach? > That is the right approach - and the same one I used to fix the same problem with plain text (my apologies for missing the attribute version of the