<!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,<br>
<br>
I found a problem of SOAP action between 3.3.3 and latest nighty
build (4.1.x).<br>
With a same LZX application and using SOAP data I/F.<br>
3.3.3 could send data to LPS, but the nighty could not.<br>
ex.<br>
send data 'burabura'<br>
debugging 'lzpostbody' in SOAPDataSource.java<br>
on 3.3.3: <some tag>[![CDATA[burabura]]</some
tag><br>
on 4.1.x: <some tag/><br>
* in effect, those data were encoded.<br>
<br>
SOAPDataSource.java had not any changes between them.<br>
Are there some changing data interface specifications?<br>
I confirmed it was OK till 4.0.3, but 4.0.5 and later were NG.<br>
<br>
Regards,<br>
Keiji Ono<br>
<br>
Henry Minsky wrote:
<blockquote
cite="mid8c61fad60710300511u65f7e51cme8e363c5a46dcae4@mail.gmail.com"
type="cite"><br>
<br>
<div><span class="gmail_quote">On 10/30/07, <b
class="gmail_sendername">keiji Ono</b> <<a
href="mailto:keiji_ono@net8.co.jp">keiji_ono@net8.co.jp</a>> wrote:</span>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I
have checked Apache-Axis library. And i knew where it was implemented<br>
but at the same time<br>
i did not understand about my issue whether it was a spec or bug. Then i<br>
will ask it for Axis forum.<br>
Thank you for everything.
<br>
<br>
BTW, i have been seeing OpenLaszlo source code by now, i would like to<br>
confirm and gather up my *understanding* on processing SOAP data. If<br>
this is incorrect, please correct me.<br>
<br>
Issue: procedure SOAP message data to provide to client
<br>
Example data: <data tag>burabura data</data tag><br>
Process:<br>
1. read SOAP data ( like the example data )<br>
2. disintegrate in tag and data<br>
3. the data will be converted to Flash data format<br>
4. reassemble the tag and the data
<br>
5. put it out it to client by HttpServletResponse<br>
<br>
But i did not find the point of *reassemble* clearly.</blockquote>
<div><br>
Hello Keiji, <br>
<br>
I was probably the last person to touch the SOAP code, when I <br>
added support for the DHTML runtime. <br>
<br>
In SWF, the SOAP data is converted to flash, using the old data
compiler which used to be used for XML data, but is no longer used for
that.<br>
<br>
In the DHTML version of the SOAP code, the data is converted to
<br>
JSON format. This might be easier to understand than the swf code
paths, if you look at the<br>
output that is sent to the client. It is a JSON string which is just a
combination of string, number, and arrays and objects.
<br>
<br>
<br>
It had been my intention to rewrite the SOAP server code for the SWF
runtime, so that<br>
instead of using the old data compiler, it would instead just use the
JSON<br>
format that we now use for DHTML, and compile the JSON string to swf
with the regular "script compiler" that all the other Laszlo code goes
through. This would simplify
<br>
the code substantially on the server, as it would eliminate the two
duplicate<br>
code paths that exist now for SWF and DHTML. Unfortunately I have not
had<br>
time to do that. <br>
<br>
Henry<br>
<br>
<br>
<br>
</div>
<br>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Best,<br>
Keiji Ono<br>
<br>
��� wrote:<br>
<br>
> We use "apache-axis" for this server-side job, see i.e. at<br>
>
org.openlaszlo.remote.swf.soap.encoding.SOAPDataEncoder#buildHeaders(org.apache.axis.message.SOAPHeader
).<br>
><br>
><br>
> So I guess you need to check the "axis.jar" (JavaDoc:<br>
> "<a
href="http://ws.apache.org/axis/java/apiDocs/org/apache/axis/message/package-summary.html">http://ws.apache.org/axis/java/apiDocs/org/apache/axis/message/package-summary.html
</a>")<br>
> to get any further.<br>
><br>
> - Andr���<br>
><br>
>> Hi Ben,<br>
>><br>
>> Thank you for your reply.<br>
>> Yes, i also found your point and i was searching the
implementation.
<br>
>> If it did not implement in OpenLaszlo source, it must came from<br>
>> saaj.jar or other jars.<br>
>> As far as i know, this class declared as Interface class in
SAAJ, so<br>
>> i wondered<br>
>> where did it implement.
<br>
>> In your opinion, OpenLaszlo depend on the standard of JARs,
right?<br>
>> If so, i would appreciate it if you gave me the information
about<br>
>> JARs version and so on.<br>
>><br>
>> Best,
<br>
>> Keiji Ono<br>
>><br>
>> Benjamin Shine wrote:<br>
>><br>
>> >/<br>
>> />/ It looks to me like SOAPElement is imported from />/<br>
>> javax.xml.soap.SOAPElement:<br>
>> />/
<br>
>> />/ $ grep SOAPElement `find . -name "SOAP*.java"`<br>
>> />/ ...<br>
>> />/
./WEB-INF/lps/server/src/org/openlaszlo/remote/swf/soap/encoding/<br>
>> />/ SOAPDataEncoder.java
:<br>
>> />/ import javax.xml.soap.SOAPElement;<br>
>> />/ ...<br>
>> />/<br>
>> />/ So that implementation must come from one of the jars
we ship<br>
>> with, />/ but I don't know which one.
<br>
>> />/<br>
>> />/ Is this the information you were looking for?<br>
>> />/ -ben<br>
>> />/<br>
>> />/<br>
>> />/ On Oct 25, 2007, at 6:13 PM, keiji Ono wrote:<br>
>> />/
<br>
>> />>/ Hi<br>
>> />>/<br>
>> />>/ I could make in focus on this issue.<br>
>> />>/ I found the method of .getChildElements() was
rejecting all blanks<br>
>> />>/ at the head and tail of SOAPElement class.
<br>
>> />>/ But as you know, SOAPElement class was declared by
Interface<br>
>> class in />>/ SAAJ.<br>
>> />>/ As the next step, i checked how SOAPElement class
had<br>
>> implemented in />>/ OpenLaszlo.
<br>
>> />>/ but i could not find the point in OpenLaszlo source.<br>
>> />>/ If i could find it, i could know it whether it was
bug or spec.<br>
>> />>/ Hey Server Side Men, could you give some hints for
me?
<br>
>> />>/<br>
>> />>/ Best,<br>
>> />>/ Keiji Ono<br>
>> />>/<br>
>> />>/ keiji Ono wrote:<br>
>> />>/<br>
>> />>>/ I have been continuing to solve this issue.
<br>
>> />>>/ And i look at the point of the suspicious, but
i could not know<br>
>> it />>>/ clearly.<br>
>> />>>/ At the point is in SOAPDataEncoder.java.<br>
>> />>>/ The 'issue' code is in the method of
_traverseDOM().
<br>
>> />>>/<br>
>> />>>/ SOAPDataEncoder.java _traverseDOM()<br>
>> />>>/<br>
>> />>>/ iter = el.getChildElements();<br>
>> />>>/ while(iter.hasNext()){
<br>
>> />>>/ Object o = iter.next(); <---- 1<br>
>> />>>/ if( Text.class.isInstance(o) ){<br>
>> />>>/ characters(((Text)o).getValue() ); <---- 2<br>
>> />>>/ }else{
<br>
>> />>>/ .<br>
>> />>>/ .<br>
>> />>>/ }<br>
>> />>>/ }<br>
>> />>>/<br>
>> />>>/ At the point of 1, when the Object o contained
a string
<br>
>> />>>/ "<sometag><![CDATA[ Text
Strings]]></sometag>",<br>
>> />>>/ .getValue() at the point of 2 got the string
"Text Strings" and<br>
>> />>>/ set it to the method of characters(). The
characters()
<br>
>> />>>/ push it to client through FlashBuffer class.<br>
>> />>>/ The issue of it is the blank of the start
strings has been<br>
>> rejected />>>/ by getValue().<br>
>> />>>/
<br>
>> />>>/ I do not know whether this is the specification
of getValue()<br>
>> of />>>/ org.apache.xml.message.Text class.<br>
>> />>>/ Is not there the person knowing a lot about
this?
<br>
>> />>>/<br>
>> />>>/ Keiji Ono<br>
>> />>>/<br>
>> />>>>/ Hummm, it did not effect to the log file.<br>
>> />>>>/ Basically, i did not use multibyte data, so
whichever use
<br>
>> UTF-8 />>>>/ parameter in the properties file,<br>
>> />>>>/ it did not effect to it, i think.<br>
>> />>>>/<br>
>> />>>>/ BTW, the reason why i am taking this issue,
because i have a
<br>
>> />>>>/ trouble on SOAP data handling on LPS.<br>
>> />>>>/ The trouble is like this.<br>
>> />>>>/ When i sent data from a OpenLaszlo
application, like ' ABC' to
<br>
>> SOAP />>>>/ server, but the return was<br>
>> />>>>/ 'ABC'. Pay attention this, LPS cut out
those spaces of the data.<br>
>> />>>>/ I traced how to treat the data in LPS, so i
reached
<br>
>> FileUtil.java. />>>>/ I know the data from SOAP
server<br>
>> />>>>/ to LPS are correct, that mean the data has
the spaces.<br>
>> />>>>/<br>
>> />>>>/ Any advances. Thank you.
<br>
>> />>>>/<br>
>> />>>>/ Keiji Ono<br>
>> />>>>/<br>
>> />>>>/<br>
>> />>>>/ P T Withington wrote:<br>
>> />>>>/<br>
>> />>>>>/ I wonder if the problem is that log4j
is not configured for<br>
>> UTF8? />>>>>/ I found this with Google:<br>
>> />>>>>/<br>
>> />>>>>>/ Debugging can be fun with high byte
characters as generally
<br>
>> />>>>>>/ logging to a console isn't going to
show you the characters<br>
>> you />>>>>>/ are expecting. If you did this:<br>
>> />>>>>>/<br>
>> />>>>>>/ System.out.println(new String(new
byte[] { -28, -72,<br>
>> -83},"UTF-8")<br>
>> />>>>>>/<br>
>> />>>>>>/ Then you'd probably just see a ?
rather than the Chinese
<br>
>> />>>>>>/ character that it really should be.
However, you can make<br>
>> log4j />>>>>>/ log UTF-8 messages. Just add<br>
>> />>>>>>/<br>
>> />>>>>>/ <param name="Encoding"
value="UTF-8"/>
<br>
>> />>>>>>/<br>
>> />>>>>>/ To the appender in your log4j.xml
config. Or this:<br>
>> />>>>>>/<br>
>> />>>>>>/
log4j.appender.myappender.Encoding=UTF-8
<br>
>> />>>>>>/<br>
>> />>>>>>/ To your log4j.properties file. You
might still only see the<br>
>> UTF-8 />>>>>>/ data properly if you view the
log file in an editor/
<br>
>> viewer that />>>>>>/ can view UTF-8 data
(Windows notepad is ok for<br>
>> instance).<br>
>> />>>>>/<br>
>> />>>>>/<br>
>> />>>>>/
<br>
>> />>>>>/<br>
>> />>>>>/<br>
>> />>>>>/ [Java UTF???????????????????????????8
international character<br>
>> />>>>>/ support with Tomcat and Oracle,
26/03/07, Kieran's
<br>
>> blog](<a class="moz-txt-link-freetext" href="http://">http://</a> />>>>>/ <a
href="http://blogs.warwick.ac.uk/kieranshaw/entry/">blogs.warwick.ac.uk/kieranshaw/entry/</a>
/>>>>>/<br>
>> utf-8_internationalisation_with/)<br>
>> />>>>>/
<br>
>> />>>>>/ Also, I wonder if using the Firebug
extension to Firefox<br>
>> might />>>>>/ help. Using the Net pane, you
should be able to see the<br>
>> content of />>>>>/ the http get.
<br>
>> />>>>>/<br>
>> />>>>>/ On 2007-09-27, at 20:20 EDT, keiji Ono
wrote:<br>
>> />>>>>/<br>
>> />>>>>>/ Who dose maintenance this Java file
?
<br>
>> />>>>>>/ If you give me a little tip, i can
progress on it.<br>
>> />>>>>>/<br>
>> />>>>>>/ keiji Ono wrote:<br>
>> />>>>>>/
<br>
>> />>>>>>>/ Ben,<br>
>> />>>>>>>/<br>
>> />>>>>>>/ Thank you for your suggestion,
but i tried already it on<br>
>> 4.0.5 />>>>>>>/ as a trial ,
<br>
>> />>>>>>>/ but it did not work on it.<br>
>> />>>>>>>/ I know it worked till on 4.0.3.
:@<br>
>> />>>>>>>/<br>
>> />>>>>>>/ It will be good if i can give
you a sample code of it , but
<br>
>> as />>>>>>>/ you know<br>
>> />>>>>>>/ it is not<br>
>> />>>>>>>/ easy to give SOAP sample.<br>
>> />>>>>>>/ And our application is now
working on 3.3.3, so i would<br>
>> like to />>>>>>>/ try on<br>
>> />>>>>>>/ 3.3.3.<br>
>> />>>>>>>/<br>
>> />>>>>>>/ I am thinking as following
steps now.
<br>
>> />>>>>>>/ 1. Check it on 3.3.3<br>
>> />>>>>>>/ 2. If i find looks like bug in
it, i will change it.<br>
>> />>>>>>>/ 3. Then i am going to look at
4.0.5 source.<br>
>> />>>>>>>/<br>
>> />>>>>>>/ So could you give some advance?<br>
>> />>>>>>>/ Thank you.<br>
>> />>>>>>>/
<br>
>> />>>>>>>/ Keiji ono<br>
>> />>>>>>>/<br>
>> />>>>>>>/ Benjamin Shine wrote:<br>
>> />>>>>>>/<br>
>> />>>>>>>/
<br>
>> />>>>>>>/<br>
>> />>>>>>>>/ Keiji, I suggest you work
with lps-4.0.5. It is the most<br>
>> />>>>>>>>/ current, and<br>
>> />>>>>>>>/ we are more likely to be
familiar with the code that
<br>
>> you're />>>>>>>>/ working<br>
>> />>>>>>>>/ with. See<br>
>> />>>>>>>>/ <a
href="http://www.openlaszlo.org/node/383">http://www.openlaszlo.org/node/383
</a><br>
>> />>>>>>>>/ for the announcment.<br>
>> />>>>>>>>/<br>
>> />>>>>>>>/ -ben<br>
>> />>>>>>>>/<br>
>> />>>>>>>>/ On Sep 26, 2007, at 5:03
AM, keiji Ono wrote:<br>
>> />>>>>>>>/<br>
>> />>>>>>>>/<br>
>> />>>>>>>>/
<br>
>> />>>>>>>>>/ Adding, it was the
source of lps-3.3.3, and the data was<br>
>> not />>>>>>>>>/ multibyte<br>
>> />>>>>>>>>/ character.
<br>
>> />>>>>>>>>/<br>
>> />>>>>>>>>/ Keiji Ono<br>
>> />>>>>>>>>/<br>
>> />>>>>>>>>/<br>
>> />>>>>>>>>/
<br>
>> />>>>>>>>>>/ Hi all,<br>
>> />>>>>>>>>>/<br>
>> />>>>>>>>>>/ I am checking about
Input/Output data on LPS now.
<br>
>> />>>>>>>>>>/ Because when i take
SOAP interface on my application,<br>
>> the />>>>>>>>>>/ getting data<br>
>> />>>>>>>>>>/ is wrong.
<br>
>> />>>>>>>>>>/ Then i would like
to check data where output from LPS.<br>
>> />>>>>>>>>>/ At the point of
FileUtils.java, i add some code like<br>
>> following<br>
>> />>>>>>>>>>/ (BlockName-A).<br>
>> />>>>>>>>>>/ But it got
unreadable data to write lps.log as following.<br>
>> />>>>>>>>>>/ How can i get
'readable' log on lps.log ?<br>
>> />>>>>>>>>>/<br>
>> />>>>>>>>>>/ <checking code
on FileUtils.java><br>
>> />>>>>>>>>>/ public static int
sendToStream(InputStream input,
<br>
>> />>>>>>>>>>/ OutputStream
output, int size)<br>
>> />>>>>>>>>>/ throws IOException {<br>
>> />>>>>>>>>>/ int c = 0;
<br>
>> />>>>>>>>>>/ byte[] buffer = new
byte[size];<br>
>> />>>>>>>>>>/ int b = 0;<br>
>> />>>>>>>>>>/ while(true) {
<br>
>> />>>>>>>>>>/ try {<br>
>> />>>>>>>>>>/ // Until end of
stream<br>
>> />>>>>>>>>>/ if ((b =
input.read(buffer)) <= 0) {
<br>
>> />>>>>>>>>>/ return c;<br>
>> />>>>>>>>>>/ }<br>
>> />>>>>>>>>>/ } catch
(IOException e) {<br>
>> />>>>>>>>>>/ throw new
StreamReadingException(
e.getMessage());<br>
>> />>>>>>>>>>/ }<br>
>> />>>>>>>>>>/ c += b;<br>
>> />>>>>>>>>>/ try {<br>
>> />>>>>>>>>>/
output.write(buffer, 0, b);<br>
>> />>>>>>>>>>/<br>
>> />>>>>>>>>>/ //=== adding from
here BlockName-A<br>
>> />>>>>>>>>>/ {
<br>
>> />>>>>>>>>>/ String aString =
new String(buffer, "UTF-8");<br>
>> />>>>>>>>>>/ mLogger.debug(
"OUTPUT: " + aString );<br>
>> />>>>>>>>>>/ }
<br>
>> />>>>>>>>>>/ //=== to here<br>
>> />>>>>>>>>>/<br>
>> />>>>>>>>>>/ <lps.log><br>
>> />>>>>>>>>>/ OUTPUT: FWS
4 x F ? `
<br>
>> />>>>>>>>>>/
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx? ? ?0 _m _t CSPCHD id<br>
>> />>>>>>>>>>/ AddLongResponse
AddLongResult ? _m _root /? _m N<br>
>> ? _t >>>>>>>>>>/ _root /?<br>
>> >>>>>>>>>>/ _t N<br>
>> /? ? _root ?<br>
>> >>>>>>>>>>/ _rootndi
RL? C? =L? C? =L?;
<br>
>> />>>>>>>>>>/<br>
>> 0000000100001gUD5zy4000000XKonfBejSj6FIgaG0jaWHQ-- = ?<br>
>> />>>>>>>>>>/ ?<br>
>> />>>>>>>>>>/ _root
/? _finishndi R? B? ? _root ?
<br>
>> >>>>>>>>>>/ _rootndi
RL? C? =L? C? =L?<br>
>> />>>>>>>>>>/ GHGHGH =
? ? _root /? _finishndi R? B?<br>
>> >>>>>>>>>>/ _parent /? ?
<br>
>> >>>>>>>>>>/ _parent /? loader
N? returnData R @<br>
>> >>>>>>>>>>/<br>
>> />>>>>>>>>>/ Thanks any advance.
<br>
>> />>>>>>>>>>/<br>
>> />>>>>>>>>>/ Keiji Ono<br>
>> />>>>>>>>>><br>
><br>
<br>
</blockquote>
</div>
<br>
<br clear="all">
<br>
-- <br>
Henry Minsky<br>
Software Architect<br>
<a href="mailto:hminsky@laszlosystems.com">hminsky@laszlosystems.com</a><br>
<br>
</blockquote>
</body>
</html>