<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-2022-JP"
 http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Henry,<br>
<br>
&nbsp; Thank you for your information.<br>
&nbsp; I have not known 'Fiddler', but it is very good tool for debugging
the data <br>
between client and server. I like it and use it from now on.<br>
&nbsp; But it is not easy to use in SOAP. I could not catch the response<br>
data by it.<br>
&nbsp; And more, i can see the response xml data by Laszlo debug window,<br>
so i would like to intercept the data before out going from LPS.<br>
&nbsp; I said my trouble again, when i input a data with space at the head, <br>
something like '&nbsp;&nbsp;&nbsp;&nbsp; AAAAA', the return is 'AAAAA'. The spaces are cut
off<br>
form it. And i have traced LPS source code, then i doubt at
sendToStream() in <br>
FileUtils.java.&nbsp; The reason why i am hanging up to want to check this
point.<br>
<br>
&nbsp;Thanks any advises<br>
<br>
&nbsp;Keiji Ono<br>
<br>
Henry Minsky wrote:<br>
<blockquote
 cite="mid8c61fad60710022237k4d9f53a8rb95c42e06faeff11@mail.gmail.com"
 type="cite">
  <pre wrap="">One suggestion, sometimes I use a debugging proxy called "Fiddler" to
look at traffic between Internet Explorer and a server.



On 10/2/07, keiji Ono <a class="moz-txt-link-rfc2396E" href="mailto:keiji_ono@net8.co.jp">&lt;keiji_ono@net8.co.jp&gt;</a> wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap=""> I forgot the attach. &#65533;&#65533;&#65533;&#65533;&#65533;&#65533;

 Keiji Ono



 keiji Ono wrote:

 Thank you Henry, but unfortunately i could not send whole them to you.
 It is not easy to construct this SOAP environment.  But i can send only
 client apps to you. If you notice something in it, please teach me.
 Cause of them, i think i have to resolve this issue own myself and
 it is good chance to contribute to the community.  &#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;

 And otherwise that point, may i ask where can i catch and monitor the data
 from LPS to client. I wish there is the next step of sendToStream() in
FileUtils.java
 and i can catch one in there.

 Any information thanks.

 Keiji Ono

 Henry Minsky wrote:
 Can you send me a short example of the code which is calling the SOAP
service, and an example of how you use that data when it gets back to
the application?



On 10/2/07, keiji Ono <a class="moz-txt-link-rfc2396E" href="mailto:keiji_ono@net8.co.jp">&lt;keiji_ono@net8.co.jp&gt;</a> wrote:


 Hummm, it did not effect to the log file.
Basically, i did not use multibyte data, so whichever use UTF-8
parameter in the properties file,
it did not effect to it, i think.

BTW, the reason why i am taking this issue, because i have a trouble on
SOAP data handling on LPS.
The trouble is like this.
When i sent data from a OpenLaszlo application, like ' ABC' to SOAP
server, but the return was
'ABC'. Pay attention this, LPS cut out those spaces of the data.
I traced how to treat the data in LPS, so i reached FileUtil.java. I
know the data from SOAP server
to LPS are correct, that mean the data has the spaces.

Any advances. Thank you.

Keiji Ono


P T Withington wrote:



 I wonder if the problem is that log4j is not configured for UTF8? I
found this with Google:



 Debugging can be fun with high byte characters as generally logging
to a console isn't going to show you the characters you are
expecting. If you did this:

