Bug 38192

Summary: Multiple uses of <io:soap> fails
Product: Taglibs Reporter: Kell S <kell.sonnichsen>
Component: IO TaglibAssignee: Tomcat Developers Mailing List <dev>
Severity: minor    
Priority: P2    
Version: nightly   
Target Milestone: ---   
Hardware: All   
OS: All   
Attachments: diff for org.apache.taglibs.io.HttpSoapTag.java

Description Kell S 2006-01-09 11:33:39 UTC
When using the <io:soap> tag in a JSP file more than once an error occurs the
second time:
java.net.ProtocolException: cannot write to a URLConnection if doOutput=false -
call setDoOutput(true)

The implementation in org.apache.taglibs.io.HttpSoapTag has a constructor which
calls setAction("SOAP"). But the instantiation is done only once per JSP page.
As the URL connection in URLTag, which HttpSoapTag extends, is released after
the first use of <io:soap> the action is reset to the default GET action thus
resulting in the abovementioned error at the second call.

Proposed fix:
Move the setAction() call from instantiation to configureConnection():
diff HttpSoapTag.java.orig HttpSoapTag
<         setAction( "POST" );
>         setAction( "POST" );

This seems to work.
Comment 1 Kell S 2006-01-09 11:35:20 UTC
Created attachment 17368 [details]
diff for org.apache.taglibs.io.HttpSoapTag.java
Comment 2 Henri Yandell 2009-11-29 19:39:24 UTC
Resolving. Taglib has been retired.