Hi,
I am trying to unmarshall the following document. However, new namespaces
are being added to it.
<CreateItemRequest
xmlns=\"
http://www.ibm.com/xmlns/db2/cm/beans/1.0/schema\">
<AuthenticationData >
<ServerDef>
<ServerType>ICM</ServerType>
<ServerName>ICMNLSDB</ServerName>
</ServerDef>
<LoginData>
<UserID>pm</UserID>
<Password>pm</Password>
</LoginData>
</AuthenticationData>
<Item>
<ItemXML>
<somedata >
<someonedata >gdsakfgadsfg</someonedata>
</somedata>
</ItemXML>
</Item>
</CreateItemRequest>
the output I get is the following
<CreateItemRequest
xmlns:ns2="
http://www.ibm.com/xmlns/db2/cm/api/1.0/schema"
xmlns="
http://www.ibm.com/xmlns/db2/cm/beans/1.0/schema">
<AuthenticationData>
<ServerDef>
<ServerType>ICM</ServerType>
<ServerName>ICMNLSDB</ServerName>
</ServerDef>
<LoginData>
<UserID>pm</UserID>
<Password>pm</Password>
</LoginData>
</AuthenticationData>
<Item>
<ItemXML>
<somedata>
<someonedata>gdsakfgadsfg</someonedata>
</somedata>
</ItemXML>
</Item>
</CreateItemRequest>
the namespace "xmlns:ns2" is getting added here. I have pasted the
unmarshelling code below.
JAXBContext
JContext=JAXBContext.newInstance("com.ibm.xmlns.db2.cm.api._1_0.schema");
Unmarshaller unmarshaller= JContext.createUnmarshaller();
String request = vdssprocessXMLRequest.getSProcessRequestXML();
InputStream is = new
ByteArrayInputStream(request.getBytes("UTF-8"));
Object obj=unmarshaller.unmarshal(is);
Anyone aware how to solve the problem?
Regards,
Ganesh
--
View this message in context: http://www.nabble.com/Unmarshall-namespace-prefix-problem-tp17181670p17181670.html
Sent from the java.net - jaxb users mailing list archive at Nabble.com.