here it is my binding.xml :
<?xml version="1.0" encoding="UTF-8"?>
<binding>
<mapping name="Publication" class="Publication">
<structure name="subscriber" field="subscriber">
<value name="PUBLICATION_CODE" field="PUBLICATION_CODE" />
<value name="FIRST_Name" field="FIRST_Name" />
<value name="LAST_Name" field="LAST_Name" />
<value name="EMAIL_ADDRESS" field="EMAIL_ADDRESS" />
<value name="TELEPHONE_NUMBER" field="TELEPHONE_NUMBER" />
<value name="FAX_NUMBER" field="FAX_NUMBER" />
<value name="ENGLISH_TITLE" field="ENGLISH_TITLE" />
<value name="COMPANY_NAME" field="COMPANY_NAME" />
<value name="DEPARTMENT" field="DEPARTMENT" />
</structure>
<value name="TRANSACTION_CODE" field="TRANSACTION_CODE" />
<value name="PROMO_KEY" field="PROMO_KEY" />
<value name="DELIVERY_ADDRESS_STREET" field="DELIVERY_ADDRESS_STREET" />
<value name="DELIVERY_ADDRESS_CITY" field="DELIVERY_ADDRESS_CITY" />
<value name="DELIVERY_ADDRESS_STATE" field="DELIVERY_ADDRESS_STATE" />
<value name="DELIVERY_ADDRESS_ZIP_CODE" field="DELIVERY_ADDRESS_ZIP_CODE"
/>
<value name="DELIVERY_ADDRESS_COUNTRY" field="DELIVERY_ADDRESS_COUNTRY" />
<value name="stateSOURCESOURCE" field="SOURCE" />
<value name="VERIFICATION_DATE" field="VERIFICATION_DATE" />
<value name="CLASS_OR_PAID_STATUS_OR_SUB_TYPE"
field="CLASS_OR_PAID_STATUS_OR_SUB_TYPE" />
<value name="PERSONAL_ID" field="PERSONAL_ID" />
<value name="DOLLAR_AMOUNT" field="DOLLAR_AMOUNT" />
<value name="ACCOUNT_NUMBER" field="ACCOUNT_NUMBER" />
<value name="TERM" field="TERM" />
<value name="BILL_CODE" field="BILL_CODE" />
<value name="TRANSACTION_DATE" field="TRANSACTION_DATE" />
<value name="GROUP_NUMBER" field="GROUP_NUMBER" />
<value name="MAILING_ADDRESS_CODE" field="MAILING_ADDRESS_CODE" />
<value name="DIGITAL" field="DIGITAL" />
</mapping>
</binding>
On Thu, Jun 12, 2008 at 1:51 PM, Harp, George <[EMAIL PROTECTED]>
wrote:
> What does your binding file look like?
>
>
> ------------------------------
>
> *From:* [EMAIL PROTECTED] [mailto:
> [EMAIL PROTECTED] *On Behalf Of *AD
> *Sent:* Thursday, June 12, 2008 2:45 PM
> *To:* JiBX users
>
> *Subject:* Re: [jibx-users] Jibx Usage - new to Jibx
>
>
>
> My xmllooks like this :
>
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <Publication>
> <Subscriber>
> <ACCTNBR>960767010</ACCTNBR>
> <CURRTRNCD>5S</CURRTRNCD>
> <BILLSTAT />
> <DOLAMT>0.00</DOLAMT>
> <CURPROMKEY />
> <XFIRSTNAME>MARK</XFIRSTNAME>
> <XLASTNAME>RANDALL</XLASTNAME>
>
> </Subscriber>
>
> <COMPANY>SERIOUS MAGIC</COMPANY>
> <ADDR2>101 PARKSHORE DRIVE, SUITE</ADDR2>
> <CITY>FOLSOM</CITY>
> <FORNCNTRY />
> <STAPROV>CA</STAPROV>
> <ZIPCODE>956304726</ZIPCODE>
> <LASTACT>LC5509</LASTACT>
> <CLASS>2</CLASS>
> <PAYSTAT>0</PAYSTAT>
> <SUBTYPE>0</SUBTYPE>
> <MAILADDRCD>1</MAILADDRCD>
> <GRPCODE />
> <PHONENBR>9139858000</PHONENBR>
> <FAXNUMBR>9139858090</FAXNUMBR>
> <ENGTITLE>PRESIDENT</ENGTITLE>
> <PERSONLQ />
> <MEDIACOD />
> </Publication>
>
> On Thu, Jun 12, 2008 at 1:39 PM, AD <[EMAIL PROTECTED]> wrote:
>
> Thanks for reply george .
>
>
>
> In this line : <mapping name="publication" class="Publication">
>
>
>
> you mean the class Publication is not there ?
>
>
>
> i do have compiled class under projectname/classes ..
>
> On Thu, Jun 12, 2008 at 1:24 PM, Harp, George <[EMAIL PROTECTED]>
> wrote:
>
> Look at line 2(column14) in your binding file.
>
> I think it is saying that you have no definition of Publication.
>
>
> ------------------------------
>
> *From:* [EMAIL PROTECTED] [mailto:
> [EMAIL PROTECTED] *On Behalf Of *AD
> *Sent:* Thursday, June 12, 2008 2:22 PM
> *To:* [EMAIL PROTECTED]; JiBX users
> *Subject:* Re: [jibx-users] Jibx Usage - new to Jibx
>
>
>
> hello
>
>
>
> I am getting this error :
>
>
>
> org.jibx.runtime.JiBXException: No unmarshaller for element "Publication"
> (line 2, col 14)
> at
> org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(UnmarshallingContext.java:2534)
> at
> org.jibx.runtime.impl.UnmarshallingContext.unmarshalDocument(UnmarshallingContext.java:2680)
> at Test.main(Test.java:34)
>
>
>
>
>
>
>
> not sure why it is giving me this error . I have the mapping , binding
> everything workin ok ..any inputs will be highly appreciated .
>
>
>
> Thanks
>
> -Ajay
>
> On Tue, Jun 10, 2008 at 7:33 AM, AD <[EMAIL PROTECTED]> wrote:
>
> Thanks for responding
>
>
>
>
>
> I added the classpath entry and imported the required classes ...but still
> it says : i am I missing something here ?
>
>
>
> IBindingFactory cannot be resolved to a type
> BindingDirectory cannot be resolved
> IUnmarshallingContext cannot be resolved to a type
> JiBXException cannot be resolved to a type
> e cannot be resolved
>
> On Tue, Jun 10, 2008 at 12:16 AM, Varghese C V <[EMAIL PROTECTED]>
> wrote:
>
> It looks like you have dont have jibx-run.jar in your classpath
>
>
> Ajay Deshpande wrote:
> > Hello
> >
> > My source code looks like this : ..When i try to compile : It gives me
> > an error saying :
> >
> > IBindingFactory cannot be resolved to a type
> > BindingDirectory cannot be resolved
> > IUnmarshallingContext cannot be resolved to a type
> > JiBXException cannot be resolved to a type
> > e cannot be resolved
> >
> > How do i declare the BindingDirectory ..so that i can compile
> > succesfullY ?
> >
> > Inputs will be highly appreciated .
> >
> > import org.jibx.runtime.BindingDirectory;
> > import org.jibx.runtime.IBindingFactory;
> > import org.jibx.runtime.IMarshallingContext;
> > import org.jibx.runtime.IUnmarshallingContext;
> >
> > import java.io.FileNotFoundException;
> > public class Test
> > {
> >
> > //Unmarshall the sample document from a file
> > public static void main(String[] args)
> > {
> > if (args.length < 2)
> > {
> > System.out.println("Usage: java -cp ... " + "org.jibx.starter.Test
> > input-file output-file");
> > System.exit(0);
> > }
> > try
> > {
> > IBindingFactory bfact =
> > BindingDirectory.getFactory(Publication.class);
> > // unmarshal information from file
> > IUnmarshallingContext uctx =
> > bfact.createUnmarshallingContext();
> > //FileInputStream in = new FileInputStream(args[0]);
> > //Object obj = uctx.unmarshalDocument(new
> > FileInputStream("data.xml"), null);
> > Publication publication =
> > (Publication)uctx.unmarshalDocument("data.xml", null);
> >
> > // we can add code here to alter the unmarshalled question
> > }
> > catch (FileNotFoundException e)
> > {
> > e.printStackTrace();
> > System.exit(1);
> > }
> > catch (JiBXException e)
> > {
> > e.printStackTrace();
> > System.exit(1);
> > }
> > }
> > }
>
> > ------------------------------------------------------------------------
> >
> > -------------------------------------------------------------------------
> > Check out the new SourceForge.net Marketplace.
> > It's the best place to buy or sell services for
> > just about anything Open Source.
> > http://sourceforge.net/services/buy/index.php
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > jibx-users mailing list
> > jibx-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/jibx-users
> >
>
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> jibx-users mailing list
> jibx-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jibx-users
>
>
>
>
> ------------------------------
>
> The information contained in this communication may be CONFIDENTIAL and is
> intended only for the use of the recipient(s) named above. If you are not
> the intended recipient, you are hereby notified that any dissemination,
> distribution, or copying of this communication, or any of its contents, is
> strictly prohibited. If you have received this communication in error,
> please notify the sender and delete/destroy the original message and any
> copy of it from your computer or paper files.
>
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> jibx-users mailing list
> jibx-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jibx-users
>
>
>
>
>
> ------------------------------
> The information contained in this communication may be CONFIDENTIAL and is
> intended only for the use of the recipient(s) named above. If you are not
> the intended recipient, you are hereby notified that any dissemination,
> distribution, or copying of this communication, or any of its contents, is
> strictly prohibited. If you have received this communication in error,
> please notify the sender and delete/destroy the original message and any
> copy of it from your computer or paper files.
>
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> jibx-users mailing list
> jibx-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jibx-users
>
>
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users