Thanks for the comprehensive reply Scott,
I will try to fix my client and server code...
Thanks again
Nishant
Scott Nichol
<snicholnews@scottn To: [EMAIL PROTECTED]
ichol.com> cc: (bcc: Nishant Awasthi)
Subject: Re: XML response in SOAP
message ???
08/21/2002 04:37 PM
Please respond to
soap-dev
The compiler is complaining because the valid escape sequences in Java
strings are things like \n, \r, \f, \u00fe.
Where I believe you need the new code is on the client, not the server. I
think the client will receive something like this across the wire:
<Envelope ...>
<Body ...>
<MethodNameResponse ...>
<return>
<?xml version="1.0"?>
<Employee_Info>
<firstname>Scott</firstname>
<lastname>Nichol</lastname>
</Employee_info>
</return>
</MethodNameResponse>
</Body>
</Envelope>
So, the client needs to convert < to <, > to >, " to ", and so
on, in order to have something that looks like XML.
Scott Nichol
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 21, 2002 2:55 PM
Subject: Re: XML response in SOAP message ???
Hey Scott
I just now tried to escape the "<" and ">" and "?" tags of XML with
escape charater ("\" - backslash)
and tried to compile my java file it gave me error on each and everyspot
where I please "\"...
I don't know if I did something wrong or what...I am attaching a sample of
the code please
see if I am doing something basically wrong:
mainStr = "<\?xml version=\"1.0\"\?> ";
while (rs.next())
{
firstn = rs.getString(1);
lastn = rs.getString(2);
phone = rs.getString(3);
pager = rs.getString(5);
home = rs.getString(6);
count = count+1;
mainStr = mainStr + "\<Employee_Info\>
\<Firstname\> "+ firstn +" \<\/Firstname>\<Lastname\> "+lastn + "
\<\/Lastname\> "+" \<Extension\> "+ phone +" \<\/Extension\> "+" \<Pager\>
"+pager+" \<\/Pager\> "+ " \<Home\> "+ home +" \<\/Home\>
\<\/Employee_Info\>" + "\n"; }
return mainStr;
Thanks a lot for all your help,
Nishant
Scott Nichol
<snicholnews@scottn To:
[EMAIL PROTECTED]
ichol.com> cc: (bcc: Nishant
Awasthi)
Subject: Re: XML
response
in SOAP message ???
08/21/2002 01:59 PM
Please respond to
soap-dev
>>>>
If the client that calls the SOAP method correctly "un-escapes" these
sequences, the resulting string will look like the string of XML text you
created.
<<<<
I put this out there rather cavalierly: I don't think the Apache SOAP
client
un-escape this on its own.
Scott Nichol
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>