Dede Ball wrote:
> 
> Hi Keith,
> 
> Excellent, that was my problem.  I'm not sure I understand the difference
> between setting type="java.lang.String" and type="string".  I thought the
> two were synonymous based upon my understanding of the documentation.  Can
> you explain?
> 

Yes...they are equal...I just like to use "string" because it's shorter.

--Keith

> 
> Keith Visco wrote:
> 
> > Hi Dede,
> >
> > Based on the XML fragment you sent CityCode should be an element with
> > type equals string:
> >
> > change:
> >
> > > >            <field name="CityCode"
> > > >                   type="java.lang.String">
> > > >                    <bind-xml name="citycode" node="text"/>
> > > >            </field>
> >
> > to:
> >
> > > >            <field name="CityCode" type="string">
> > > >                    <bind-xml name="citycode" node="element"/>
> > > >            </field>
> >
> > --Keith
> >
> > Dede Ball wrote:
> > >
> > > Sorry, forgot to include the XML file used as input.  Here it is:
> > >
> > > <?xml version="1.0" ?>
> > > <weather>
> > > <timestamp zone="EMT">12/18/2001 16:21</timestamp>
> > > <current>
> > >     <citycode>92152</citycode>
> > >     <day>
> > >         <name>Today</name>
> > >         <conditions wxcode="38">M/CLOUDY</conditions>
> > >         <temperature unit="F">47</temperature>
> > >         <apparent_temperature unit="F">49</apparent_temperature>
> > >         <wind_chill_temperature unit="F">45</wind_chill_temperature>
> > >         <humidity unit="%">65</humidity>
> > >         <pressure unit="INHG">29.96</pressure>
> > >         <windspeed unit="MPH">4</windspeed>
> > >         <wind_from>W</wind_from>
> > >         <visibility unit="MI">10</visibility>
> > >     </day>
> > > </current>
> > > </weather>
> > >
> > > Dede Ball wrote:
> > >
> > > > Hi,
> > > >
> > > > Does anyone have an experience with an error like this?  I expect it
> > > > is a result of a problem with my mapping file.  Thanks in advance.
> > > >
> > > > Here's the error:
> > > >
> > > > org.xml.sax.SAXException: unable to find FieldDescriptor for
> > > > 'citycode' in ClassDescriptor of
> > > >  current at java.lang.Throwable.fillInStackTrace(Native Method) at
> > > >  java.lang.Throwable.fillInStackTrace(Compiled Code) at
> > > > java.lang.Throwable.(Compiled
> > > >  Code) at java.lang.Exception.(Compiled Code) at
> > > >  org.xml.sax.SAXException.(SAXException.java:38) at
> > > >  org.exolab.castor.xml.UnmarshalHandler.startElement(Compiled Code)
> > > > at
> > > >  org.apache.xerces.parsers.SAXParser.startElement(Compiled Code) at
> > > >  org.apache.xerces.validators.common.XMLValidator.callStartElement(
> > > > ompiled Code) at
> > > >  org.apache.xerc
> > > > s.framework.XMLDocumentScanner$ContentDispatcher.dispatch(Compiled
> > > >  Code) at
> > > > org.apache.xerces.framework.XMLDocumentScanner.parseSome(Compiled
> > > > Code)
> > > >  at org.apache.xerces.framework.XMLParser.parse(Compiled Code) at
> > > >  org.exolab.castor.xml.Unmarshaller.unmarshal(Compiled Code) at
> > > >  org.mitre.acis.portal.weather.weatherProvider.getContent(weath
> > > > rProvider.java:139) at
> > > >  com.iplanet.portalserver.desktop.ProviderCaller.run(Compiled Code)
> > > >
> > > >
> > > > Here's the pertinent fragment of my mapping file:
> > > >
> > > > <?xml version="1.0"?>
> > > >
> > > > <mapping>
> > > >       <class name="org.mitre.acis.portal.weather.USCurrentWeather">
> > > >            <map-to xml="weather"/>
> > > >            <field name="TimeStamp"
> > > >                   type="org.mitre.acis.portal.weather.TimeStamp">
> > > >                    <bind-xml name="timestamp" node="element"/>
> > > >            </field>
> > > >            <field name="CurrentCondition"
> > > >
> > > > type="org.mitre.acis.portal.weather.CurrentCondition">
> > > >                    <bind-xml name="current" node="element"/>
> > > >            </field>
> > > >       </class>
> > > >
> > > >       <class name="org.mitre.acis.portal.weather.TimeStamp">
> > > >            <field name="Zone"
> > > >                   type="java.lang.String">
> > > >                    <bind-xml name="zone" node="attribute"/>
> > > >            </field>
> > > >
> > > >            <field name="DateTime"
> > > >                   type="java.lang.String">
> > > >                    <bind-xml name="timestamp" node="text"/>
> > > >            </field>
> > > >       </class>
> > > >
> > > >       <class name="org.mitre.acis.portal.weather.CurrentCondition">
> > > >            <map-to xml="current"/>
> > > >            <field name="CityCode"
> > > >                   type="java.lang.String">
> > > >                    <bind-xml name="citycode" node="text"/>
> > > >            </field>
> > > >       :
> > > >       :
> > > >       :
> > > >      </class>
> > > > </mapping>
> > > >
> > > >
> > > > Here's the pertinent fragment from CurrentCondition.java:
> > > >
> > > > package org.mitre.acis.portal.weather;
> > > >
> > > > import java.util.Vector;
> > > > import java.util.Enumeration;
> > > >
> > > > public class CurrentCondition {
> > > >
> > > >        private String cityCode;
> > > >
> > > >        public void setCityCode(String inCityCode) {
> > > >               cityCode = inCityCode;
> > > >        }
> > > >
> > > >        public String getCityCode() {
> > > >               return cityCode;
> > > >        }
> > > >
> > > >  }
> > > >
> > > >
> >
> > -----------------------------------------------------------
> > If you wish to unsubscribe from this mailing, send mail to
> > [EMAIL PROTECTED] with a subject of:
> >         unsubscribe castor-dev
> 
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
>         unsubscribe castor-dev

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to