You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Tony Collen <tc...@hist.umn.edu> on 2002/11/23 00:36:48 UTC

WebServiceProxy Hell

Agh!

I'm trying to wrap my head arounc WebServiceProxyGenerator (and 
eventually XMLForms), and I'm having all sorts of problems. I'm trying 
to post to a servlet which I *know* returns valid xml, along with the 
<?xml version="1.0"?> header.   I couldn't get it working for the life 
of me, so I prototyped a simple PHP script to take post/get vars, and 
spit out XML:

<?php

    $mode = $HTTP_GET_VARS['Mode'];
    $keywords = $HTTP_GET_VARS['keywords'];
   
    header("Content-type: text/xml");
   
    print "<?xml version=\"1.0\"?>\n";
    print "<results>\n";
    print "\t<mode>$mode</mode>\n";
    print "\t<keywords>$keywords</keywords>\n";
    print "</results>\n";
   
?>

Alright, pretty simple.  Next I have my pipeline:

         <map:match pattern="testingtwo">
             <map:generate type="wsproxy" 
src="http://host/testPost.php?Mode=keyword&amp;keyword=age+race+sex">
                 <map:parameter name="wsproxy-method" value="GET"/>
             </map:generate>
             <map:serialize type="xml"/>
         </map:match>


Alas, I get the following error after I access the pipeline:


  Cocoon 2 - Internal server error

------------------------------------------------------------------------

*type* fatal

*message* _Error invoking remote service: java.io.IOException: Bad chunk 
size: 58 _

*description* _org.apache.cocoon.ProcessingException: Error invoking 
remote service: java.io.IOException: Bad chunk size: 58 : 
java.io.IOException: Bad chunk size: 58 _

*sender* org.apache.cocoon.servlet.CocoonServlet

*source* Cocoon servlet

*stack-trace
*

org.apache.cocoon.ProcessingException: Error invoking remote service: java.io.IOException: Bad chunk size: 58 : java.io.IOException: Bad chunk size: 58 
	at org.apache.cocoon.generation.WebServiceProxyGenerator.fetch(WebServiceProxyGenerator.java:278)
	at org.apache.cocoon.generation.WebServiceProxyGenerator.generate(WebServiceProxyGenerator.java:172)
	at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:515)
	at org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:204)
	at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:486)
	at org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:149)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:83)
	at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:162)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:153)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:150)
	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:326)
	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:308)

*<snip/>
*

*
*The weird thing is when I reload the pipeline in my browser, I get a 
slightly different error:

*message* _Error invoking remote service: 
org.apache.commons.httpclient.HttpRecoverableException: Error in parsing 
the status line from the response: unable to find line starting with 
"HTTP/"_

*description* _org.apache.cocoon.ProcessingException: Error invoking 
remote service: org.apache.commons.httpclient.HttpRecoverableException: 
Error in parsing the status line from the response: unable to find line 
starting with "HTTP/": 
org.apache.commons.httpclient.HttpRecoverableException: Error in parsing 
the status line from the response: unable to find line starting with "HTTP/"
_

_
_I am getting the exact same behavior when I try to connect the wsproxy 
to a servlet that takes Post:

         <map:match pattern="testing">
             <map:generate type="wsproxy" label="xml" 
src="http://host:8080/servlets/DevServlet?Mode=keyword&amp;keywords=age+race+sex">
                 <map:parameter name="wsproxy-method" value="POST"/>
             </map:generate>
             <map:serialize type="xml"/>
         </map:match>


I hate to complain about the documentation, since I'm trying to help out 
with it :)  I'm eventually going to work my way up to using XMLForms, 
but I need to get the basis working correctly first.   Can anyone give 
me some pointers on how to get this working?  


Thanks! ;)

Tony



*
*




---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: WebServiceProxy Hell

Posted by Ivelin Ivanov <iv...@apache.org>.
Can you verify if the demo works for you.

----- Original Message -----
From: "Tony Collen" <tc...@hist.umn.edu>
To: <co...@xml.apache.org>
Sent: Wednesday, November 27, 2002 11:16 AM
Subject: Re: WebServiceProxy Hell


