You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Ivelin Ivanov <iv...@apache.org> on 2002/07/22 02:02:09 UTC

Re: WebServiceProxy

Interesting case.

Appears that two sessions are crossing each other's ways.

I have tried multiple browsers with multiple sessions working against the
same Feedback wizard, to test for this.
WSProxy uses the jakarta HttpClient library, which saves and reuses the
cookies, thus the session, if started by the remote application.

Maybe you will need to dump all HTTP headers to be able to track down the
problem.
Once you identify it, please let me know what it is, so we can discuss a
possible patch.


Cheers,

Ivelin



----- Original Message -----
From: "Michael Wechner" <mi...@wyona.org>
To: <co...@xml.apache.org>
Sent: Sunday, July 21, 2002 10:29 PM
Subject: WebServiceProxy


> Hi
>
> I started to check the WebServiceProxy.
>
> I am using Linux (2.4) JDK1.3.1 and Tomcat 4.0.4-b3 and
> xml-cocoon2_20020719041901.tar.gz (2.1-dev)
>
> I included the following pipeline into the sitemap
>
>      <map:match pattern="HelloWorld">
>         <map:generate type="wsproxy"
> src="http://localhost:8080/wyona-cms/servlet/HelloWorld" labe
> l="xml"/>
>         <map:serialize type="xml"/>
>       </map:match>
>
> The HelloWorld servlet returns the following XML
>
> <servlet class="org.wyona.cms.cocoon.generation.HelloWorld">
> <request method="GET"><nosession/></request></servlet>
>
> Because I forgot the line <?xml version="1.0"?> I received an error,
> but then the problem was that "samples/webserviceproxy" didn't run
> anymore, which means I received a broken pipe error.
>
> After I inserted the line <?xml version="1.0"?> it seemed to be alright.
>
> But when I started to create a session, then it broke again. I checked
> the same cocoon instance with another browser, which didn't have a session
yet.
> It worked. As soon as I created a session, the WebServiceProxy crashed for
this client.
> Please see below the stack trace.
> I guess it must have something to do with "passing the session" resp.
"passing the cookies".
> But I didn't find anything within your code, where you would do something
like that.
>
>
> Thanks
>
> Michael
>
> Original exception : java.io.IOException: Broken pipe
> at java.net.SocketOutputStream.socketWrite(Native Method)
> at java.net.SocketOutputStream.write(SocketOutputStream.java:71)
> at
>
org.apache.commons.httpclient.HttpConnection.write(HttpConnection.java:363)
> at
>
org.apache.commons.httpclient.HttpConnection.print(HttpConnection.java:433)
> at
>
org.apache.commons.httpclient.HttpMethodBase.writeRequestHeaders(HttpMethodB
ase.java:741)
> at
>
org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.jav
a:693)
> at
>
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:469
)
> at
>
org.apache.commons.httpclient.HttpMultiClient.executeMethod(HttpMultiClient.
java:286)
> at
>
org.apache.cocoon.generation.WebServiceProxyGenerator.fetch(WebServiceProxyG
enerator.java:254)
> at
>
org.apache.cocoon.generation.WebServiceProxyGenerator.generate(WebServicePro
xyGenerator.java:172)
> at
>
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLP
ipeline(AbstractProcessingPipeline.java:501)
> at
>
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline
.processXMLPipeline(AbstractCachingProcessingPipeline.java:204)
> at
>
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(Abs
tractProcessingPipeline.java:476)
> at
>
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(Seri
alizeNode.java:146)
> at
>
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:83)
> at
>
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok
e(PreparableMatchNode.java:160)
> at
>
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:107)
> at
>
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipel
ineNode.java:157)
> at
>
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:107)
> at
>
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Pipe
linesNode.java:152)
> at
>
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:328)
> at
>
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:309)
> 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:160)
> at
>
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:107)
> at
>
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipel
ineNode.java:157)
> at
>
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:107)
> at
>
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Pipe
linesNode.java:152)
> at
>
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:328)
> at
>
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:309)
> 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:160)
> at
>
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:107)
> at
>
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipel
ineNode.java:157)
> at
>
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:107)
> at
>
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Pipe
linesNode.java:152)
> at
>
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:328)
> at
>
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:309)
> at org.apache.cocoon.Cocoon.process(Cocoon.java:585)
> at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:997)
> 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:190)
> 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:2347)
> at
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
> 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:468)
> 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
:174)
> 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:
1027)
> at
>
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125
)
> at java.lang.Thread.run(Thread.java:484)
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: WebServiceProxy

