Hi,

I think I've missed something somewhere.

I have a class called XmlPaymentCard, which just has String attributes.  I have 
another class, called XmlAccountTransaction, which has an attribute of type 
XmlPaymentCard, plus some others (Strings, Dates, Doubles).  All attributes have get 
and set methods, so there is a set method that takes a parameter of type 
XmlPaymentClass, and a get method that returns an XmlPaymentClass instance.

I can do the binding compile for XmlPaymentCard, but when I come to do it for 
XmlAccountTransaction, I get:

[bind] org.jibx.runtime.JiBXException: No deserializer for 
com.pancredit.gateway.base.classes.XmlPaymentCard; define deserializer or constructor 
from java.lang.String
     [bind] at 
org.jibx.binding.def.ObjectStringConversion.genFromText(ObjectStringConversion.java:188)
     [bind] at 
org.jibx.binding.def.ObjectStringConversion.genParseRequired(ObjectStringConversion.java:242)
     [bind] at org.jibx.binding.def.ValueChild.genUnmarshal(ValueChild.java:423)

Not sure I understand, cos I've just done the binding for that one.  Ant code is:

<bind binding="${product.etc}/jibx/classes/XmlPaymentCard.xml" verbose="true">
      <classpath>
        <pathelement location="${product.build}" />
        <fileset dir="${product.lib}" includes="*.jar" />
      </classpath>
    </bind>
   
    <bind binding="${product.etc}/jibx/classes/XmlAccountTransaction.xml" 
verbose="true">
      <classpath>
        <pathelement location="${product.build}" />
        <fileset dir="${product.lib}" includes="*.jar" />
      </classpath>
    </bind>

The binding for the XmlPaymentCard attribute in XmlAccountTransaction is just the same 
as any other attribute:

-snip-
 <value name="OperatorCode" field="operatorCode"/>
    <value name="PayingInReference" field="payingInReference"/>
    <value name="PaymentCard" field="paymentCard"/>
    <value name="ReceiptChequeAccountNumber" field="receiptChequeAccountNumber"/>
    <value name="ReceiptChequeAccountSortCode" field="receiptChequeAccountSortCode"/>
-snip-

Any thoughts would be gatefully received.

Also, I have a package with over a 100 classes in, where many reference each other in 
the same way as decribed above.  Is there any easy way to compile bindings for them 
all without having to do them in a specific order?  I'd like to just use a 
<bindingfileset>

Ta,

Tim.







-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
jibx-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to