> On Tue, 26 Nov 2002, Ivelin Ivanov wrote:
>
> >
> > Are you saying that the version in CVS is bad?
> > Please submit a bug in Bugzilla about this and mention which version do
you
> > use.
>
> It might be.  When I get to work, today, I have a few things that I can
> check, but so far, I've gotten different results with different versions
> of commons-httpclient.  I almost want to say the bug is there, and not
> actually in the WSPG.  With the long weekend for the holidays coming here
> in the US, it will be quiet at work today, so I should have no problem
> concentrating on getting this solved :)
>
> If I still can't get the WSPG working with my examples, I'll file a bug
> and we'll take it from there.
>
> Regards,
> Tony
>
> Tony Collen -- tc@socsci.umn.edu
> College of Liberal Arts   University of Minnesota, Minneapolis, West Bank
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
>


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: WebServiceProxy Hell

Posted by Tony Collen <tc...@hist.umn.edu>.
On Tue, 26 Nov 2002, Ivelin Ivanov wrote:

>
> Are you saying that the version in CVS is bad?
> Please submit a bug in Bugzilla about this and mention which version do you
> use.

It might be.  When I get to work, today, I have a few things that I can
check, but so far, I've gotten different results with different versions
of commons-httpclient.  I almost want to say the bug is there, and not
actually in the WSPG.  With the long weekend for the holidays coming here
in the US, it will be quiet at work today, so I should have no problem
concentrating on getting this solved :)

If I still can't get the WSPG working with my examples, I'll file a bug
and we'll take it from there.

Regards,
Tony

Tony Collen -- tc@socsci.umn.edu
College of Liberal Arts   University of Minnesota, Minneapolis, West Bank


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: WebServiceProxy Hell

Posted by Ivelin Ivanov <iv...@apache.org>.
Are you saying that the version in CVS is bad?
Please submit a bug in Bugzilla about this and mention which version do you
use.




----- Original Message -----
From: "Tony Collen" <tc...@hist.umn.edu>
To: <co...@xml.apache.org>
Sent: Monday, November 25, 2002 4:15 PM
Subject: Re: WebServiceProxy Hell


> Welp, now that I've blabbed to myself on the list, it turned out to be
> an outdated commons-httpclient.jar.  Downloaded newer version and
> replaced old one, and it works.   *sigh*   :)
>
>
>
> Tony
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
>


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: WebServiceProxy Hell

Posted by Tony Collen <tc...@hist.umn.edu>.
Tony Collen wrote:

> Welp, now that I've blabbed to myself on the list, it turned out to be 
> an outdated commons-httpclient.jar.  Downloaded newer version and 
> replaced old one, and it works.   *sigh*   :)
>

Actually, no, all I get is a blank page.  Different versions of 
commons-httpclient give me different results.  The one that's 
distributed with the cvs HEAD gives me an exception, newer versions of 
the lib off the commons website just give me a blank page.   The 
HttpMultiClient isn't even hitting my servlet.   I'm about out of 
ideas... anyone got any?


Tony


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: WebServiceProxy Hell

Posted by Tony Collen <tc...@hist.umn.edu>.
Welp, now that I've blabbed to myself on the list, it turned out to be 
an outdated commons-httpclient.jar.  Downloaded newer version and 
replaced old one, and it works.   *sigh*   :)



Tony


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: WebServiceProxy Hell

Posted by Ivelin Ivanov <iv...@apache.org>.
Tony,

I don't see anything wrong with your sample other than the fact that your
XML output doesn't
have a new line after the xml header: <?xml version="1.0">

My only suggestion at this point it to debug the WSPG and find out what URL
it is trying to access.
It should exlpain why your servlet is never reached.
Your pipeline seems good.
It must be a very simple misconfiguration problem, because your example is
pretty simple and
the WSPG demo works against much more complicated sites.

I am sorry I cannot offer a better solution.

Please let me know what you find,

Ivelin




----- Original Message -----
From: "Tony Collen" <tc...@hist.umn.edu>
To: <co...@xml.apache.org>
Sent: Monday, November 25, 2002 2:52 PM
Subject: Re: WebServiceProxy Hell


