Hi Arnaud,

You can easily reproduce the problem by modifying the SourceGenerator
example in the following way (I have attached the relevant files):
- put soap.xsd under examples/SourceGenerator
- set the javaclassmapping property to "type" in castorbuilder.properties
- modify test.bat so that it generates classes for soap.xsd as well
- modify InvoiceTest.java to build and marshal a basic soap <body> element
- run test.bat

Please let us know of any work-around,

Thank you

Vincent

-----Original Message-----
From: Arnaud Blandin [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 15, 2002 6:54 PM
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] namespace problem marshalling SOAP and stuff


Hi,

It seems that you are right the airAvailability should be prefixed by
ns1, is it a recurring behavior? I mean have you noticed this bug in
other situation and do you have an as small as possible test case that
can illustrate the problem?

Arnaud

> -----Original Message-----
> From: James Carnegie [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, October 15, 2002 6:36 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [castor-dev] namespace problem marshalling SOAP and
> stuff
> 
> Thanks a lot Vincent, I shall give that a go. I was not aware that I
> could customize the use of namespace prefixes and
> default namespaces used in the Marshaller output.
> I was wondering about the <airAvailability> element myself, but
> thought
> it less
> worrying than than the rest. Thanks a lot.
> James.
> 
> >Hi James and all,
> >
> >I you can customize the use of namespace prefixes and
> >default namespaces used in the Marshaller output with
> >Marshaller.setNamespaceMapping(String prefix, String uri)
> >possibly using "" as prefix for specifying default name space.
> >However the generated XML must reflect namespace mappings in
> >one way or another, and you might want to merge or import your
> >schemas into a single namespace if this is more convenient for you.
> >
> >What is bothering me a bit more is that the <airAvailability>
> >element is in the soap namespace, while it should be in the
> >ns1 namespace. I am currently running into the exact same
> >problem and suspect this might be a bug in the Marshaller.
> >
> >Any thoughts Castor people ?
> >
> >Thanks,
> >
> >Vincent
> >
> >
> >-----Original Message-----
> >From: James Carnegie [mailto:[EMAIL PROTECTED]]
> >Sent: Tuesday, October 15, 2002 6:02 PM
> >To: [EMAIL PROTECTED]
> >Subject: [castor-dev] namespace problem marshalling SOAP and stuff
> >
> >
> >Hello again,
> >
> >I have 3 schemas (or is it shemata?). One for SOAP, one for
> >body of the SOAP wrapper and the third is used within the second.
> >
> >All schemas have different default namespaces.
> >
> >When Marshalling a SOAP Envelope containing objects as
> >data-bound by the schemas described above, I get the following
> >xml with some generated
> >namespaces:
> >
> >
> ><Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/";>
> >     <Body>
> >             <airAvailability xsi:type="airAvailability"
> >xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
> >                     <ns1:data
> >xmlns:ns1="http://www.xmltravel.com/AtineraSoapWrapper";>
> >                             <ns1:OTA_AirAvailRS Target="Production">
> >                                     <ns2:Errors
> >xmlns:ns2="http://www.opentravel.org/OTA/2002/08";>
> >                                             <ns2:Error
> >Type="00000003" ShortText="No availability"/>
> >                                     </ns2:Errors>
> >                             </ns1:OTA_AirAvailRS>
> >                             <ns1:OTA_AirAvailRS Target="Production">
> >                                     <ns3:Errors
> >xmlns:ns3="http://www.opentravel.org/OTA/2002/08";>
> >                                             <ns3:Error
> >Type="00000003" ShortText="No availability"/>
> >                                     </ns3:Errors>
> >                             </ns1:OTA_AirAvailRS>
> >                     </ns1:data>
> >             </airAvailability>
> >     </Body>
> ></Envelope>
> >
> >
> >Envelope/Body is generated from the SOAP schema
> >
> >airAvailability/data is generatoed from the second schema with
> >references to the third
> >
> >OTA_AirAvailRS is generated from the third schema.
> >
> >Why are the namespaces ns1, ns2 and ns3 generated?
> >Can I stop castor generating those namespace identifiers?
> >If not, how should I change my schemas to stop this happening?
> >
> >I would appreciate any help with this.
> >TIA,
> >
> >
> >James
> >
> >-----------------------------------------------------------
> >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

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

��10/16/2002 09:28:59 The original 
attachment test.bat or message contents 
were blocked due to blocking rules.  The 
antivirus service took the Moved action.

Attachment: soap.xsd
Description: Binary data

Attachment: InvoiceTest.java
Description: Binary data

Reply via email to