Posted by Michael Wechner <mi...@wyona.org>.

Ivelin Ivanov wrote:

>The HttpMultiClient maintains a session by default.
>
>Interestingly the HttpClient has been a stable alpha for many months.
>There are occasionally discussions for upgrading it to 1.0, but no one has
>stepped up to do that.
>
>HttpMultiClient is the one that has the richest functionality and is
>preferred to use over the plain HttpClient.
>
>Other than the JavaDoc, I have found much use from the unit tests and the
>jakarta-commons discussion list.
>

Thanks Ivelin. I will dive into it.

Michael

>
>
>
>Ivelin
>
>
>----- Original Message -----
>From: "Michael Wechner" <mi...@wyona.org>
>To: <co...@xml.apache.org>
>Sent: Monday, July 22, 2002 5:06 PM
>Subject: Re: WebServiceProxy
>
>
>>
>>Ivelin Ivanov wrote:
>>
>>>Interesting case.
>>>
>>>Appears that two sessions are crossing each other's ways.
>>>
>>>I have tried multiple browsers with multiple sessions working against the
>>>same Feedback wizard, to test for this.
>>>WSProxy uses the jakarta HttpClient library, which saves and reuses the
>>>cookies, thus the session, if started by the remote application.
>>>
>>>Maybe you will need to dump all HTTP headers to be able to track down the
>>>problem.
>>>Once you identify it, please let me know what it is, so we can discuss a
>>>possible patch.
>>>
>>I will try to locate the problem.
>>
>>Can you give me a hint where you tell the HttpClient to save
>>and reuse the cookies (or is this just default behaviour)?
>>
>>And what is the role of the HttpMultiClient?
>>
>>And do you know a URL of any "advanced" documentation of the HttpClient
>>library form jakarta,
>> or is there only the JavaDoc?
>>
>>Thanks
>>
>>Michael
>>
>>
>>>
>>>
>>>Cheers,
>>>
>>>Ivelin
>>>
>>>
>>>
>>>----- Original Message -----
>>>From: "Michael Wechner" <mi...@wyona.org>
>>>To: <co...@xml.apache.org>
>>>Sent: Sunday, July 21, 2002 10:29 PM
>>>Subject: WebServiceProxy
>>>
>>>
>>>>Hi
>>>>
>>>>I started to check the WebServiceProxy.
>>>>
>>>>I am using Linux (2.4) JDK1.3.1 and Tomcat 4.0.4-b3 and
>>>>xml-cocoon2_20020719041901.tar.gz (2.1-dev)
>>>>
>>>>I included the following pipeline into the sitemap
>>>>
>>>>    <map:match pattern="HelloWorld">
>>>>       <map:generate type="wsproxy"
>>>>src="http://localhost:8080/wyona-cms/servlet/HelloWorld" labe
>>>>l="xml"/>
>>>>       <map:serialize type="xml"/>
>>>>     </map:match>
>>>>
>>>>The HelloWorld servlet returns the following XML
>>>>
>>>><servlet class="org.wyona.cms.cocoon.generation.HelloWorld">
>>>><request method="GET"><nosession/></request></servlet>
>>>>
>>>>Because I forgot the line <?xml version="1.0"?> I received an error,
>>>>but then the problem was that "samples/webserviceproxy" didn't run
>>>>anymore, which means I received a broken pipe error.
>>>>
>>>>After I inserted the line <?xml version="1.0"?> it seemed to be alright.
>>>>
>>>>But when I started to create a session, then it broke again. I checked
>>>>the same cocoon instance with another browser, which didn't have a
>>>>
>session
>
>>>yet.
>>>
>>>>It worked. As soon as I created a session, the WebServiceProxy crashed
>>>>
>for
>
>>>this client.
>>>
>>>>Please see below the stack trace.
>>>>I guess it must have something to do with "passing the session" resp.
>>>>
>>>"passing the cookies".
>>>
>>>>But I didn't find anything within your code, where you would do
>>>>
>something
>
>>>like that.
>>>
>>>>Thanks
>>>>
>>>>Michael
>>>>



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: WebServiceProxy