> Alright, Here's what I got so far:
>
> I've written a testing servlet that takes doPost, and prints out some
> valid XML.  I'm able to submit to it with a normal HTML form and get XML
> back.  I've got some debug statements in my servlet that prints to
> STDERR when a request is made so I can tell when the servlet is being
> called.  I see the debug messages when I post to the servlet using the
> plain HTML form.
>
> Now, when I try to use the WSPG to interact with the servlet (or any
> other servlet for that matter), I'm getting the "No XML" error back.
>  When I hit Cocoon and invoke the pipeline, I notice that my debug
> servlet isn't even being called!
>
> Here's all my stuff I have so far.  First the debug servlet:
>
> import java.io.*;
> import javax.servlet.*;
> import javax.servlet.http.*;
>
> public class PostServlet extends HttpServlet {
>
>     public void doPost(HttpServletRequest req, HttpServletResponse res)
>         throws IOException, ServletException {
>
>         System.err.println("[PostServlet] Entering doPost()");
>         PrintWriter out = res.getWriter();
>         String mode = req.getParameter("Mode");
>
>         System.err.println("[PostServlet] Setting Content-type");
>
>         res.setContentType("text/xml");
>
>         System.err.println("[PostServlet] Sending XML...");
>
>         out.println("<?xml version=\"1.0\"?>");
>         out.println("<root>");
>         out.println("\t<foo mode=\"" + mode + "\">");
>
>         if (mode.equals("keyword")) {
>             out.println("\t<keywords>" + req.getParameter("keywords") +
> "</keywords>");
>         }
>
>         out.println("\t</foo>");
>         out.println("</root>");
>
>         System.err.println("[PostServlet] Done sending XML. Exiting.");
>     }
> }
>
> Here's the HTML form which submits to it:
>
> <html>
> <body>
>
> <form method="post" action="http://localhost/postServlet">
>     <textarea name="keywords" type="text" wrap="soft" cols="60"
> rows="4"></textarea>
>     <input type="hidden" name="Mode" value="keyword"/>
>     <input type="submit"></input>
> </form>
>
> </body>
> </html>
>
>
> Here's my pipeline:
>
> <map:pipeline>
>
>     <map:match pattern="search">
>         <map:redirect-to uri="search/form.html"/>
>     </map:match>
>
>     <map:match pattern="search/form.html">
>         <map:generate type="file" src="documents/searchForm.xml"/>
>         <map:transform src="stylesheets/xmlform2html.xsl"/>
>         <map:serialize type="html"/>
>     </map:match>
>
>     <map:match pattern="search/doSearch">
>         <map:generate type="wsproxy" src="http://localhost/postServlet">
>             <map:parameter name="wsproxy-method" value="POST"/>
>         </map:generate>
>         <map:serialize type="xml"/>
>     </map:match>
>
> </map:pipeline>
>
>
> stylesheets/xmlform2html.xsl is the one which is included with the
samples.
>
> Here's my documents/searchForm.xml:
>
> <?xml version="1.0"?>
>
> <document xmlns:xf="http://xml.apache.org/cocoon/xmlform/2002">
>     <xf:form id="keyword-search"
> action="http://localhost/cocoon/nhgis/search/doSearch" method="POST">
>         <xf:caption>Keyword Search</xf:caption>
>             <xf:textbox ref="keywords" name="keywords">
>                 <xf:caption>Keywords</xf:caption>
>             </xf:textbox>
>
>             <xf:submit id="submit" class="button">
>                 <xf:caption>Submit</xf:caption>
>             </xf:submit>
>     </xf:form>
> </document>
>
> And finally, here's the entire stack trace of the error that Cocoon
> provides after I post to the form that "search/form.html" gives me:
>
>
> ERROR   (2002-11-25) 14:43.39:499   [access  ]
(/cocoon/nhgis/search/doSearch) HttpProcessor[80][4]/CocoonServlet: Problem
with Cocoon servlet
> org.apache.cocoon.ProcessingException: Error invoking remote service:
org.apache.cocoon.ProcessingException: Invalid response - no xml:
org.apache.cocoon.ProcessingException: Invalid response - no xml
> at
org.apache.cocoon.generation.WebServiceProxyGenerator.fetch(WebServiceProxyG
enerator.java:278)
> at
org.apache.cocoon.generation.WebServiceProxyGenerator.generate(WebServicePro
xyGenerator.java:172)
> at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLP
ipeline(AbstractProcessingPipeline.java:515)
> at
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline
.processXMLPipeline(AbstractCachingProcessingPipeline.java:204)
> at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(Abs
tractProcessingPipeline.java:486)
> at
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(Seri
alizeNode.java:149)
> at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:83)
> at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok
e(PreparableMatchNode.java:162)
> at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:107)
> at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipel
ineNode.java:153)
> at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:107)
> at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Pipe
linesNode.java:150)
> at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:326)
> at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:308)
> at
org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNod
e.java:131)
> at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:83)
> at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok
e(PreparableMatchNode.java:162)
> at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:107)
> at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipel
ineNode.java:153)
> at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:107)
> at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Pipe
linesNode.java:150)
> at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:326)
> at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:308)
> at org.apache.cocoon.Cocoon.process(Cocoon.java:595)
> at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1025)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
> at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
> at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
> at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
> at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:201)
> at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
> at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
> at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
)
> at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
> at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
> at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
> at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
)
> at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
> at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
> at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
> at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:163)
> at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
> at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1011)
> at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106
)
> at java.lang.Thread.run(Unknown Source)
> org.apache.cocoon.ProcessingException: Invalid response - no xml
> at
org.apache.cocoon.generation.WebServiceProxyGenerator.fetch(WebServiceProxyG
enerator.java:269)
> at
org.apache.cocoon.generation.WebServiceProxyGenerator.generate(WebServicePro
xyGenerator.java:172)
> at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLP
ipeline(AbstractProcessingPipeline.java:515)
> at
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline
.processXMLPipeline(AbstractCachingProcessingPipeline.java:204)
> at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(Abs
tractProcessingPipeline.java:486)
> at
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(Seri
alizeNode.java:149)
> at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:83)
> at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok
e(PreparableMatchNode.java:162)
> at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:107)
> at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipel
ineNode.java:153)
> at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:107)
> at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Pipe
linesNode.java:150)
> at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:326)
> at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:308)
> at
org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNod
e.java:131)
> at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:83)
> at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok
e(PreparableMatchNode.java:162)
> at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:107)
> at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipel
ineNode.java:153)
> at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:107)
> at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Pipe
linesNode.java:150)
> at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:326)
> at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:308)
> at org.apache.cocoon.Cocoon.process(Cocoon.java:595)
> at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1025)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
> at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
> at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
> at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
> at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:201)
> at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
> at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
> at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
)
> at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
> at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
> at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
> at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
)
> at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
> at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
> at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
> at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:163)
> at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
> at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1011)
> at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106
)
> at java.lang.Thread.run(Unknown Source)
> org.apache.cocoon.ProcessingException: Invalid response - no xml
> at
org.apache.cocoon.generation.WebServiceProxyGenerator.fetch(WebServiceProxyG
enerator.java:269)
> at
org.apache.cocoon.generation.WebServiceProxyGenerator.generate(WebServicePro
xyGenerator.java:172)
> at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLP
ipeline(AbstractProcessingPipeline.java:515)
> at
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline
.processXMLPipeline(AbstractCachingProcessingPipeline.java:204)
> at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(Abs
tractProcessingPipeline.java:486)
> at
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(Seri
alizeNode.java:149)
> at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:83)
> at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok
e(PreparableMatchNode.java:162)
> at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:107)
> at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipel
ineNode.java:153)
> at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:107)
> at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Pipe
linesNode.java:150)
> at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:326)
> at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:308)
> at
org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNod
e.java:131)
> at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:83)
> at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok
e(PreparableMatchNode.java:162)
> at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:107)
> at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipel
ineNode.java:153)
> at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:107)
> at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Pipe
linesNode.java:150)
> at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:326)
> at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:308)
> at org.apache.cocoon.Cocoon.process(Cocoon.java:595)
> at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1025)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
> at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
> at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
> at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
> at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:201)
> at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
> at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
> at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
)
> at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
> at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
> at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
> at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
)
> at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
> at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
> at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
> at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:163)
> at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
> at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1011)
> at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106
)
> at java.lang.Thread.run(Unknown Source)
>
>
> Hopefully this is verbose enough to figure out what's going on.  From
> what I can see, the WSPG isn't even contacting my servlet.  If anyone
> needs more info to figure out what's happening, let me know and I'll do
> whatever I can... it'd be nice to have the WSPG actually working :)
>
>
> Millions upon millions of thanks,
>
> Tony
>
>
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
>


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: WebServiceProxy Hell

