commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From commons-...@jakarta.apache.org
Subject [jira] Commented: (JELLY-155) body not correctly parsed
Date Fri, 15 Oct 2004 08:43:51 GMT
The following comment has been added to this issue:

     Author: Michael Altenhofen
    Created: Fri, 15 Oct 2004 1:43 AM
       Body:
Hans,

I already guessed that the proposed "patch" may generate a performance
problem. I've chosen that path since it solved my problem; the things I'd like to do performance
is not the major isse. Essentially, I plan to work on a testing framework in the area of web
services, where I want to
able to check whether a web service invocation yields the expected result. 
My major goal was/is to make writing such a test simple, like this:

<?xml version="1.0"?>
<j:jelly trim="false" xmlns:soap="jelly:soap" xmlns:xu="jelly:xmlunit" xmlns:j="jelly:core"
xmlns:ju="jelly:util">
<j:catch var="ex">
   1. Define variables to hold invocation parameters
   <j:set var="endpoint">http://aws-beta.amazon.com/onca/soap?Service=AWSProductData</j:set>
   <j:set var="namespace"/>
   <j:set var="method">ItemSearch</j:set>
   2. Load the parameters for the call from the file itemssearch_params.xml      
   <ju:loadText file="itemsearch_params.xml" var="params"/>
   3. Invoke the web service using the parameters we've just read in
      and see whether the stuff we've got matches the stuff we've expected      
   <xu:assertDocumentsEqual expected="result.xml">
     <xu:actual>
       <soap:invoke endpoint="${endpoint}" namespace="${namespace}" method="${method}">${params}</soap:invoke>
     </xu:actual>
   </xu:assertDocumentsEqual>   
   4. If we reach this, they're considered equal!
   
</j:catch>
<j:if test="${ex != null}">
   Execption ${ex.message} occured
</j:if>
</j:jelly> 

Just to test my understanding: Instead of having the xml or, in my example, the xmlunit tag
library re-parse the stuff by using getBodyText, the soap:invoke tag should emit proper events.

I suspect that this will be really hard for the soap tag library 
since it would have to deal with any sort of xml document.
I witnessed that this is an open issue in the soap tag library.

Anyway, the fix is not that pressing and I can wait for a more proper patch, but then it seems,
following your suggestion, it should be fixed in the soap tag library, right?

Regards

Michael Altenhofen  
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/JELLY-155?page=comments#action_54143

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/JELLY-155

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: JELLY-155
    Summary: body not correctly parsed
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: jelly
 Components: 
             taglib.xmlunit

   Assignee: 
   Reporter: Michael Altenhofen

    Created: Fri, 8 Oct 2004 12:50 AM
    Updated: Fri, 15 Oct 2004 1:43 AM

Description:
In the current version (1.6) of ParseTagSupport the code of parseBody may generate an empty
document, especially if the body is generated by a nested jelly tag.
Looks like there is nobody notifying the writer that new tags are found, so the writer simply
ignores any data that is written out thus producing and empty document.

Replacing the method body with 

              return parseText(getBodyText(false));

seems to do the trick.

This issue has also been posted to the bugzilla tracking system (BUG # 31534), but I was advised
to post it here again.


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message