Posted by Ivelin Ivanov <iv...@apache.org>.
The HttpMultiClient maintains a session by default.

Interestingly the HttpClient has been a stable alpha for many months.
There are occasionally discussions for upgrading it to 1.0, but no one has
stepped up to do that.

HttpMultiClient is the one that has the richest functionality and is
preferred to use over the plain HttpClient.

Other than the JavaDoc, I have found much use from the unit tests and the
jakarta-commons discussion list.


Ivelin


----- Original Message -----
From: "Michael Wechner" <mi...@wyona.org>
To: <co...@xml.apache.org>
Sent: Monday, July 22, 2002 5:06 PM
Subject: Re: WebServiceProxy


>
>
> Ivelin Ivanov wrote:
>
> >Interesting case.
> >
> >Appears that two sessions are crossing each other's ways.
> >
> >I have tried multiple browsers with multiple sessions working against the
> >same Feedback wizard, to test for this.
> >WSProxy uses the jakarta HttpClient library, which saves and reuses the
> >cookies, thus the session, if started by the remote application.
> >
> >Maybe you will need to dump all HTTP headers to be able to track down the
> >problem.
> >Once you identify it, please let me know what it is, so we can discuss a
> >possible patch.
> >
>
> I will try to locate the problem.
>
> Can you give me a hint where you tell the HttpClient to save
> and reuse the cookies (or is this just default behaviour)?
>
> And what is the role of the HttpMultiClient?
>
> And do you know a URL of any "advanced" documentation of the HttpClient
> library form jakarta,
>  or is there only the JavaDoc?
>
> Thanks
>
> Michael
>
>
> >
> >
> >
> >Cheers,
> >
> >Ivelin
> >
> >
> >
> >----- Original Message -----
> >From: "Michael Wechner" <mi...@wyona.org>
> >To: <co...@xml.apache.org>
> >Sent: Sunday, July 21, 2002 10:29 PM
> >Subject: WebServiceProxy
> >
> >
> >>Hi
> >>
> >>I started to check the WebServiceProxy.
> >>
> >>I am using Linux (2.4) JDK1.3.1 and Tomcat 4.0.4-b3 and
> >>xml-cocoon2_20020719041901.tar.gz (2.1-dev)
> >>
> >>I included the following pipeline into the sitemap
> >>
> >>     <map:match pattern="HelloWorld">
> >>        <map:generate type="wsproxy"
> >>src="http://localhost:8080/wyona-cms/servlet/HelloWorld" labe
> >>l="xml"/>
> >>        <map:serialize type="xml"/>
> >>      </map:match>
> >>
> >>The HelloWorld servlet returns the following XML
> >>
> >><servlet class="org.wyona.cms.cocoon.generation.HelloWorld">
> >><request method="GET"><nosession/></request></servlet>
> >>
> >>Because I forgot the line <?xml version="1.0"?> I received an error,
> >>but then the problem was that "samples/webserviceproxy" didn't run
> >>anymore, which means I received a broken pipe error.
> >>
> >>After I inserted the line <?xml version="1.0"?> it seemed to be alright.
> >>
> >>But when I started to create a session, then it broke again. I checked
> >>the same cocoon instance with another browser, which didn't have a
session
> >>
> >yet.
> >
> >>It worked. As soon as I created a session, the WebServiceProxy crashed
for
> >>
> >this client.
> >
> >>Please see below the stack trace.
> >>I guess it must have something to do with "passing the session" resp.
> >>
> >"passing the cookies".
> >
> >>But I didn't find anything within your code, where you would do
something
> >>
> >like that.
> >
> >>
> >>Thanks
> >>
> >>Michael
> >>
> >>Original exception : java.io.IOException: Broken pipe
> >>at java.net.SocketOutputStream.socketWrite(Native Method)
> >>at java.net.SocketOutputStream.write(SocketOutputStream.java:71)
> >>at
> >>
>
>org.apache.commons.httpclient.HttpConnection.write(HttpConnection.java:363)
> >
> >>at
> >>
>
>org.apache.commons.httpclient.HttpConnection.print(HttpConnection.java:433)
> >
> >>at
> >>
>
>org.apache.commons.httpclient.HttpMethodBase.writeRequestHeaders(HttpMethod
B
> >ase.java:741)
> >
> >>at
> >>
>
>org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.ja
v
> >a:693)
> >
> >>at
> >>
>
>org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:46
9
> >)
> >
> >>at
> >>
>
>org.apache.commons.httpclient.HttpMultiClient.executeMethod(HttpMultiClient
.
> >java:286)
> >
> >>at
> >>
>
>org.apache.cocoon.generation.WebServiceProxyGenerator.fetch(WebServiceProxy
G
> >enerator.java:254)
> >
> >>at
> >>
>
>org.apache.cocoon.generation.WebServiceProxyGenerator.generate(WebServicePr
o
> >xyGenerator.java:172)
> >
> >>at
> >>
>
>org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXML
P
> >ipeline(AbstractProcessingPipeline.java:501)
> >
> >>at
> >>
>
>org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipelin
e
> >.processXMLPipeline(AbstractCachingProcessingPipeline.java:204)
> >
> >>at
> >>
>
>org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(Ab
s
> >tractProcessingPipeline.java:476)
> >
> >>at
> >>
>
>org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(Ser
i
> >alizeNode.java:146)
> >
> >>at
> >>
>
>org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.inv
o
> >keNodes(AbstractParentProcessingNode.java:83)
> >
> >>at
> >>
>
>org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invo
k
> >e(PreparableMatchNode.java:160)
> >
> >>at
> >>
>
>org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.inv
o
> >keNodes(AbstractParentProcessingNode.java:107)
> >
> >>at
> >>
>
>org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipe
l
> >ineNode.java:157)
> >
> >>at
> >>
>
>org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.inv
o
> >keNodes(AbstractParentProcessingNode.java:107)
> >
> >>at
> >>
>
>org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Pip
e
> >linesNode.java:152)
> >
> >>at
> >>
>
>org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProces
s
> >or.java:328)
> >
> >>at
> >>
>
>org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProces
s
> >or.java:309)
> >
> >>at
> >>
>
>org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNo
d
> >e.java:131)
> >
> >>at
> >>
>
>org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.inv
o
> >keNodes(AbstractParentProcessingNode.java:83)
> >
> >>at
> >>
>
>org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invo
k
> >e(PreparableMatchNode.java:160)
> >
> >>at
> >>
>
>org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.inv
o
> >keNodes(AbstractParentProcessingNode.java:107)
> >
> >>at
> >>
>
>org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipe
l
> >ineNode.java:157)
> >
> >>at
> >>
>
>org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.inv
o
> >keNodes(AbstractParentProcessingNode.java:107)
> >
> >>at
> >>
>
>org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Pip
e
> >linesNode.java:152)
> >
> >>at
> >>
>
>org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProces
s
> >or.java:328)
> >
> >>at
> >>
>
>org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProces
s
> >or.java:309)
> >
> >>at
> >>
>
>org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNo
d
> >e.java:131)
> >
> >>at
> >>
>
>org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.inv
o
> >keNodes(AbstractParentProcessingNode.java:83)
> >
> >>at
> >>
>
>org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invo
k
> >e(PreparableMatchNode.java:160)
> >
> >>at
> >>
>
>org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.inv
o
> >keNodes(AbstractParentProcessingNode.java:107)
> >
> >>at
> >>
>
>org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipe
l
> >ineNode.java:157)
> >
> >>at
> >>
>
>org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.inv
o
> >keNodes(AbstractParentProcessingNode.java:107)
> >
> >>at
> >>
>
>org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Pip
e
> >linesNode.java:152)
> >
> >>at
> >>
>
>org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProces
s
> >or.java:328)
> >
> >>at
> >>
>
>org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProces
s
> >or.java:309)
> >
> >>at org.apache.cocoon.Cocoon.process(Cocoon.java:585)
> >>at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:997)
> >>at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >>at
> >>
>
>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio
n
> >FilterChain.java:247)
> >
> >>at
> >>
>
>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC
h
> >ain.java:193)
> >
> >>at
> >>
>
>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.j
a
> >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.j
a
> >va:190)
> >
> >>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:2347)
> >>at
> >>
>
>org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:18
0
> >)
> >
> >>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:17
0
> >)
> >
> >>at
> >>
>
>org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:
5
> >64)
> >
> >>at
> >>
> >org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
> >
> >>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.jav
a
> >:174)
> >
> >>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
:
> >1027)
> >
> >>at
> >>
>
>org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:112
5
> >)
> >
> >>at java.lang.Thread.run(Thread.java:484)
> >>
> >>
> >>
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> >>For additional commands, email: cocoon-dev-help@xml.apache.org
> >>
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> >For additional commands, email: cocoon-dev-help@xml.apache.org
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: WebServiceProxy

