Java Mailing List Archive

Home » user.castor »

[castor-user] issues with setting the default name space

Priya B


Replies: Find Java Web Hosting

Author LoginPost Reply
Below are the first few lines of the xml I get and the mapping. I do not understand why I am getting the empty tag for xmlns, however the other namespaces come fine.

XML File :

<ClinicalDocument xmlns:voc="urn:hl7-org:v3/voc" xmlns:xsi="" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd" xmlns="">
  <typeId root="2.16.840.1.113883.1.3" extension="POCD_HD000040" /> 

Mapping File:

   <class name="">
    <map-to xml="ClinicalDocument" xmlns:xsi="" 
         xsi:schemaLocation="urn:hl7-org:v3 infrastructure/cda/CDA.xsd" 
    <field name="typeId" type="org.telligen.patientsafety.model.TypeId">
            <bind-xml name="typeId"/>

In my code to marshal I do Marshaller m = new Marshaller(), m.setNameSpace..("voc", "urn:hl7-org:v3/voc"); setNameSpace..("","urn:hl7-org:v3/voc");
I am expecting the output xml to have the namespace xmlns="urn:hl7-org:v3/voc" but I get xmlns="" but get rest of the declaration. Not sure what am I doing wrong?
©2008 - Jax Systems, LLC, U.S.A.