Posted by Tony Collen <tc...@hist.umn.edu>.
Alright, Here's what I got so far:

I've written a testing servlet that takes doPost, and prints out some 
valid XML.  I'm able to submit to it with a normal HTML form and get XML 
back.  I've got some debug statements in my servlet that prints to 
STDERR when a request is made so I can tell when the servlet is being 
called.  I see the debug messages when I post to the servlet using the 
plain HTML form.

Now, when I try to use the WSPG to interact with the servlet (or any 
other servlet for that matter), I'm getting the "No XML" error back. 
 When I hit Cocoon and invoke the pipeline, I notice that my debug 
servlet isn't even being called!

Here's all my stuff I have so far.  First the debug servlet:

import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class PostServlet extends HttpServlet {
   
    public void doPost(HttpServletRequest req, HttpServletResponse res)
        throws IOException, ServletException {

        System.err.println("[PostServlet] Entering doPost()");
        PrintWriter out = res.getWriter();
        String mode = req.getParameter("Mode");

        System.err.println("[PostServlet] Setting Content-type");
       
        res.setContentType("text/xml");

        System.err.println("[PostServlet] Sending XML...");
       
        out.println("<?xml version=\"1.0\"?>");
        out.println("<root>");
        out.println("\t<foo mode=\"" + mode + "\">");
       
        if (mode.equals("keyword")) {
            out.println("\t<keywords>" + req.getParameter("keywords") + 
"</keywords>");
        }

        out.println("\t</foo>");
        out.println("</root>");
       
        System.err.println("[PostServlet] Done sending XML. Exiting.");
    }
}

