Oh, I guess I just answered my own question.  This is what is generated
in the associated "Descriptor" class, right? 

> -----Original Message-----
> From: Karr, David 
> Sent: Saturday, February 24, 2007 9:52 AM
> To: [email protected]
> Subject: RE: [castor-user] How do I control the prefix used 
> for a namespace in the marshalled output?
> 
> The prefix doesn't matter, but I sure wish there was some way 
> the namespace could be retrieved from a logical place, 
> without having to hardcode it here.  The schema in question 
> was already used to generate the code.  I'm surprised it's 
> not available anywhere as a product of the code generation. 
> 
> > -----Original Message-----
> > From: Werner Guttmann [mailto:[EMAIL PROTECTED]
> > Sent: Saturday, February 24, 2007 9:32 AM
> > To: [email protected]
> > Subject: Re: [castor-user] How do I control the prefix used for a 
> > namespace in the marshalled output?
> > 
> > David,
> > 
> > adding the following code to your application after 
> instantiating the 
> > Marshaller instance
> > 
> > marshaller.setNamespaceMapping("questions",
> > "http://schemas.wamu.com/2006/07/RiskRating/Questions";);
> > 
> > should do the trick.
> > 
> > Regards
> > Werner
> > 
> > Karr, David wrote:
> > > In production, I'm currently using v0.9.6, although I'm 
> working on 
> > > upgrading to the latest version (as soon as we decide 
> what that will
> > > be.)
> > > 
> > > I have a schema that starts like this:
> > > 
> > > <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
> > >  
> > > 
> > 
> targetNamespace="http://schemas.wamu.com/2006/07/RiskRating/Questions";
> > >  
> > > 
> > 
> xmlns:questions="http://schemas.wamu.com/2006/07/RiskRating/Questions";
> > >            elementFormDefault="qualified">
> > >   <xs:element name="questionData">
> > >     <xs:complexType>
> > > 
> > > When I marshal my "QuestionData" object to XML, the "questionData"
> > > element starts like this:
> > > 
> > > <questionData
> > > xmlns="http://schemas.wamu.com/2006/07/RiskRating/Questions";
> > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
> > modelVersion="1"
> > > xsi:type="questionData">
> > > 
> > > How do I make it do this instead:
> > > 
> > > <questions:questionData
> > > 
> > 
> xmlns:questions="http://schemas.wamu.com/2006/07/RiskRating/Questions";
> > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
> > modelVersion="1"
> > > xsi:type="questionData">
> > > 
> > > I ask this because of some sort of interop issue with a
> > .NET consumer.
> > > The XMLSerializer class doesn't grok default namespaces 
> in the SOAP 
> > > body child.
> > > 
> > > 
> > 
> ---------------------------------------------------------------------
> > > To unsubscribe from this list please visit:
> > > 
> > >     http://xircles.codehaus.org/manage_email
> > > 
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe from this list please visit:
> > 
> >     http://xircles.codehaus.org/manage_email
> > 
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
> 
>     http://xircles.codehaus.org/manage_email
> 
> 

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to