Hi Bill,

Castor does try to use the correct Schema type when available, but I
think that it's currently only working for complexTypes and not
simpleTypes.

I'll look into it further.

Thanks,

--Keith 

> Bill Simons wrote:
> 
> We had a similar issue that I posted about about two weeks ago and I'm
> glad to see that its been worked out.  Our problem, however, is that
> we do want the xsi:type, it just has to have the correct value, i.e.
> "string" instead of java:java.lang.String.  The problem seems to be
> that Castor does not convert back to XML-native types when they are
> available.
> 
> Thanks,
> Bill
> 
> -----Original Message-----
> From: Keith Visco [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, September 17, 2002 1:14 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [castor-dev] Unwanted xsi:type on generated message from
> Marshaller
> 
> I've added the ability to suppress the xsi:type attribute. You'll need
> 
> to use the CVS version to get the feature however.
> 
> Simply use:
> 
> myMarshaller.setSuppressXSIType(true);
> 
> Be careful however, if you do suppress the xsi:type attribute you
> might
> not be able to unmarshal the document.
> 
> Information about our CVS server is here:
> 
> http://castor.exolab.org/cvs.html#Anonymous-Access
> 
> --Keith
> 
> [EMAIL PROTECTED] wrote:
> >
> > Hi,
> >
> > Im using a custom FieldHandler to format fields generated in a
> specific
> > manner. However, when I use the marshaller, I get an xsi:type on the
> 
> > message that we're going to send to a client.  Is there any way to
> remove
> > this xsi:type
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <Fund xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
> >      <Event>
> >        <balance
> xsi:type="java:java.lang.String">614013.96332</balance>
> >      </Event>
> > </Fund>
> >
> > when, what I actually want is  :
> > <?xml version="1.0" encoding="UTF-8"?>
> > <Fund>
> >      <Event>
> >        <balance>614013.96332</balance>
> >      </Event>
> > </Fund>
> >
> > Ive managed to put the namespace at the root, rather than on every
> element
> > as discussed on this group by doing the following :
> >
> >                Mapping mapping = new
> Mapping(this.getClass().getClassLoader
> > ());
> >                mapping.loadMapping ("mapping.xml");
> >                Marshaller marshaller = new Marshaller(sWriter);
> >                marshaller.setMapping(mapping);
> >                marshaller.setNSPrefixAtRoot(true);
> >                marshaller.setMarshalExtendedType(false);
> >                marshaller.setNamespaceMapping("xsi",
> > "http://www.w3.org/2001/XMLSchema-instance";);
> >                marshaller.marshal(fund);
> >
> > But I want to get rid of the type attribute altogether.
> >
> > Help,
> >
> > Nitin
> >
> > This communication is for informational purposes only.  It is not
> intended as
> > an offer or solicitation for the purchase or sale of any financial
> instrument
> > or as an official confirmation of any transaction. All market
> prices, data
> > and other information are not warranted as to completeness or
> accuracy and
> > are subject to change without notice. Any comments or statements
> made herein
> > do not necessarily reflect those of J.P. Morgan Chase & Co., its
> > subsidiaries and affiliates.
> >
> > -----------------------------------------------------------
> > 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