Here's the HTML form which submits to it:

<html>
<body>

<form method="post" action="http://localhost/postServlet">
    <textarea name="keywords" type="text" wrap="soft" cols="60" 
rows="4"></textarea>
    <input type="hidden" name="Mode" value="keyword"/>
    <input type="submit"></input>
</form>

</body>
</html>


Here's my pipeline:

<map:pipeline>

    <map:match pattern="search">
        <map:redirect-to uri="search/form.html"/>
    </map:match>

    <map:match pattern="search/form.html">
        <map:generate type="file" src="documents/searchForm.xml"/>
        <map:transform src="stylesheets/xmlform2html.xsl"/>
        <map:serialize type="html"/>
    </map:match>

    <map:match pattern="search/doSearch">
        <map:generate type="wsproxy" src="http://localhost/postServlet">
            <map:parameter name="wsproxy-method" value="POST"/>
        </map:generate>
        <map:serialize type="xml"/>
    </map:match>

</map:pipeline>


stylesheets/xmlform2html.xsl is the one which is included with the samples.

Here's my documents/searchForm.xml:

<?xml version="1.0"?>

<document xmlns:xf="http://xml.apache.org/cocoon/xmlform/2002">
    <xf:form id="keyword-search" 
action="http://localhost/cocoon/nhgis/search/doSearch" method="POST">
        <xf:caption>Keyword Search</xf:caption>
            <xf:textbox ref="keywords" name="keywords">
                <xf:caption>Keywords</xf:caption>
            </xf:textbox>      

            <xf:submit id="submit" class="button">
                <xf:caption>Submit</xf:caption>
            </xf:submit>
    </xf:form>
</document>

And finally, here's the entire stack trace of the error that Cocoon 
provides after I post to the form that "search/form.html" gives me:


