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: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to