axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Supun Kamburugamuva" <supu...@gmail.com>
Subject Re: Redirecting Web Services
Date Thu, 17 Jul 2008 05:46:59 GMT
Hi brian,

Can you please send us the redirected message for the Axis2/C client. It
seems that their is something wrong in the XML. You can capture the message
using a tool like tcpmon http://ws.apache.org/commons/tcpmon/.

Supun..

On Wed, Jul 16, 2008 at 7:58 PM, Brian S Bates (bribates) <
bribates@cisco.com> wrote:

>  Hi,
>
> I am working on a project using REST with Axis2C, and have encountered a
> problem.  I would like to take the URI of the REST request and redirect it
> somewhere else.
>
> For example, if the user enters:
> http://server:port/loc1/service?param1=value1, I want this to be directed
> to http://server:port/newlocation/service?param1=value1
>
> Currently, I am using the mod_axis2.dll module with Apache 2.2.9.  In my
> Apache httpd.conf file, I have added the following lines (at the end):
>
> # Redirect requests to the axis2 directory
> RewriteEngine on
> RewriteRule ^/dp(.*) /axis2/restprinter$1 [R=permanent]
>
> # Axis2 C Configuration
> LoadModule axis2_module modules/mod_axis2.dll
> Axis2RepoPath C:/axis2c
> Axis2LogFile  logs/axis2.log
> Axis2LogLevel error
> Axis2ServiceURLPrefix /axis2
> Axis2MaxLogFileSize 100
> <Location />
>     SetHandler axis2_module
> </Location>
>
> ...Basically, rerouting anything with a URI that begins with /dp to
> /axis2/restprinter (the first two lines).
>
> Using this configuration in a web browser works.  That is to say, the
> redirection happens and a valid XML response is returned from my service.
> However, using an Axis2C client fails.  Looking over the log file for the
> client, it seems that the redirection is not happening?  Here is an excerpt:
>
> [Tue Jul 15 16:05:10 2008] [info]  Starting addressing out handler
> [Tue Jul 15 16:05:10 2008] [debug]
> ..\..\src\modules\mod_addr\addr_out_handler.c(133) No action present. Stop
> processing addressing
> [Tue Jul 15 16:05:10 2008] [debug]
> ..\..\src\core\transport\http\sender\http_transport_sender.c(246) ctx_epr:
> http://localhost:80/dp/go
> [Tue Jul 15 16:05:10 2008] [debug]
> ..\..\src\core\transport\http\sender\http_transport_sender.c(768) using
> axis2 native http sender.
> [Tue Jul 15 16:05:10 2008] [debug]
> ..\..\src\core\transport\http\sender\http_transport_sender.c(785) OP name
> axutil_qname_get_localpart = http://www.w3.org/2004/08/wsdl/out-in
> [Tue Jul 15 16:05:10 2008] [error]
> ..\..\axiom\src\parser\libxml2\libxml2_reader_wrapper.c(951) Space required
> after the Public Identifier
>  -- SEVERITY_ERROR
> [Tue Jul 15 16:05:10 2008] [error]
> ..\..\axiom\src\parser\libxml2\libxml2_reader_wrapper.c(951) SystemLiteral "
> or ' expected
>  -- SEVERITY_ERROR
> [Tue Jul 15 16:05:10 2008] [error]
> ..\..\axiom\src\parser\libxml2\libxml2_reader_wrapper.c(951) SYSTEM or
> PUBLIC, the URI is missing
>  -- SEVERITY_ERROR
> [Tue Jul 15 16:05:10 2008] [error]
> ..\..\axiom\src\parser\libxml2\libxml2_reader_wrapper.c(462)  error occured
> in reading xml stream
> [Tue Jul 15 16:05:10 2008] [debug] ..\..\src\core\engine\phase.c(210)
> Invoke the handler request_uri_based_dispatcher within the phase Transport
> [Tue Jul 15 16:05:10 2008] [debug] ..\..\src\core\engine\phase.c(210)
> Invoke the handler AddressingInHandler within the phase Transport
> [Tue Jul 15 16:05:10 2008] [info]  Starting addressing in handler
> [Tue Jul 15 16:05:10 2008] [info]
> ..\..\src\modules\mod_addr\addr_in_handler.c
> [Tue Jul 15 16:05:10 2008] [debug] ..\..\src\core\engine\phase.c(210)
> Invoke the handler addressing_based_dispatcher within the phase Transport
> [Tue Jul 15 16:05:10 2008] [debug] ..\..\src\core\engine\phase.c(210)
> Invoke the handler rest_dispatcher within the phase Dispatch
> [Tue Jul 15 16:05:10 2008] [debug] ..\..\src\core\engine\rest_disp.c(113)
> Checking for service using target endpoint address :
> http://localhost:80/dp/go
> [Tue Jul 15 16:05:10 2008] [debug] ..\..\src\core\engine\phase.c(210)
> Invoke the handler soap_message_body_based_dispatcher within the phase
> Dispatch
> [Tue Jul 15 16:05:10 2008] [debug] ..\..\src\core\engine\phase.c(210)
> Invoke the handler soap_action_based_dispatcher within the phase Dispatch
> [Tue Jul 15 16:05:10 2008] [debug] ..\..\src\core\engine\phase.c(210)
> Invoke the handler dispatch_post_conditions_evaluator within the phase
> PostDispatch
> [Tue Jul 15 16:05:10 2008] [debug] ..\..\src\core\engine\phase.c(210)
> Invoke the handler context_handler within the phase PostDispatch
> [Tue Jul 15 16:05:10 2008] [error] restprinter.c(92) Stub invoke FAILED:
> Error code: 2 :: NULL parameter was passed when a non NULL parameter was
> expected
>
> To make a long story short, is it possible for the Axis2C client to handle
> such a redirect?  Also, if it makes a difference, I am testing both the
> client and server on the same machine.
>
> Thanks,
> Brian
>

Mime
View raw message