ERROR   (2002-11-25) 14:43.39:499   [access  ] (/cocoon/nhgis/search/doSearch) HttpProcessor[80][4]/CocoonServlet: Problem with Cocoon servlet
org.apache.cocoon.ProcessingException: Error invoking remote service: org.apache.cocoon.ProcessingException: Invalid response - no xml: org.apache.cocoon.ProcessingException: Invalid response - no xml
	at org.apache.cocoon.generation.WebServiceProxyGenerator.fetch(WebServiceProxyGenerator.java:278)
	at org.apache.cocoon.generation.WebServiceProxyGenerator.generate(WebServiceProxyGenerator.java:172)
	at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:515)
	at org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:204)
	at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:486)
	at org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:149)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:83)
	at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:162)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:153)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:150)
	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:326)
	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:308)
	at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:131)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:83)
	at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:162)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:153)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:150)
	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:326)
	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:308)
	at org.apache.cocoon.Cocoon.process(Cocoon.java:595)
	at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1025)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011)
	at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)
	at java.lang.Thread.run(Unknown Source)
org.apache.cocoon.ProcessingException: Invalid response - no xml
	at org.apache.cocoon.generation.WebServiceProxyGenerator.fetch(WebServiceProxyGenerator.java:269)
	at org.apache.cocoon.generation.WebServiceProxyGenerator.generate(WebServiceProxyGenerator.java:172)
	at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:515)
	at org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:204)
	at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:486)
	at org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:149)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:83)
	at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:162)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:153)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:150)
	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:326)
	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:308)
	at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:131)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:83)
	at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:162)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:153)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:150)
	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:326)
	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:308)
	at org.apache.cocoon.Cocoon.process(Cocoon.java:595)
	at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1025)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011)
	at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)
	at java.lang.Thread.run(Unknown Source)
org.apache.cocoon.ProcessingException: Invalid response - no xml
	at org.apache.cocoon.generation.WebServiceProxyGenerator.fetch(WebServiceProxyGenerator.java:269)
	at org.apache.cocoon.generation.WebServiceProxyGenerator.generate(WebServiceProxyGenerator.java:172)
	at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:515)
	at org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:204)
	at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:486)
	at org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:149)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:83)
	at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:162)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:153)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:150)
	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:326)
	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:308)
	at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:131)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:83)
	at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:162)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:153)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:150)
	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:326)
	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:308)
	at org.apache.cocoon.Cocoon.process(Cocoon.java:595)
	at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1025)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011)
	at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)
	at java.lang.Thread.run(Unknown Source)


Hopefully this is verbose enough to figure out what's going on.  From 
what I can see, the WSPG isn't even contacting my servlet.  If anyone 
needs more info to figure out what's happening, let me know and I'll do 
whatever I can... it'd be nice to have the WSPG actually working :)


Millions upon millions of thanks,

Tony




---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: WebServiceProxy Hell

Posted by Tony Collen <tc...@hist.umn.edu>.
On Sat, 23 Nov 2002, Ivelin Ivanov wrote:

> Tony,
>
> Since the WSPG is a light wrapper around HttpClient,
> it may not be that easy to answer.
> The component is relatively new, so your help debugging the problem may be
> valueable to everyone.
>
> there are a set of working examples in the source code.
> See a demo here: http://www.cocoonhive.org/portal/home

Ivelin,

Thanks for your response.... and sorry if it sounded that I was getting
impatient... it was late on a Friday afternoon :)

I'll take a look at the code, and see if I can figure out what the actual
problem is.  I wrote that PHP script to take the post, but for some reason
when i was using the WSPG to access it, it just wasn't getting data for
some reason.  I had a form that would POST just fine to the script, too.

First thing Monday, I'll write a debug servlet and do a little inspection
as to what's actually going over the wire when the WSPG hits it.

And I'll write up my findings for some doc-improvement, too  :)


Regards,

Tony



Tony Collen -- tc@socsci.umn.edu
College of Liberal Arts   University of Minnesota, Minneapolis, West Bank


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: WebServiceProxy Hell

Posted by Ivelin Ivanov <iv...@apache.org>.
Tony,

Since the WSPG is a light wrapper around HttpClient,
it may not be that easy to answer.
The component is relatively new, so your help debugging the problem may be
valueable to everyone.

there are a set of working examples in the source code.
See a demo here: http://www.cocoonhive.org/portal/home

Ivelin


----- Original Message -----
From: "Tony Collen" <tc...@hist.umn.edu>
To: "cocoon-users" <co...@xml.apache.org>
Sent: Friday, November 22, 2002 5:36 PM
Subject: WebServiceProxy Hell


