Ron-

In order to turn namespace processing on, you have to set a property
in the castor.properties file:

org.exolab.castor.parser.namespaces=true

With namespace processing turned on, Castor will look for both a
matching element name and namespace in order to determine the correct
descriptor to use while unmarshalling.  To facilitate the match, if
you use a mapping file, you should use the correct namespaces in the
mapping file for all your elements.  If you use the SourceGenerator, I
believe (I have less experience in that realm) it associates the
target namespace of the schema with the compiled class descriptors.

Let us know if you have further questions.

Stephen


On 3/28/06, Ron Price <[EMAIL PROTECTED]> wrote:
> Hello,
>
> Sorry, just noticed the no html posting note. Here is my post without the 
> html.
>
> Thanks to all who helped make Castor a  very cool very useful tool, it
> is definitely going on my list of great technologies. Now on to my
> question.
>
> I have just begun to work with castor and XML, I'm a little confused
> on how name spaces work with it. I would like to Unmarshall the
> following xml document:
>
>
> <?xml version="1.0" encoding="UTF-8"?>
>   <job xmlns:gram="http://www.globus.org/namespaces/2004/10/gram/job";
>       xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing";>
>      <factoryEndpoint>
>          <wsa:Address>
>              
> https://balancedrock1.chpc.utah.edu:8443/wsrf/services/ManagedJobFactoryService
>          </wsa:Address>
>          <wsa:ReferenceProperties>
>              <gram:ResourceID>PBS</gram:ResourceID>
>          </wsa:ReferenceProperties>
>      </factoryEndpoint>
>
>      <executable>/bin/more</executable>
>      <stdin>${GLOBUS_USER_HOME}/stage_testing/blah.txt</stdin>
>      <stdout>${GLOBUS_USER_HOME}/blahtemp.out</stdout>
>      <stderr>${GLOBUS_USER_HOME}/blah.err</stderr>
>      <fileStageIn>
>          <transfer>
>              
> <sourceUrl>gsiftp://watchman.chpc.utah.edu:2811/uufs/chpc.utah.edu/common/home/rprice/stage_testing/blahsrc.txt</sourceUrl>
>              
> <destinationUrl>file:///${GLOBUS_USER_HOME}/stage_testing/blah.txt</destinationUrl>
>          </transfer>
>      </fileStageIn>
>      <fileStageOut>
>          <transfer>
>              <sourceUrl>file:///${GLOBUS_USER_HOME}/blahtemp.out</sourceUrl>
>              
> <destinationUrl>gsiftp://watchman.chpc.utah.edu:2811/uufs/chpc.utah.edu/common/home/rprice/stage_testing/blah.out</destinationUrl>
>          </transfer>
>      </fileStageOut>
>      <fileCleanUp>
>          <deletion>
>              <file>file:///${GLOBUS_USER_HOME}/test.out</file>
>          </deletion>
>      </fileCleanUp>
>  </job>
>
> Can Castor unmarshall the document above? Is there any examples of
> working with Castor and namespaces?
>
>  Best Regards,
>
>   /ron
>
> -------------------------------------------------
> If you wish to unsubscribe from this list, please
> send an empty message to the following address:
>
> [EMAIL PROTECTED]
> -------------------------------------------------
>
>

Reply via email to