Friends
   
  Got another question .. .
   
  When I marshall my object it produces:
   
  <?xml version="1.0" encoding="UTF-8"?>
  <CmdRequestBody xmlns="http://www.abc.com/schema/2003/01/frontend/command";>
  <CmdRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";  
name="GetStatus" xsi:type="GetCommandStatusCmdType">
  <ns1:percentComplete 
xmlns:ns1="http://www.abc.com/schema/2003/01/frontend/command/progressindicator";>90</ns1:percentComplete>
  </CmdRequest>
  </CmdRequestBody>
   
  And when I UNMARSHALL, it complains "unable to find FieldDescriptor for 
'percentComplete' in ClassDescriptor of BaseCmdRequestType{File: [not 
available]; line: 4; column: 105}"
   
  How can I make Castor to generate XML like (because this get unmarshalled 
neatly)
  <?xml version="1.0" encoding="UTF-8"?>
  <CmdRequestBody 
xmlns:pid="http://www.abc.com/schema/2003/01/frontend/command/progressindicator";
 xmlns="http://www.abc.com/schema/2003/01/frontend/command";>
  <CmdRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
name="GetStatus" xsi:type="pid:GetCommandStatusCmdType">
  <pid:percentComplete>90</pid:percentComplete>
  </CmdRequest>
  </CmdRequestBody>
   
   
  Nutshell, 
  1. the foreign namespace (pid) should be on top
  2. xsi:type should have the namespace prefix (pid).
  3. I dont want to call
   
  
marshaller.setNamespaceMapping("pid","http://www.abc.com/schema/2003/01/frontend/command/progressindicator";);
   
  I simply want to call unmarshall/marshall methods generated with the Castor 
generated classes
   
  I would much appreciate your help.
   
  -Praveen

Reply via email to