axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Offer <rof...@hotlinkv.com>
Subject mod_rewrite and Axis2C endpoints
Date Fri, 29 Apr 2011 04:12:31 GMT

I have two endpoints I need to support (I'm replacing an existing legacy
SOAP server that has existing (external) clients so I need to support the
old URLs).


/fred

/api/henry


Each is implemented as its own service.

I've had some success with using Apache's mod rewrite to map /api/henry to
/axis2/services/henry

RewriteEngine on
RewriteRule ^/api/henry$	/axis2/services/henry [PT,L]
RewriteRule ^/fred$	/axis2/services/fred [PT,L]


Then

<Location /axis2>
    SetHandler axis2_module
    RewriteEngine On
    RewriteOptions Inherit
</Location>


All that makes sense to me ­ however I needed the following for /api/henry
to work

Axis2ServiceURLPrefix api
<Location /api>
    SetHandler axis2_module
    RewriteEngine On
    RewriteOptions Inherit
</Location>


And the problem is that the latter part, seems to mean that /fred doesn't
work.


All the error messages are from mod_axis ­ so it is handling /fred ­ but
then complaining that

Service Not Found, Endpoint referance address is http://127.0.0.1/fred and
wsa actions is (null)

( the longer messages are

[Thu Apr 28 20:52:49 2011] [debug]
/home/roffer/SRC/trunk/lib/axis2c-1.7.0-rc12/src/core/transport/http/server
/apache2/apache2_worker.c(241) http://127.0.0.1/fred
[Thu Apr 28 20:52:49 2011] [debug]
/home/roffer/SRC/trunk/lib/axis2c-1.7.0-rc12/src/core/transport/http/server
/apache2/apache2_worker.c(299) Client HTTP version HTTP/1.1
[Thu Apr 28 20:52:49 2011] [debug]
/home/roffer/SRC/trunk/lib/axis2c-1.7.0-rc12/axiom/src/soap/soap_builder.c(
883) Identified soap version is soap11
[Thu Apr 28 20:52:49 2011] [debug]
/home/roffer/SRC/trunk/lib/axis2c-1.7.0-rc12/src/core/engine/phase.c(202)
Invoke the handler request_uri_based_dispatcher within the phase Transport
[Thu Apr 28 20:52:49 2011] [debug]
/home/roffer/SRC/trunk/lib/axis2c-1.7.0-rc12/src/core/engine/req_uri_disp.c
(97) Checking for service using target endpoint address :
http://127.0.0.1/fred
[Thu Apr 28 20:52:49 2011] [debug]
/home/roffer/SRC/trunk/lib/axis2c-1.7.0-rc12/src/core/engine/phase.c(202)
Invoke the handler addressing_based_dispatcher within the phase Transport
[Thu Apr 28 20:52:49 2011] [debug]
/home/roffer/SRC/trunk/lib/axis2c-1.7.0-rc12/src/core/engine/addr_disp.c(10
3) Checking for service using WSA enpoint address : http://127.0.0.1/fred
[Thu Apr 28 20:52:49 2011] [debug]
/home/roffer/SRC/trunk/lib/axis2c-1.7.0-rc12/src/core/engine/phase.c(202)
Invoke the handler LoggingInHandler within the phase PreDispatch
[Thu Apr 28 20:52:49 2011] [info]  Starting logging in handler .........
[Thu Apr 28 20:52:49 2011] [info]  Input message: <soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><Ge
tFredInfo xmlns="urn:fred"><_this
type="FredService">fred</_this></GetFredInfo></soapenv:Body></soapenv:Envel
ope>
[Thu Apr 28 20:52:49 2011] [debug]
/home/roffer/SRC/trunk/lib/axis2c-1.7.0-rc12/src/core/engine/phase.c(202)
Invoke the handler rest_dispatcher within the phase Dispatch
[Thu Apr 28 20:52:49 2011] [debug]
/home/roffer/SRC/trunk/lib/axis2c-1.7.0-rc12/src/core/engine/phase.c(202)
Invoke the handler soap_message_body_based_dispatcher within the phase
Dispatch
[Thu Apr 28 20:52:49 2011] [debug]
/home/roffer/SRC/trunk/lib/axis2c-1.7.0-rc12/src/core/engine/soap_body_disp
.c(115) Checking for service using SOAP message body's first child's
namespace URI : urn:fred
[Thu Apr 28 20:52:49 2011] [debug]
/home/roffer/SRC/trunk/lib/axis2c-1.7.0-rc12/src/core/engine/phase.c(202)
Invoke the handler soap_action_based_dispatcher within the phase Dispatch
[Thu Apr 28 20:52:49 2011] [debug]
/home/roffer/SRC/trunk/lib/axis2c-1.7.0-rc12/src/core/engine/soap_action_di
sp.c(84) Checking for service using SOAPAction is not implemented
[Thu Apr 28 20:52:49 2011] [debug]
/home/roffer/SRC/trunk/lib/axis2c-1.7.0-rc12/src/core/engine/phase.c(202)
Invoke the handler dispatch_post_conditions_evaluator within the phase
PostDispatch
[Thu Apr 28 20:52:49 2011] [info]  Service Not found. Endpoint reference
is : http://127.0.0.1/fred
[Thu Apr 28 20:52:49 2011] [error]
/home/roffer/SRC/trunk/lib/axis2c-1.7.0-rc12/src/core/engine/phase.c(224)
Handler dispatch_post_conditions_evaluator invoke failed within phase
PostDispatch
[Thu Apr 28 20:52:49 2011] [error]
/home/roffer/SRC/trunk/lib/axis2c-1.7.0-rc12/src/core/engine/engine.c(657)
Invoking phase PostDispatch failed
[Thu Apr 28 20:52:49 2011] [error]
/home/roffer/SRC/trunk/lib/axis2c-1.7.0-rc12/src/core/engine/engine.c(241)
Invoking pre-calculated phases failed
[Thu Apr 28 20:52:49 2011] [warning]
/home/roffer/SRC/trunk/lib/axis2c-1.7.0-rc12/src/core/context/msg_ctx.c(138
4) session-table not set in message context



My questions are :

Why do I need to add the location block for /api ­ with the corresponding
prefix ? My assumption is that mod_rewrite is mapping to
/axis2/services/fred so that is the only URL that mod_axis sees.

I've read http://wso2.org/library/2663 regarding handling /fred ­ even
forgetting about compatilbity with /api/henry it doesn't work. I've tried
recompiling mod_axis2 with the prefix set to both / and "" (empty string)
- still no luck.


Any thoughts on other things to try ?



I'm using Axis2C 1.7 RC12


Richard.










---------------------------------------------------------------------
To unsubscribe, e-mail: c-user-unsubscribe@axis.apache.org
For additional commands, e-mail: c-user-help@axis.apache.org


Mime
View raw message