System.out.println(new String(new byte[] { -28, -72, -83},"UTF-8")

Then you'd probably just see a ? rather than the Chinese character
that it really should be. However, you can make log4j log UTF-8
messages. Just add

&lt;param name="Encoding" value="UTF-8"/&gt;

To the appender in your log4j.xml config. Or this:

log4j.appender.myappender.Encoding=UTF-8

To your log4j.properties file. You might still only see the UTF-8
data properly if you view the log file in an editor/viewer that can
view UTF-8 data (Windows notepad is ok for instance).

 [Java UTF&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;8 international character support with Tomcat and Oracle,
26/03/07, Kieran's
blog](<a class="moz-txt-link-freetext" href="http://blogs.warwick.ac.uk/kieranshaw/entry/">http://blogs.warwick.ac.uk/kieranshaw/entry/</a>
utf-8_internationalisation_with/)

Also, I wonder if using the Firebug extension to Firefox might help.
Using the Net pane, you should be able to see the content of the http
get.

On 2007-09-27, at 20:20 EDT, keiji Ono wrote:



 Who dose maintenance this Java file ?
If you give me a little tip, i can progress on it.

keiji Ono wrote:



 Ben,

Thank you for your suggestion, but i tried already it on 4.0.5 as a
trial ,
but it did not work on it.
I know it worked till on 4.0.3. :@

It will be good if i can give you a sample code of it , but as you know
it is not
easy to give SOAP sample.
And our application is now working on 3.3.3, so i would like to try on
3.3.3.

I am thinking as following steps now.
1. Check it on 3.3.3
2. If i find looks like bug in it, i will change it.
3. Then i am going to look at 4.0.5 source.

So could you give some advance?
Thank you.

Keiji ono

Benjamin Shine wrote:





 Keiji, I suggest you work with lps-4.0.5. It is the most current, and
we are more likely to be familiar with the code that you're working
with. See
<a class="moz-txt-link-freetext" href="http://www.openlaszlo.org/node/383">http://www.openlaszlo.org/node/383</a>
for the announcment.

-ben

On Sep 26, 2007, at 5:03 AM, keiji Ono wrote:





 Adding, it was the source of lps-3.3.3, and the data was not
multibyte
character.

Keiji Ono





 Hi all,

I am checking about Input/Output data on LPS now.
Because when i take SOAP interface on my application, the getting
data
is wrong.
Then i would like to check data where output from LPS.
At the point of FileUtils.java, i add some code like following
(BlockName-A).
But it got unreadable data to write lps.log as following.
How can i get 'readable' log on lps.log ?

&lt;checking code on FileUtils.java&gt;
public static int sendToStream(InputStream input,
OutputStream output, int size)
throws IOException {
int c = 0;
byte[] buffer = new byte[size];
int b = 0;
while(true) {
try {
// Until end of stream
if ((b = input.read(buffer)) &lt;= 0) {
return c;
}
} catch (IOException e) {
throw new StreamReadingException(e.getMessage());
}
c += b;
try {
output.write(buffer, 0, b);

//=== adding from here BlockName-A
{
String aString = new String(buffer, "UTF-8");
mLogger.debug( "OUTPUT: " + aString );
}
//=== to here

&lt;lps.log&gt;
OUTPUT: FWS 4 x F ? `
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx? ? ?0 _m _t CSPCHD id
AddLongResponse AddLongResult ? _m _root ? _m N ? _t _root ?
_t N ? ? _root ?
_rootndi RL? C? =L? C? =L?;
0000000100001gUD5zy4000000XKonfBejSj6FIgaG0jaWHQ-- = ?
?
_root ? _finishndi R? B? ? _root ?
_rootndi RL? C? =L? C? =L?
GHGHGH = ? ? _root ? _finishndi R? B?
_parent ? ?
_parent ? loader N? returnData R @

Thanks any advance.

Keiji Ono





&lt;?xml version="1.0" encoding="utf-8" ?&gt;

&lt;!--
*********************************************************************************
        space,multi byte space and line feed code cause loss of data
*********************************************************************************
--&gt;

&lt;canvas debug="true"&gt;
        &lt;debug width="350" height="100" align="right" valign="bottom"/&gt;

        &lt;!--define dataset--&gt;
        &lt;dataset name="CacheDset"/&gt;

        &lt;!--define SOAP--&gt;
        &lt;soap name="cache"
wsdl=<a class="moz-txt-link-rfc2396E" href="http://127.0.0.1:57772/csp/net8/Web.LongLong.CLS?WSDL=1">"http://127.0.0.1:57772/csp/net8/Web.LongLong.CLS?WSDL=1"</a>
autoload="true"&gt;

                &lt;method event="onload"&gt;
                        Debug.write("onload!");
                        Debug.write("LoadWSDL:"+this.wsdl);
                &lt;/method&gt;

                &lt;!--

****************************************************************************
                                Method of making XML to submit to Cache

****************************************************************************
                --&gt;
                &lt;method name="makeDoc" args="dpname" &gt;
                        &lt;![CDATA[
                                var s =  '&lt;AddLong&gt;' + '&lt;Longmoji&gt;' +
dpname+ '&lt;/Longmoji&gt;' + '&lt;LaszloFlg&gt;1&lt;/LaszloFlg&gt;' + '&lt;/AddLong&gt;';
                                Debug.write( "makeDoc: ", s );
                                return s;
                        ]]&gt;
                &lt;/method&gt;

                &lt;!--define RemoteCall--&gt;
                &lt;remotecall name="AddLong" funcname="AddLong"
dataobject="CacheDset"&gt;

                        &lt;!--set param--&gt;
                        &lt;param
value="${parent.parent.makeDoc(canvas.inputedtx.text)}"/&gt;

                        &lt;method event="ondata"&gt;
                                &lt;![CDATA[
                                        Debug.write("ondata");
                                ]]&gt;
                        &lt;/method&gt;
                &lt;/remotecall&gt;
        &lt;/soap&gt;

        &lt;text align="center" y="10" text="submit" fgcolor="blue"
fontstyle="bold"/&gt;

        &lt;edittext name="inputedtx" align="center" y="30" width="300"
height="200" multiline="true"/&gt;

        &lt;view name="btnView" align="center" y="250"&gt;
                &lt;simplelayout axis="x" spacing="20"/&gt;
                &lt;button text="invoke"&gt;
                        &lt;method event="onclick"&gt;
                                &lt;![CDATA[
                                        cache.AddLong.invoke();
                                ]]&gt;
                        &lt;/method&gt;
                &lt;/button&gt;
                &lt;button name="btnClear" text="clear"&gt;
                        &lt;method event="onclick"&gt;
                                &lt;![CDATA[
                                        canvas.inputedtx.clearText();
                                ]]&gt;
                        &lt;/method&gt;
                &lt;/button&gt;
        &lt;/view&gt;

        &lt;text align="center" y="380" text="return" fgcolor="red"
fontstyle="bold"/&gt;

        &lt;view name="viwOutput"
datapath="CacheDset:/item/AddLongResponse" align="center"
y="400" width="700" height="200"&gt;
                &lt;edittext name="outputedtx" width="700" height="100"
multiline="true" datapath="AddLongResult/text()"/&gt;
        &lt;/view&gt;

        &lt;button name="btnClear2" text="clear" align="center" y="520"&gt;
                &lt;method event="onclick"&gt;
                        &lt;![CDATA[

canvas.viwOutput.outputedtx.clearText();
                        ]]&gt;
                &lt;/method&gt;
        &lt;/button&gt;
&lt;/canvas&gt;

    </pre>
  </blockquote>
  <pre wrap=""><!----></pre>
</blockquote>
<br>
</body>
</html>