You could try something like this: Serializer foo = GetBuddiesResponse.getSerializer("ignored", GetBuddiesResponse.class, new QName("http://my.nice.namespace", "GetBuddiesResponse")); final StringWriter stringWriter = new StringWriter(); foo.serialize(null, null, value, new SerializationContext(stringWriter)); System.out.println(stringWriter.getBuffer().toString());
Where GetBuddiesResponse is one of the Axis-generated objects. There are static methods on each one to get a Serializer and a Deserializer. I'm sure I'm passing a null or two where I oughtn't -- I didn't run the code. But it should give you something in XML on the client with a little tweaking. There's probably a more direct way of doing it going through some clever API, but maybe this will spark something for you :) Chris -----Original Message----- From: Andy Foster [mailto:[EMAIL PROTECTED] Sent: Friday, November 11, 2005 15:11 To: axis-user@ws.apache.org Subject: converting stubs to XML Hi all, I'm at my last chance now, so if someone can help that would be great else I'm going to have to hand code XML output. If you use WSDL2JAVA to generate stubs and call them you get a java response object back that represents the XML response I need to get that response back into XML not the stub java representation. I know axis can re serialise for me I just do not know how to invoke it Please help as I have been searching for two days now and my boss is giving me the weekend and then we have to find another way to hand crank it which would be a very poor solution Andy