You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by "Organic Inc." <ho...@organic.com> on 2001/02/02 23:24:10 UTC
Your mail to Organic Inc.
Hello,
Thank you for your message addressed to an Organic, Inc. address. The addressee is no longer working with Organic. Your message is being returned to you unopened and unread. We encourage you to reroute your message to another Organic employee.
http://www.organic.com/
**********************************************************************
NOTE:
If this is going to a listserv of any type, please take note of the
the e-mail address and remove it from your list.
**********************************************************************
For convenience, the body of your original email is included below...
-----------------------------------------------------------------------------
*** Reminder ***
To: soap-user@xml.apache.org
Cc:
Date: Fri, 2 Feb 2001 17:23:23 -0500 (EST)
Subject: Re: Return XML for a SOAP function.
I modified my code to use literal XML encoding and got following error with
Soap 2.0:
Exception in thread "main" [SOAPException: faultCode=SOAP-ENV:Client; msg=I
only know how to serialize an 'org.w3c.dom.Element'.;
targetException=java.lang.IllegalArgumentException: I only know how to
serialize an 'org.w3c.dom.Element'.]
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Exception.java:42)
at org.apache.soap.SOAPException.<init>(SOAPException.java:71)
at org.apache.soap.SOAPException.<init>(SOAPException.java:77)
at
org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnection.java:115)
at org.apache.soap.rpc.Call.invoke(Call.java:145)
at helloWorld.main(helloWorld.java:29)
With Soap 2.1rc, I got:
Exception in thread "main" java.lang.NoClassDefFoundError:
javax/mail/MessagingException
at helloWorld.main(helloWorld.java:20)
BTW, I'm using Java 1.2.2 under Solaris. Any clue?
Thanks,
Sunny.
------Original Message------
From: "Sanjiva Weerawarana" <sa...@watson.ibm.com>
To: <so...@xml.apache.org>
Sent: January 30, 2001 6:12:22 AM GMT
Subject: Re: Return XML for a SOAP function.
Since you're doing RPC, yes, Apache SOAP will read embedded XML
as an encoded value and try to decode it. If you want it to be
treated as XML and left alone, then you need to use the literal
XML encoding style and have the sender indicate it as such to
be able to read the response correctly.
The other option of course is to go below the covers and read
the response yourself.
Sanjiva.
----- Original Message -----
From: "Guang Yang" <su...@mail.com>
To: <so...@xml.apache.org>
Sent: Monday, January 29, 2001 7:07 PM
Subject: RE: Return XML for a SOAP function.
> It does not work. I am wondering if Apache will parse what returns inside
> the SOAP "<return>" tag.
>
> Thanks,
> Sunny.
>
> ------Original Message------
> From: "Gus Delgado" <gu...@netquotient.com>
> To: <so...@xml.apache.org>
> Sent: January 29, 2001 7:47:59 PM GMT
> Subject: RE: Return XML for a SOAP function.
>
>
> have you tried to cast the result into a String?
> Response resp = call.invoke(url, "");
> Parameter result = resp.getReturnValue();
> String a = (String)result.getValue();
> System.out.println(a);
>
>
> -----Original Message-----
> From: Guang Yang [mailto:sunlight_yang@mail.com]
> Sent: Monday, January 29, 2001 11:59 AM
> To: soap-user@xml.apache.org
> Subject: RE: Return XML for a SOAP function.
>
>
> Gus,
>
> Thanks for your quick reply. However, I am not sure I understand what you
> said.
>
> The scenario I had is as follows:
>
> I wrote a very simple client and server with one function defined. It
> returns a string. If server returns "hello, world", there is no problem at
> client. It prints the value by following code:
>
> Response resp = call.invoke(url, "");
> Parameter result = resp.getReturnValue();
> System.out.println(result.getValue());
>
> However, if the server returns sth like
> "<xmltag>blah..</xmltag>" as the result of the function. Nothing prints.
>
> The type of "result.getValue()" is "Object". Could I be able to convert it
> to String? What you suggested is after I got the string from result.
>
> Thanks,
> Sunny.
>
>
> ------Original Message------
> From: "Gus Delgado" <gu...@netquotient.com>
> To: <so...@xml.apache.org>
> Sent: January 29, 2001 3:22:55 PM GMT
> Subject: RE: Return XML for a SOAP function.
>
>
> once the string is in your client
> do this:
> char[] payload = yourString.toCharArray();
> XMLParserLiaison xpl = new XercesParserLiaison ();
> Document callDoc =
> xpl.read("- SOAP HTTP RPC XML -", new CharArrayReader(payload));
> Element rootEl = callDoc.getDocumentElement ();
>
> that you convert your string to something useful.
>
> -----Original Message-----
> From: Guang Yang [mailto:sunlight_yang@mail.com]
> Sent: Monday, January 29, 2001 9:15 AM
> To: soap-user@xml.apache.org
> Subject: Return XML for a SOAP function.
>
>
> I am using MS tookit on server side to return a XML document as a string.
It
> did return the XML. I verified by using TcpTunnelGui. However, the client
> side Apache Soap returns nothing.
>
> I am wondering if the XML document confuse the deserilizer or what should
I
> do at client side.
>
> Thanks in advance.
> Sunny.
>
>
> ______________________________________________
> FREE Personalized Email at Mail.com
> Sign up at http://www.mail.com/?sr=signup
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org
>
>
> ______________________________________________
> FREE Personalized Email at Mail.com
> Sign up at http://www.mail.com/?sr=signup
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org
>
>
> ______________________________________________
> FREE Personalized Email at Mail.com
> Sign up at http://www.mail.com/?sr=signup
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org
______________________________________________
FREE Personalized Email at Mail.com
Sign up at http://www.mail.com/?sr=signup
---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org