Hallo Axis Users / Developers I am using the Axis 1.1 to Deserialize a XML String , which was serialized during deployment using Axis 1.1 (BeanSerializer). And in order to check some of the VO's attributes and their values. I am including a part of the code which i have been trying to get the VO back from a deserilization of XML. But i receive a Null Pointer Exception at Line 17.
A Small part of my code makes it clear about Ser / Deserialization : 1. public static Object deserializeAxisObject(final Object obj, String data, MessageContext context, 2. final boolean removeNamespaces, final boolean prettyPrint) throws Exception 3. { 4. // org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(OffersRequest.class); 5. javax.xml.namespace.QName qname = new javax.xml.namespace.QName("TPSoap", "OffersRequest"); 6. Object Value = null; 7. // QName qname = typeDesc.getXmlType(); 8. String lname = qname.getLocalPart(); 9. if (lname.startsWith(">") && lname.length() > 1) 10. lname = lname.substring(1); 11. 12. qname = removeNamespaces ? new QName(lname) : new QName(qname.getNamespaceURI(), lname); 13. final AxisServer server = new AxisServer(); 14. final DeserializationContextImpl ctx = new DeserializationContextImpl(new org.xml.sax.InputSource( 15. new StringReader(data)), new MessageContext(server), Message.REQUEST); 16. // to check from here ja. 17. final Deserializer deser = ctx.getDeserializer(obj.getClass(), qname); 18. try 19. { 20. Value = deser.getValue(); 21. } 22. catch (final Exception e) 23. { 24. throw new Exception("Unable to deserialize object " + obj.getClass().getName(), e); 25. } 26. if (removeNamespaces) 27. { 28. } 29. return (Value); 30. } On calling this method, i receive a null pointer exception and then i had Debug the whole using an Eclipse Webservices Editor and full loaded JBoss App Server running on my machine. What i found out is that i get a null value on return line 17. which i am still unable to solve. Please let me know if have missed something or have written the code wrong. Shall be thanks if anyone can guide me / send me some samples. Thanks. Mit freundlichen Grüßen / Kind Regards, Sreenivas K. Mangasandra Amadeus Germany GmbH Marienbader Platz 1 61348 Bad Homburg [EMAIL PROTECTED] http://www.de.amadeus.com