> Agh!
>
> I'm trying to wrap my head arounc WebServiceProxyGenerator (and
> eventually XMLForms), and I'm having all sorts of problems. I'm trying
> to post to a servlet which I *know* returns valid xml, along with the
> <?xml version="1.0"?> header.   I couldn't get it working for the life
> of me, so I prototyped a simple PHP script to take post/get vars, and
> spit out XML:
>
> <?php
>
>     $mode = $HTTP_GET_VARS['Mode'];
>     $keywords = $HTTP_GET_VARS['keywords'];
>
>     header("Content-type: text/xml");
>
>     print "<?xml version=\"1.0\"?>\n";
>     print "<results>\n";
>     print "\t<mode>$mode</mode>\n";
>     print "\t<keywords>$keywords</keywords>\n";
>     print "</results>\n";
>
> ?>
>
> Alright, pretty simple.  Next I have my pipeline:
>
>          <map:match pattern="testingtwo">
>              <map:generate type="wsproxy"
> src="http://host/testPost.php?Mode=keyword&amp;keyword=age+race+sex">
>                  <map:parameter name="wsproxy-method" value="GET"/>
>              </map:generate>
>              <map:serialize type="xml"/>
>          </map:match>
>
>
> Alas, I get the following error after I access the pipeline:
>
>
>   Cocoon 2 - Internal server error
>
> ------------------------------------------------------------------------
>
> *type* fatal
>
> *message* _Error invoking remote service: java.io.IOException: Bad chunk
> size: 58 _
>
> *description* _org.apache.cocoon.ProcessingException: Error invoking
> remote service: java.io.IOException: Bad chunk size: 58 :
> java.io.IOException: Bad chunk size: 58 _
>
> *sender* org.apache.cocoon.servlet.CocoonServlet
>
> *source* Cocoon servlet
>
> *stack-trace
> *
>
> org.apache.cocoon.ProcessingException: Error invoking remote service:
java.io.IOException: Bad chunk size: 58 : java.io.IOException: Bad chunk
size: 58
> at
org.apache.cocoon.generation.WebServiceProxyGenerator.fetch(WebServiceProxyG
enerator.java:278)
> at
org.apache.cocoon.generation.WebServiceProxyGenerator.generate(WebServicePro
xyGenerator.java:172)
> at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLP
ipeline(AbstractProcessingPipeline.java:515)
> at
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline
.processXMLPipeline(AbstractCachingProcessingPipeline.java:204)
> at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(Abs
tractProcessingPipeline.java:486)
> at
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(Seri
alizeNode.java:149)
> at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:83)
> at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok
e(PreparableMatchNode.java:162)
> at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:107)
> at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipel
ineNode.java:153)
> at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:107)
> at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Pipe
linesNode.java:150)
> at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:326)
> at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:308)
>
> *<snip/>
> *
>
> *
> *The weird thing is when I reload the pipeline in my browser, I get a
> slightly different error:
>
> *message* _Error invoking remote service:
> org.apache.commons.httpclient.HttpRecoverableException: Error in parsing
> the status line from the response: unable to find line starting with
> "HTTP/"_
>
> *description* _org.apache.cocoon.ProcessingException: Error invoking
> remote service: org.apache.commons.httpclient.HttpRecoverableException:
> Error in parsing the status line from the response: unable to find line
> starting with "HTTP/":
> org.apache.commons.httpclient.HttpRecoverableException: Error in parsing
> the status line from the response: unable to find line starting with
"HTTP/"
> _
>
> _
> _I am getting the exact same behavior when I try to connect the wsproxy
> to a servlet that takes Post:
>
>          <map:match pattern="testing">
>              <map:generate type="wsproxy" label="xml"
>
src="http://host:8080/servlets/DevServlet?Mode=keyword&amp;keywords=age+race
+sex">
>                  <map:parameter name="wsproxy-method" value="POST"/>
>              </map:generate>
>              <map:serialize type="xml"/>
>          </map:match>
>
>
> I hate to complain about the documentation, since I'm trying to help out
> with it :)  I'm eventually going to work my way up to using XMLForms,
> but I need to get the basis working correctly first.   Can anyone give
> me some pointers on how to get this working?
>
>
> Thanks! ;)
>
> Tony
>
>
>
> *
> *
>
>
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
>


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>