Hi Aaron,
This is getting pretty convoluted, and I'm not sure the current code can
handle it cleanly - I think you're actually going to get two object
creations for the player object, which is why the name information is
lost when you reference it again for the id. It *may* work if you
merge
how to resolve
it?
I can actually see the added methods to the class from
the jdeveloper
but when I run it I get that error?
I have spend couple of days trying to resolve it.
What would be your suggestion on correct approach?
Thanks.
robert
-Original Message-
From: Dennis Sosnoski [mailto
This is a known problem with JiBX, basically a variation of the third
and final one mentioned on the status page. It's going to take
redesigned code generation to handle it properly, which is the main
focus for beta 4. Hopefully I'll have this working (at least in CVS) by
early May.
- Dennis
Yes, that should not be a problem.
- Dennis
Robert Augustyn wrote:
Would it be possible to bind it with jibx if I had
only 2 types of x
element?
Something like:
?xml version=1.0 encoding=UTF-8?
binding
mapping name=y class=y
value name=y1 field=y1/
value name=y2 field=y2/
You need to run multiple bindings at the same time, by supplying all the
bindings as arguments to a single execution of the binding compiler.
Otherwise, if your bindings use the same Java packages only the last
binding will be kept active.
- Dennis
Robert Augustyn wrote:
Hi,
I seem to have
You should be able to just use a custom marshaller/unmarshaller for the
Map itself. That won't use your get/set methods for the individual
items, but I don't see any reason why you'd want to.
The custom marshaller/unmarshaller documented at
Yes, JiBX uses the XML Schema xs:dateTime standard representation which
always requires the T. If you're actually working with xs:date values
(which don't include a time component) there are methods provided in
org.jibx.runtime.Utility that will handle serializing/deserializing.
This would be
Hi Marco,
This type of problem occurs when for some reason you have two copies of
the class files and the wrong copy is modified (or a copy is being
loaded by NetBeans before it runs the binding compiler - the run-bind
step - and then kept even after the file is modified). I don't
understand
This is not always handled consistently in the current code. For
collection methods, the code looks for an exact match on the method
signature, expecting java.lang.Object to be passed or returned, checking
both the current class and visible methods from superclasses. In the
case of a
anything, take that feedbacks as
user comments. If you will consider it for a fix, I would really
appreciate it. If you won't fix it, I will do it just for my project.
Thanks for the good work,
Stefano
Dennis Sosnoski wrote:
What are the actual binary values of those characters in your string
It's very easy to override this behavior if you want to handle a char
value as a single character string, without modifying the code. Just
define the same methods you've listed below in your own code, then
reference them in your binding as serializer/deserializer. You can use
the
of problems by adding additional checking code and
more informational exceptions?
Dennis Sosnoski wrote:
See http://jibx.sourceforge.net/faq.html#npe There's a reason it's
called a FAQ... :-)
If you'd like something beyond that, you can try running the
JiBX-enhanced code through a decompiler
This should certainly work. It's basically using a very relational
database-like structure, and although that's not the common pattern for
XML there's nothing wrong with using it - it's just a little fluffier.
The drawback, as you said, is that you need to have objects to handle
the
Sorry, I've been bogged down with other issues and projects. I'll try to
get to this tomorrow.
- Dennis
Anibal Rego-Dacal wrote:
Since I did not hear anything more from you,
I wanted to ask if you could achieve something.
Thanks
Anibal
---
It's not as simple as it might appear, Falk. The issue is that JiBX
makes use of element ordering in combination with a pull parser to
improve unmarshalling performance. Because of this, JiBX always wants to
know what to expect next.
It may be possible to provide a skip unbound elements
,
Regards,
Michal
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
Dennis Sosnoski
Sent: Wednesday, May 26, 2004 1:31 PM
To: [EMAIL PROTECTED]
Subject: Re: [jibx-users] Newbe help request - Expected
start tag, found end tag...
Hi Michal,
I don't see anything
Falk Langhammer wrote:
Dennis Sosnoski wrote:
It's not as simple as it might appear, Falk. The issue is that JiBX
makes use of element ordering in combination with a pull parser to
improve unmarshalling performance. Because of this, JiBX always wants to
know what to expect next.
ok, I
Hi Harrie,
You can use ordered=false to get this behavior, which requires all the
child binding components to be optional. See
http://jibx.sourceforge.net/tutorial/binding-extras.html#mixing This
does have the drawback of meaning you lose the automatic validation by
JiBX that required items
Whoops. You've got the right approach, but the JiBX code for
writeDocType() had an error. I'm fixing it in CVS and will have an
updated beta 3c build out within the next few days that includes the
fix. I guess either nobody had tried this out before or they just hadn't
bothered reporting the
Great! I'm not sure I see any easy way around that, so I may just
document it for now and fix it in beta 4.
- Dennis
Daniel Cox wrote:
Thanks for taking time to look at the source. My binding did in fact start with a
class that could not be modified: (java.util.HashMap) as described in
I don't understand the issue based on this description, so you probably
should enter it in Jira with full details. Thanks,
- Dennis
Guillaume Pothier wrote:
Hi,
I have a binding that uses a deserializer method. In this method's call
hierarchy, there is a lazy initialization of a data structure
You could do things of this type with a custom marshaller, or possibly
by using test-methods to select the type of binding you want to use. I
have an example of the latter I'll try to add to the Wiki this week.
You could also do this by using a get-method for the collection. If the
indexed
I think this sounds great as a workaround for something many people have
run into. I'm still planning to handle it directly with an include
element in beta 4, but progress is slow.
I suggest you add this to the Wiki. You should be able to just attach
your files to the Wiki page for anyone
was wondering if my bug would'nt be related to sql types like
timestamps and dates. How is JiBX mapping them ?
Henri.
Dennis Sosnoski dms-at-sosnoski.com |JiBX| wrote:
It'd relate to the binding definitions for your DocumentVte class, of
course. There's a known issue of this type in the Jira issue tracking
I really, truly, will get the JibxSoap checked in and an alpha release
out this week. There were some issues with the WSDL generation for a
deployed service that were messier than I'd expected, but they're
finally resolved. I do need to release a beta 3c of JiBX at the same
time, though, since
JiBX should use the package of the first mapped class by default, but
you can override this with the package attribute of the binding element.
- Dennis
Tilman Linden wrote:
Hello all,
as i am new to this list please let me shortly introduce myself. My name
is Tilman and i am working for the
Not at present. To make this work there'd need to be an XMLPull adapter
for XBIS input, then an org.jibx.runtime.IXMLWriter implementation to
generate XBIS output from JiBX. It wouldn't be that hard to do, but it's
very high on my priority list right now.
I suspect it'd outperform Sun's Fast
Thomas Jones-Low wrote:
Jean-Christophe Garnier wrote:
Hello,
I wish to obtain a DOM or string representation of an object marshaling.
Currently I have seen only explanations to generate a file.
Is this possible without generate a file ?
Thanks by advance,
Use a java.io.StringReader or
This *is* a real limitation of the current binding definition structure.
The problem is that I didn't foresee needing to add namespace
definitions at the structure level. Right now the only way to handle
what you want through the binding definition is by using mapping
instead of structure.
I'm doing some similar things in the JibxSoap WSDL generation. I'm
trying right now to get JiBX beta 3c ready, and when that's done I'll
also release JibxSoap.
- Dennis
Stefano Fornari wrote:
Hi All,
We would like to follow the suggestion of writing a marshaller to work
around our namespace
You can specify the package to be used for the generated classes with
the package=... attribute of the binding element. Let me know if
this doesn't work properly for you.
This seems to be a FAQ, now, so I'll add it to the list.
- Dennis
Venkatesh Prasad Ranganath wrote:
Hi,
I have 2 packages
)
and not an interface. If the first mapping class is from a .jar file,
or is an interface, it'll be generated in the empty package, which would
probably go into the working directory.
Does that explain what you're seeing?
- Dennis
Dennis Sosnoski wrote:
You can specify the package to be used for the generated
Venkatesh Prasad Ranganath wrote:
Dennis Sosnoski wrote:
I'm missing some information here, I think. Are you talking about
separate binding definitions for these classes, or different mappings
for the same class within a single binding definition?
You can define separate bindings
Venkatesh Prasad Ranganath wrote:
Dennis Sosnoski wrote:
I don't understand the reference to different working directories,
unless you mean that these are separate directories in the classpath.
I don't know that anyone has really tried working with this case of
having a binding use classes
I'd thought this was in, but it wasn't. I added it for the beta 3c
release. If the field type you reference in structure
field=itsObject/ has a type with a known mapping that'll be used
directly; otherwise, you'll get the mapping appropriate for the object
or element type at runtime.
-
This is a variation of the same problem listed on the status page. For
now, if you want to set the default value you'll need to either do it in
the constructor or use a pre-set method for this purpose.
- Dennis
Venkatesh Prasad Ranganath wrote:
Hi,
I have the following snippet and I am trying
I've posted the new release of JiBX along with initial releases of
JibxSoap and Xsd2Jibx on SourceForge. Due to the continuing problems
with the SourceForge project CVS for the jibx module I finally created a
new module (core) for the JiBX code. From now on, just use this module
for CVS
I tried contacting you directly in hopes you could try this with the new
code before I released it, but haven't seen any response. Please go
ahead and try the new release - you should not get a VerifyError, though
it's possible you'll instead get an error during binding.
- Dennis
Tilman
Venkatesh Prasad Ranganath wrote:
Dennis Sosnoski wrote:
I've posted the new release of JiBX along with initial releases of
JibxSoap and Xsd2Jibx on SourceForge. Due to the continuing problems
with the SourceForge project CVS for the jibx module I finally created
a new module (core
It looks like the element you're trying to marshal has an undeclared
namespace. If the namespace for the element is declared in the binding
definition for a containing element it should be found automatically;
otherwise, you need to have the namespace declaration on the DOM Element
itself. DOM
Looks like you're doing some very warped things with JiBX (and I mean
that in a good way, I think)! You should be able to do this by using a
get-method added to the B class. If the get-method has the signature
name(Object obj) it will be passed the containing object. You can cast
this to an A
are serialized in java.util.Date (there seems to
be somekind of test with instanceof java.util.Date) but then in the
class, the fied is casted into java.util.Date which generates my issue.
I wrote my own serializer for java.sql.Timestamp which solved the problem!
Henri.
Dennis Sosnoski dms
One of the enhancements I'm planning for beta 4 is a way to split a
binding definition into separate input and output variations at the
component level. This is something that I've wanted several times. I'm
not sure about the binding representation of this, but perhaps something
along the
wrote:
Am Mo, den 05.07.2004 schrieb Dennis Sosnoski um 19:42:
Looks like you're doing some very warped things with JiBX (and I mean
that in a good way, I think)!
yes, things can get warped when you have an existing XML-Schema, DOM
Parser, Java-Code not matching the structure and shall
.
Tilman
Am Mo, den 05.07.2004 schrieb Dennis Sosnoski um 19:36:
It looks like the element you're trying to marshal has an undeclared
namespace. If the namespace for the element is declared in the binding
definition for a containing element it should be found automatically;
otherwise, you need
Tilman Linden wrote:
Am Di, den 06.07.2004 schrieb Dennis Sosnoski um 19:08:
Somehow the elements you're trying to marshal appear to have a namespace
set. If you want to marshal them as though they were not in any
namespace you can modify your own version of the
DomElementMapper
I see that there's an error in the encoding handling that I'd missed.
Most of the test cases are just using ASCII characters, though I thought
I had a few that went outside the set. I'll get it fixed in CVS as soon
as I can, and will also add it to the test suite. If you can get a
simple
Actually, the problem I noticed is only for ISO-8859-1 - do you also see
a problem when using UTF-8?
- Dennis
Dennis Sosnoski wrote:
I see that there's an error in the encoding handling that I'd missed.
Most of the test cases are just using ASCII characters, though I thought
I had a few
There's a request for better support for this in the issue tracking
system, http://jira.codehaus.org/browse/JIBX-18 As it is right now, you
can tell JiBX to ignore elements at a particular known place in your
XML, but cannot tell it to in general ignore any elements it doesn't
know what to do
Released this, with added exception mapping to/from SOAP Faults. Also
made XML indenting optional (off by default), and added an optional
server code build that (inefficiently) supports monitoring the usage of
a service.
Best of all, finally published my performance comparison at
Yes, that's the intent.
- Dennis
Guillaume Pothier wrote:
Where would this split element go? Whereever you can put a
structure or value? It sounds good anyway.
Dennis Sosnoski wrote:
One of the enhancements I'm planning for beta 4 is a way to split a
binding definition into separate input
if they need this support prior to beta 4.
- Dennis
Dennis Sosnoski wrote:
Actually, I thought I'd noticed an error in the ISO-8859-1 code but on
further examination it looks good (and works okay in my tests, too).
What *does* appear to be a problem is if you don't specify an encoding
Hi Thomas,
With the current code you could probably do this by changing the two URI
definitions at the start of org.jibx.compile.def.BindingBuilder, since I
think that's the only place where the names are referenced. It may or
may not be possible to do this in the future with beta 4 - certainly
Thomas Jones-Low wrote:
Dennis Sosnoski wrote:
Hi Thomas,
The real solution is to get Oracle to fix JDeveloper. If it won't
work with noNamespaceSchemas, it's broken. End of story. I don't know
of any other tools that have this problem. For my own work with XML
documents using schemas I
Thomas Jones-Low wrote:
...
XML File:
person
primary street124 main street/streetcitynew york/city
stateNY/state zip00/zip
/primary
secondary street142 tree street, apt 14/street
cityBurlington/citystateMI/state
zip0/zip
/secondary
/person
Binding attempt 1:
binding
namespace
Stevenson, Scott W wrote:
Thanks Dennis!
That fixed two of the problems I was having, and I just got my first test case to run. I am slowly starting to understand some of these subtleties.
I want to complement you on JiBX, and on having good documentation to help newbies like me get started.
Thomas Jones-Low wrote:
Dennis Sosnoski wrote:
The class attribute is only used with a mapping element. The
current code doesn't check for unknown attributes, so it won't
complain if you add in something that's not relevant. That's the case
for your class attribute on the structure element
I don't see anything wrong in what you're doing, at first glance. I'd
suggest adding some debugging code to your writeTempData method to print
out the actual file location (so generate it as a String, print it out,
then do the new FileOutputStream()). I suspect it's going somewhere
other than
Check your binding again. The sample Cameron gave you is correct (except
for the collection as an empty tag - that should be collection
field=tablenames with no '/' before the ''). From the errer message
I'd suspect you have something like:
collection field=tablenames
structure ...
With a
This same situation works fine in my tests, such as this one:
collection field=ints
value name=int/
/collection
Even though I'm calling the elements int here, the values are treated
as strings. All I can suggest is that you package up a simplified
version of your application with an
You'd need to actually map those attributes in order to handle them at
present. Making it simpler is an interesting idea. I suggest you enter
it in Jira as an enhancement request so it stays visible.
- Dennis
Tilman Linden wrote:
Hi all,
i wonder if/how JiBX supports attributes of the
The exception sounds like a classpath issue to me, too. The weird class
name Angel points out may be part of the problem, though. Looking at it
I see that you've got a full directory path embedded in that class name.
That shouldn't normally happen. I think what's going on is that JiBX is
For right now the reference from the enclosing object won't get passed.
This really is a bug, and if you want to enter it in Jira it'll help
make sure it gets corrected.
I think the proper behavior should always be to pass the existing object
reference. Currently JiBX ignores this existing
This could certainly be a problem if you're working with streams. Even
if your XML fragments are well-formed documents (basically just a single
element, with children), if your character encoding is something other
than UTF-8 it won't be recognized unless you either specify the encoding
when
You're using the index value 1 when trying to retrieve the Type
attribute value, using the getAttributeName method of the
UnmarshallingContext. There are two problems with this - first off,
indexes start at 0, not 1, so there'd never be an attribute present with
index 1; second, the call
There's not any easy way to bind this directly. Your approach of using a
map and an custom unmarshaller is probably the best you can do.
- Dennis
Kiran Sutrave wrote:
Hi Dennis:
Is there a way to build a binding file for such a structure. If so can
you provide me with an sample.
Thanks
Kiran
Hi Stefano,
This normalization is actually required by XML. Here's the relevant part
of the document (http://www.w3.org/TR/2000/REC-xml-20001006):
-
2.11 End-of-Line Handling
XML parsed entities are often stored in computer files
Many people share your feelings of frustration, Stefano! In some ways
XML has been *too* successful.
It's not the unmarshaller that changes the text content, or I'd probably
give you a way of disabling it (with suitable warnings, of course). It's
in the actual parser operation. To bypass it
Hi Gilles,
Sorry I didn't reply faster to your original posting. You shouldn't need
any kind of recursive function to handle this, and I've tested similar
combinations - but if it gives you an IllegalStateException for your
binding the workaround may be the best approach for now. This exception
This was an oversight, and I'll correct it with the next update
(currently on hold until I finally get JiBX beta 4 out). It's a stupid
kind of legacy issue, since SOAPAction is basically unnecessary with
doc/lit web services, but it is still required to be present (with the
value an empty
Ah, now I understand - when you said multiple tags to a single class
in the original email I interpreted that as a sequence of elements
(partially because that's what you seemed to be showing).
The problem here is that mapping is intended as a general rule for how
to handle a particular class.
I think it depends on how the complexTypes and elements inheriting from
that type are used. If the objects corresponding to the elements are in
a common class hierarchy you should be able to use an abstract mapping
for the complexType, and extend it with a mapping for each subclass.
That only
Looks like you've got a space at the end of your name=... attribute
for the ReleaseMediaAndCtrlTechText element binding (in other words,
name=ReleaseMediaAndCtrlTechText ). Currently JiBX doesn't check that
the name values you supply are actually valid XML names; this is another
thing it
JiBX is designed to use a pull parser in one form or another. When StAX
(the Java standard for XML pull parsers) becomes available in a stable
and redistributable release it'll be easy to add support for that.
Piccolo is a SAX parser (non-pull) parser, so it wouldn't work for JiBX.
- Dennis
Yes, by writing your own code for handling the top-level control of the
parsing. Your code can then handle the parsing in whatever way it wants
until it comes to a portion to be unmarshalled, at which point it can
invoke the JiBX unmarshalling. The versioned marshalling/unmarshalling
example
Whoops, a copy that didn't - the correct URL should be
http://jibx.sourceforge.net/tutorial/binding-extend.html#serdeser
- Dennis
Dennis Sosnoski wrote:
You can write a simple format for java.util.Calendar that handles
the conversion - see the tutorial
http://jobsearch.monster.com/getjob.asp
You're probably in the wrong directory. I'd suggest you first create a
File, then print the full path to that file, before you create the input
stream - or just print it when an error occurs on the open. Something
like this:
File file = new File(f);
FileInputStream fin = null;
try {
fin
Now I'm confused again, Eric. Your example has multiple mar/umars bound
to the same class, which is what creates the problem. Is your point that
you'd like to have multiple names with a single mar/umar? That's
something you can do with a custom mar/umar, but the generated ones
assume a
Your format definition says this serializer/deserializer works with
String values (converts Strings to other Strings, in other words), but
you're actually converting Date values. Because of this JiBX is looking
for methods with the signatures String serializerDate(String date) and
String
How are you configuring your output, and what actual byte values are
written to the output document?
- Dennis
Bao Trang wrote:
In my Java application, I am inserting unicode greek letters into some
of my fields. When I try to marshall to XML, the output is a question
mark ('?') for each
You need to turn off forward reference support to do this, I think. Try
forward=false on your binding element. Of course, that assumes that
you really aren't using forward references in your document. See my
email from earlier today Re: Using IDs for some more discussion of
this issue.
-
I suspect your timer jar includes the data classes that are used by the
binding, since it would need these classes in order to communicate with
the EJBs. It sounds like Weblogic plays some games with the classloading
for the timer and gets the class files from different places depending
on
model = (Project) obj;
}
On Sat, 23 Oct 2004 13:10:31 -0700, Dennis Sosnoski [EMAIL PROTECTED] wrote:
How are you configuring your output, and what actual byte values are
written to the output document?
- Dennis
Bao Trang wrote:
In my Java application, I am inserting unicode greek
iter-method=getInstalledHardwareIterator
But I have bigger problems with Hibernate
Dennis Sosnoski wrote:
You need to turn off forward reference support to do this, I think.
Try forward=false on your binding element. Of course, that
assumes that you really aren't using forward references
When you scatter the components of an object in this way the current
code will create a new instance of the object each time you get to one.
A workaround is to use a factory-method with a signature like: public
static ObjectClass childFactory(Object obj) It'll be called with the
containing
That's probably the problem. The WS-I Basic Profile says the child
elements of SOAP:Fault must not be namespace-qualified, and I've tried
to follow the BP in all cases.
- Dennis
Andrew Butchart wrote:
Hi,
I using SOAPClient to talk to a webservice. When the webservice sends
back a soap
Tanya Dudka wrote:
Thank you for answer my questions. I did as you say :
public DOMImplementation impl = SVGDOMImplementation.getDOMImplementation();
public String svgNS = SVGDOMImplementation.SVG_NAMESPACE_URI;
protected Document m_document;
...
m_document =
The XDoclet stuff is something I haven't really pursued, partially
because I've gotten to see data binding as an aspect that you apply to
your program rather than something that should be integrated into the
code. I know people have different approaches on this type of thing,
though, and if
Hi Jules,
TypedArrayMapper isn't supposed to require you to use the name, and if
used without a name as in your original binding it should be able to
handle things properly. I think it's broken, though, as your experience
would indicate. :-( If you look at the code the TypedArrayMapper
, then the
boolean never gets set.
I'm just curious as to why post-set doesn't work in this instance. Is
there a reason for this?
On Thu, 11 Nov 2004 19:59:00 -0800, Dennis Sosnoski [EMAIL PROTECTED] wrote:
Beet wrote:
I have a XML element, 'Worksheet,' which consists entirely of optional
structures.
In my
=MaxKG field=maxKGPerBatch/
/structure
...
it doesn't matter what I put into postset because it doesn't ever
get called. I've run a debugger and it never stops in that method.
On Fri, 12 Nov 2004 10:58:50 -0800, Dennis Sosnoski [EMAIL PROTECTED] wrote:
It's probably best if you can show an example
Hi Yogesh,
I'd be very surprised if this is an error in the XPP code, since it's a
situation that comes up fairly often.
It looks like you're using the same XML and schema as in your previous
email. Here's that XML:
testJibx:Response xmlns:testJibx=http://test.jibx.namespace;
It's difficult to say the best approach based on just this interface. It
sounds like you want to dynamically decide what type of INode object to
create when you're unmarshalling (presumably based on the attributes of
the element), and for this a custom marshaller/unmarshaller is probably
your
/hibernate2.jar/
/bind
/target
On Jun 28, 2004, at 1:49 AM, Dennis Sosnoski wrote:
Are you using the Ant task for doing the binding? This could be a
side effect of Ant using '/' for file paths, even on Windows. JiBX
tries to split off the file name from the directory path, but it
has
I've used recursive structures without a problem. From the error message
it looks like you've got an Expression element in the XML, which is
not defined by the binding. What's your actual XML document?
- Dennis
Reiner Nix wrote:
Hi,
I'd like to implement a flexible configuration which uses
The current handling in the code is actually more flexible than the
description states. You might be able to use two levels of abstract
mapping in the case you describe. All I can suggest is you try it to see
if it works for your case.
I'm trying to clean this up and make it much more flexible
I'm back from travels (see the Javapolis conference at
http://wiki.javapolis.com/ - my slide presentations are available from
the slides page, and videos converted to flash files should be available
sometime next month) and back to the mail stack. Sorry for the
long-delayed reply on this one.
Falk Langhammer wrote:
Dennis Sosnoski wrote:
It looks like my test cases don't use the combination of elements
with default namespaces+attributes not in any namespace. The test
cases I *do* use currently are in build/test/extras of the
distribution (contact0.xml, contact1.xml, contact2.xml
I don't see any problem with doing what you described, though you'd
probably be better off making the values booleans in the case you show.
Basically you just define an optional value component of B for each
flag, then provide the get and set methods.
- Dennis
Tchavdar Ivanov wrote:
Hi,
is
The JiBX exception doesn't appear to be due to a problem with the
document as such, but perhaps in your actual binding. If you can copy
the portion of your binding that relates to the dataroot element,
along with more of the exception stack trace, I can probably give you a
more detailed
1 - 100 of 757 matches
Mail list logo