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
��1 0 / 1 6 / 2 0 0 2 0 9 : 2 8 : 5 9 T h e o r i g i n a l a t t a c h m e n t t e s t . b a t o r m e s s a g e c o n t e n t s w e r e b l o c k e d d u e t o b l o c k i n g r u l e s . T h e a n t i v i r u s s e r v i c e t o o k t h e M o v e d a c t i o n .
soap.xsd
Description: Binary data
InvoiceTest.java
Description: Binary data
