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/27 22:24:44 UTC

[Summary] WebServiceProxyGenerator & wsproxy-method parameter

Hi list(s),

After almost a week of pounding my head on the cement, I've figured out 
what's been going on with the WSPG.  Consider the following pipeline:

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

Alright, simple enough, correct?  The only "odd" thing about this is 
that is uses the wsproxy-method parameter, which I used according to 
samples/webserviceproxy/README.txt.

For some reason however, even though I told the WSPG to POST to the 
servlet, it refused.  Here's the (very verbose) output from my debug 
servlet I wrote:

1 [PostServlet] doGet() called
2 [PostServlet] Passing request and response to doPost()
3 [PostServlet] doPost() called
4 [PostServlet] Getting parameter "Mode" from request.
5 [PostServlet] Mode is null!
6 [PostServlet] Sending some XML anyway.
7 [PostServlet] Done sending XML. Exiting.

The following output leads me to the following two conclusions:

1)  Even though I'm telling the WSPG to use POST on the remote service, 
it's not (Line 1).
    1a) I can't see anywhere in the WSPG code where it's getting the 
wsproxy-method configuration parameter :)

2) When the WSPG copies over the request parameters, somehow the POST 
parameters are either not being copied over, or they're being stomped on 
somehow.  Basically, the WSPG is not proxying the POST parameters 
correctly (Lines 4 and 5).

For now, I'll file a bug.  Ivelin, perhaps we can work together to get 
this functioning correctly... mostly because I need it to work correctly 
to get my job done :)  If anything I'll submit a patch to add some more 
useful debug logging to the WSPG.


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: [Summary] WebServiceProxyGenerator & wsproxy-method parameter

Posted by Ivelin Ivanov <iv...@apache.org>.
Thanks for helping improve the component.
I am in a bit of time crunch lately.


Ivelin



----- Original Message -----
From: "Tony Collen" <tc...@hist.umn.edu>
To: <co...@xml.apache.org>
Sent: Thursday, November 28, 2002 12:09 AM
Subject: Re: [Summary] WebServiceProxyGenerator & wsproxy-method parameter


> On Wed, 27 Nov 2002, Ivelin Ivanov wrote:
>
> > Tony,
> >
> > my apologies for the POST problem.
> > The WSPG does not read the wsproxy-method parameter yet.
> > It passes as a GET everything.
> > This is relatively easy to fix.
> > If you can spend a few more minutes (after one of banging your head in
the
> > wall;)
> > see the WSPG code which initializes the HttpClient Method with a GET and
> > replace that with
> > a configurable behavior.
>
> Ivelin,
>
> Not a problem at all... let's just say I'm familliar with the WSPG code :)
> Another good thing that came from this is that I decided to write a
> generator that basically encapsulated all the code in the servlet that was
> generating the XML and wrote a generator :)
>
> Another problem was that for some reason, when Cocoon was connecting to
> the remote servlet, the httpclient would not get any response from the
> server, which I think was an actual network problem.  I hope moving the
> WSPG to the same server will alleviate that problem.
>
> Like I said in my previous message, I'll probably submit a patch to the
> existing WSPG to add some more useful debugging info, and then spend some
> time adding some functionality to the component.
>
> And perhaps adding a message to the README about what actually doesn't
> work would be nice, too :)
>
> Thanks for all the help and the patience!
>
> Regards,
> Tony
>
>
>
> Tony Collen -- tc@socsci.umn.edu
> College of Liberal Arts   University of Minnesota, Minneapolis, West Bank
>
>
> ---------------------------------------------------------------------
> 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: [Summary] WebServiceProxyGenerator & wsproxy-method parameter

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

> Tony,
>
> my apologies for the POST problem.
> The WSPG does not read the wsproxy-method parameter yet.
> It passes as a GET everything.
> This is relatively easy to fix.
> If you can spend a few more minutes (after one of banging your head in the
> wall;)
> see the WSPG code which initializes the HttpClient Method with a GET and
> replace that with
> a configurable behavior.

Ivelin,

Not a problem at all... let's just say I'm familliar with the WSPG code :)
Another good thing that came from this is that I decided to write a
generator that basically encapsulated all the code in the servlet that was
generating the XML and wrote a generator :)

Another problem was that for some reason, when Cocoon was connecting to
the remote servlet, the httpclient would not get any response from the
server, which I think was an actual network problem.  I hope moving the
WSPG to the same server will alleviate that problem.

Like I said in my previous message, I'll probably submit a patch to the
existing WSPG to add some more useful debugging info, and then spend some
time adding some functionality to the component.

And perhaps adding a message to the README about what actually doesn't
work would be nice, too :)

Thanks for all the help and the patience!

Regards,
Tony



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


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


Re: [Summary] WebServiceProxyGenerator & wsproxy-method parameter

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

my apologies for the POST problem.
The WSPG does not read the wsproxy-method parameter yet.
It passes as a GET everything.
This is relatively easy to fix.
If you can spend a few more minutes (after one of banging your head in the
wall;)
see the WSPG code which initializes the HttpClient Method with a GET and
replace that with
a configurable behavior.


Ivelin



----- Original Message -----
From: "Tony Collen" <tc...@hist.umn.edu>
To: <co...@xml.apache.org>; <co...@xml.apache.org>
Sent: Wednesday, November 27, 2002 3:24 PM
Subject: [Summary] WebServiceProxyGenerator & wsproxy-method parameter


> Hi list(s),
>
> After almost a week of pounding my head on the cement, I've figured out
> what's been going on with the WSPG.  Consider the following pipeline:
>
>     <map:match pattern="search/doSearch">
>         <map:generate type="debugwsproxy"
> src="http://localhost/postServlet">
>             <map:parameter name="wsproxy-method" value="POST"/>
>         </map:generate>
>         <map:serialize type="xml"/>
>     </map:match>
>
> Alright, simple enough, correct?  The only "odd" thing about this is
> that is uses the wsproxy-method parameter, which I used according to
> samples/webserviceproxy/README.txt.
>
> For some reason however, even though I told the WSPG to POST to the
> servlet, it refused.  Here's the (very verbose) output from my debug
> servlet I wrote:
>
> 1 [PostServlet] doGet() called
> 2 [PostServlet] Passing request and response to doPost()
> 3 [PostServlet] doPost() called
> 4 [PostServlet] Getting parameter "Mode" from request.
> 5 [PostServlet] Mode is null!
> 6 [PostServlet] Sending some XML anyway.
> 7 [PostServlet] Done sending XML. Exiting.
>
> The following output leads me to the following two conclusions:
>
> 1)  Even though I'm telling the WSPG to use POST on the remote service,
> it's not (Line 1).
>     1a) I can't see anywhere in the WSPG code where it's getting the
> wsproxy-method configuration parameter :)
>
> 2) When the WSPG copies over the request parameters, somehow the POST
> parameters are either not being copied over, or they're being stomped on
> somehow.  Basically, the WSPG is not proxying the POST parameters
> correctly (Lines 4 and 5).
>
> For now, I'll file a bug.  Ivelin, perhaps we can work together to get
> this functioning correctly... mostly because I need it to work correctly
> to get my job done :)  If anything I'll submit a patch to add some more
> useful debug logging to the WSPG.
>
>
> 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>
>


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