Lookup of http repsonse

1 view
Skip to first unread message

michaelCH

unread,
Mar 24, 2009, 9:34:30 AM3/24/09
to rife-users
Hi Geert!

Could you explain me where I can lookup generated body of the http
response after calling print(template) in the Element?

Kind regards,
Michael Chudas.

Geert Bevin

unread,
Mar 24, 2009, 9:39:14 AM3/24/09
to rife-...@googlegroups.com
You can't, it's streamed out, unless you're using some kind of
intercepting proxy or so.

However, if you want the template content, you can just get its
content and do with it what you want.

Best regards,

Geert

On 24 Mar 2009, at 14:34, michaelCH wrote:

> Could you explain me where I can lookup generated body of the http
> response after calling print(template) in the Element?

--
Geert Bevin
Terracotta - http://www.terracotta.org
Uwyn "Use what you need" - http://uwyn.com
RIFE Java application framework - http://rifers.org
Flytecase Band - http://flytecase.be
Music and words - http://gbevin.com

Daniel K. Nyoto

unread,
Mar 24, 2009, 10:49:56 AM3/24/09
to rife-...@googlegroups.com
Hi Michael,

You can do template.getContent() before you print it. Maybe it's enough to serve your need.

Kind regards,
Daniel K. Nyoto


> Date: Tue, 24 Mar 2009 06:34:30 -0700
> Subject: [rife-users] Lookup of http repsonse
> From: michae...@3my.eu
> To: rife-...@googlegroups.com

michaelCH

unread,
Mar 24, 2009, 7:00:01 PM3/24/09
to rife-users
Hello Geert, Daniel!

Thank you for your support.
It could help me to find the issue I am fighting with.

I am sending xml response using xml template. In the first line there
is a declaration:
<?xml version="1.0" encoding="UTF-8"?>

1. When I do not include in main template other template there is no
space " " in front of <?xml version="1.0" encoding="UTF-8"?>
2. When I include in main template other template there IS a space " "
in front of <?xml version="1.0" encoding="UTF-8"?>

So in a second case client can not parse the response.

Could it be some bug in rife? Or the problem can be somewhere else ?

Kind regards,
Michael Chudas.



On Mar 24, 3:49 pm, "Daniel K. Nyoto" <dny...@hotmail.com> wrote:
> Hi Michael,
>
> You can do template.getContent() before you print it. Maybe it's enough to serve your need.
>
> Kind regards,
> Daniel K. Nyoto
>
> > Date: Tue, 24 Mar 2009 06:34:30 -0700
> > Subject: [rife-users] Lookup of http repsonse
> > From: michaelchu...@3my.eu

Geert Bevin

unread,
Mar 24, 2009, 7:04:35 PM3/24/09
to rife-...@googlegroups.com
Hi Michael,

I suggest you carefully check for spaces in your templates. I've sent
XML responses from RIFE many times without this issue, so I doubt it's
a bug in RIFE.

Best regards,

Geert

michaelCH

unread,
Mar 30, 2009, 4:27:07 PM3/30/09
to rife-users
Hi Geert!

I checked spaces in my template which is included in the main one.
I found interesting issue which was the real cause of the problem.
In the point where sub-template is included in the value holder there
(html source) appears strange, single character - kind of unrecognized
character( by example you can
observer such a characters when you display japanese sites without
japanese fonts).
What's more when empty template (template without any character
inside) is included the same phenomenon can be observed.
The xml parsing error appears when the insertion is done outside root
element - because this "unrecognized" character is non-white space.
In fact this behavior cancel the idea of <r:i> tag in this case unless
you have <r:i> always in root element and you don't have other root
elements in the <r:b> blocks.

If you could suggest some workaround idea it would be very helpful.

Best regards,
Michael Chudas.
> Terracotta -http://www.terracotta.org
> Uwyn "Use what you need" -http://uwyn.com

Geert Bevin

unread,
Mar 31, 2009, 1:58:54 AM3/31/09
to rife-...@googlegroups.com
Hi Michael,

This might be related to file encoding. I have seen this happen on
MacOSX when creating a new file with TextWrangler for instance. Make
sure that all your files are using the same encoding and inspect the
beginning of each included file with for instance a hex editor. There
are several ways to get this back to the right state, you can use a
'convert to encoding' function in your text editor, or you can copy/
paste into a very basic one (like vim) to remove any weirdness.

Hope this helps,

Geert
Reply all
Reply to author
Forward
0 new messages