axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pobzeb Armerding <pobzeb.armerd...@vanns.net>
Subject Re: converting stubs to XML
Date Sat, 12 Nov 2005 00:34:41 GMT
Hey, guess what?  That does not work after all!  I guess that I hadn't ever tried to access
the call object from my client.  Instead, look in the SOAPInterfaceStub.java file for the
call object and the invoke method that you want to get the response XML for.  Then, Use the
code that I had posted in my last email, but replace:

((SOAPInterfaceStub)service)._getCall()

with 

_call

So it would look like this:

java.lang.Object _resp = _call.invoke(new java.lang.Object[] {Param 1, Param 2, Ect.});
try
    	{
    	java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream();
    	_call.getMessageContext().getMessage().writeTo(baos);
    	String XMLContents = new java.lang.String(baos.toByteArray(), "UTF-8");
    	System.out.println(XMLContents);
    	}
    catch (Exception e)
    	{
    	}


This one should work (I tested it and it worked for me), but then again...

Pobzeb Armerding
Vann's Inc.
Software Engineer

On Fri, 11 Nov 2005 17:19:26 -0700, Pobzeb Armerding wrote:
| ((SOAPInterfaceStub)service)._getCall().getMessageContext().getMessage
| ().writeTo(baos); String XMLContents = new
| String(baos.toByteArray(), "UTF-8");

Mime
View raw message