Posted by Michael Wechner <mi...@wyona.org>.

Ivelin Ivanov wrote:

>Interesting case.
>
>Appears that two sessions are crossing each other's ways.
>
>I have tried multiple browsers with multiple sessions working against the
>same Feedback wizard, to test for this.
>WSProxy uses the jakarta HttpClient library, which saves and reuses the
>cookies, thus the session, if started by the remote application.
>
>Maybe you will need to dump all HTTP headers to be able to track down the
>problem.
>Once you identify it, please let me know what it is, so we can discuss a
>possible patch.
>

I will try to locate the problem.

Can you give me a hint where you tell the HttpClient to save
and reuse the cookies (or is this just default behaviour)?

And what is the role of the HttpMultiClient?

And do you know a URL of any "advanced" documentation of the HttpClient 
library form jakarta,
 or is there only the JavaDoc?

Thanks

Michael


>
>
>
>Cheers,
>
>Ivelin
>
>
>
>----- Original Message -----
>From: "Michael Wechner" <mi...@wyona.org>
>To: <co...@xml.apache.org>
>Sent: Sunday, July 21, 2002 10:29 PM
>Subject: WebServiceProxy
>
>
>>Hi
>>
>>I started to check the WebServiceProxy.
>>
>>I am using Linux (2.4) JDK1.3.1 and Tomcat 4.0.4-b3 and
>>xml-cocoon2_20020719041901.tar.gz (2.1-dev)
>>
>>I included the following pipeline into the sitemap
>>
>>     <map:match pattern="HelloWorld">
>>        <map:generate type="wsproxy"
>>src="http://localhost:8080/wyona-cms/servlet/HelloWorld" labe
>>l="xml"/>
>>        <map:serialize type="xml"/>
>>      </map:match>
>>
>>The HelloWorld servlet returns the following XML
>>
>><servlet class="org.wyona.cms.cocoon.generation.HelloWorld">
>><request method="GET"><nosession/></request></servlet>
>>
>>Because I forgot the line <?xml version="1.0"?> I received an error,
>>but then the problem was that "samples/webserviceproxy" didn't run
>>anymore, which means I received a broken pipe error.
>>
>>After I inserted the line <?xml version="1.0"?> it seemed to be alright.
>>
>>But when I started to create a session, then it broke again. I checked
>>the same cocoon instance with another browser, which didn't have a session
>>
>yet.
>
>>It worked. As soon as I created a session, the WebServiceProxy crashed for
>>
>this client.
>
>>Please see below the stack trace.
>>I guess it must have something to do with "passing the session" resp.
>>
>"passing the cookies".
>
>>But I didn't find anything within your code, where you would do something
>>
>like that.
>
>>
>>Thanks
>>
>>Michael
>>
>>Original exception : java.io.IOException: Broken pipe
>>at java.net.SocketOutputStream.socketWrite(Native Method)
>>at java.net.SocketOutputStream.write(SocketOutputStream.java:71)
>>at
>>
>org.apache.commons.httpclient.HttpConnection.write(HttpConnection.java:363)
>
>>at
>>
>org.apache.commons.httpclient.HttpConnection.print(HttpConnection.java:433)
>
>>at
>>
>org.apache.commons.httpclient.HttpMethodBase.writeRequestHeaders(HttpMethodB
>ase.java:741)
>
>>at
>>
>org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.jav
>a:693)
>
>>at
>>
>org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:469
>)
>
>>at
>>
>org.apache.commons.httpclient.HttpMultiClient.executeMethod(HttpMultiClient.
>java:286)
>
>>at
>>
>org.apache.cocoon.generation.WebServiceProxyGenerator.fetch(WebServiceProxyG
>enerator.java:254)
>
>>at
>>
>org.apache.cocoon.generation.WebServiceProxyGenerator.generate(WebServicePro
>xyGenerator.java:172)
>
>>at
>>
>org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLP
>ipeline(AbstractProcessingPipeline.java:501)
>
>>at
>>
>org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline
>.processXMLPipeline(AbstractCachingProcessingPipeline.java:204)
>
>>at
>>
>org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(Abs
>tractProcessingPipeline.java:476)
>
>>at
>>
>org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(Seri
>alizeNode.java:146)
>
>>at
>>
>org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
>keNodes(AbstractParentProcessingNode.java:83)
>
>>at
>>
>org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok
>e(PreparableMatchNode.java:160)
>
>>at
>>
>org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
>keNodes(AbstractParentProcessingNode.java:107)
>
>>at
>>
>org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipel
>ineNode.java:157)
>
>>at
>>
>org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
>keNodes(AbstractParentProcessingNode.java:107)
>
>>at
>>
>org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Pipe
>linesNode.java:152)
>
>>at
>>
>org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
>or.java:328)
>
>>at
>>
>org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
>or.java:309)
>
>>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:160)
>
>>at
>>
>org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
>keNodes(AbstractParentProcessingNode.java:107)
>
>>at
>>
>org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipel
>ineNode.java:157)
>
>>at
>>
>org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
>keNodes(AbstractParentProcessingNode.java:107)
>
>>at
>>
>org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Pipe
>linesNode.java:152)
>
>>at
>>
>org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
>or.java:328)
>
>>at
>>
>org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
>or.java:309)
>
>>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:160)
>
>>at
>>
>org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
>keNodes(AbstractParentProcessingNode.java:107)
>
>>at
>>
>org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipel
>ineNode.java:157)
>
>>at
>>
>org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
>keNodes(AbstractParentProcessingNode.java:107)
>
>>at
>>
>org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Pipe
>linesNode.java:152)
>
>>at
>>
>org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
>or.java:328)
>
>>at
>>
>org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
>or.java:309)
>
>>at org.apache.cocoon.Cocoon.process(Cocoon.java:585)
>>at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:997)
>>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:190)
>
>>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:2347)
>>at
>>
>org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
>)
>
>>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:468)
>
>>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
>:174)
>
>>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:
>1027)
>
>>at
>>
>org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125
>)
>
>>at java.lang.Thread.run(Thread.java:484)
>>
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
>>For additional commands, email: cocoon-dev-help@xml.apache.org
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
>For additional commands, email: cocoon-dev-help@xml.apache.org
>



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org