Return-Path: X-Original-To: apmail-axis-c-user-archive@www.apache.org Delivered-To: apmail-axis-c-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1413B806D for ; Tue, 30 Aug 2011 22:48:49 +0000 (UTC) Received: (qmail 29695 invoked by uid 500); 30 Aug 2011 22:48:48 -0000 Delivered-To: apmail-axis-c-user-archive@axis.apache.org Received: (qmail 29644 invoked by uid 500); 30 Aug 2011 22:48:48 -0000 Mailing-List: contact c-user-help@axis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache AXIS C User List" Delivered-To: mailing list c-user@axis.apache.org Received: (qmail 29636 invoked by uid 99); 30 Aug 2011 22:48:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Aug 2011 22:48:48 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of samisa.abeysinghe@gmail.com designates 209.85.220.173 as permitted sender) Received: from [209.85.220.173] (HELO mail-vx0-f173.google.com) (209.85.220.173) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Aug 2011 22:48:43 +0000 Received: by vxi32 with SMTP id 32so11043vxi.32 for ; Tue, 30 Aug 2011 15:48:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=BGhs90dGr+S+k1aXLVyxIr4xEB9RmtHNJ61k+4LCwgQ=; b=E3+b/etUlC7w6eyruYRqFwJQKtSNzY/oFZLTp786DF11XSWW+gPWv9vITkHqq/52Kp h6K37LletTTT4J823PbpTtprFQ2zgeKxTwjMkCKS5vcrfKf9fheX2mRXbYb/fub68yoS 4b7M8gonmEOug8wggoJtJh+75duaB6BrZCPvU= MIME-Version: 1.0 Received: by 10.52.23.132 with SMTP id m4mr4732898vdf.277.1314744502558; Tue, 30 Aug 2011 15:48:22 -0700 (PDT) Received: by 10.52.185.137 with HTTP; Tue, 30 Aug 2011 15:48:22 -0700 (PDT) In-Reply-To: References: Date: Wed, 31 Aug 2011 04:18:22 +0530 Message-ID: Subject: Re: mod_rewrite and Axis2C endpoints From: Samisa Abeysinghe To: Apache AXIS C User List Content-Type: multipart/alternative; boundary=20cf307abe7f0b9df604abc0cf03 --20cf307abe7f0b9df604abc0cf03 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable AFAIU, the problem is that, the rewritten URL takes over and Axis2/C cannot find where the services are. This needs looking into the code. Samisa Abeysinghe http://samisa-abeysinghe.blogspot.com/ On Fri, Apr 29, 2011 at 9:42 AM, Richard Offer wrote: > > 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 t= o > /axis2/services/henry > > RewriteEngine on > RewriteRule ^/api/henry$ /axis2/services/henry [PT,L] > RewriteRule ^/fred$ /axis2/services/fred [PT,L] > > > Then > > > SetHandler axis2_module > RewriteEngine On > RewriteOptions Inherit > > > > All that makes sense to me =AD however I needed the following for /api/he= nry > to work > > Axis2ServiceURLPrefix api > > SetHandler axis2_module > RewriteEngine On > RewriteOptions Inherit > > > > And the problem is that the latter part, seems to mean that /fred doesn't > work. > > > All the error messages are from mod_axis =AD so it is handling /fred =AD = but > then complaining that > > Service Not Found, Endpoint referance address is http://127.0.0.1/fred an= d > 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/serv= er > /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/serv= er > /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 Transpor= t > [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: xmlns:soapenv=3D"http://schemas.xmlsoap.org/soap/envelope/ > "> tFredInfo xmlns=3D"urn:fred"><_this > type=3D"FredService">fred 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_di= sp > .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(1= 38 > 4) session-table not set in message context > > > > My questions are : > > Why do I need to add the location block for /api =AD with the correspondi= ng > 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 =AD 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 > > --20cf307abe7f0b9df604abc0cf03 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable AFAIU, the problem is that, the=A0rewritten=A0URL takes over and Axis2/C ca= nnot find where the services are.=A0

This needs looking = into the code.=A0

On Fri, Apr 29, 2011 at 9:42 AM, Richard O= ffer <roffer@ho= tlinkv.com> wrote:

I have two endpoints I need to support (I'm replacing an existing legac= y
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/h= enry to
/axis2/services/henry

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


Then

<Location /axis2>
=A0 =A0SetHandler axis2_module
=A0 =A0RewriteEngine On
=A0 =A0RewriteOptions Inherit
</Location>


All that makes sense to me =AD however I needed the following for /api/henr= y
to work

Axis2ServiceURLPrefix api
<Location /api>
=A0 =A0SetHandler axis2_module
=A0 =A0RewriteEngine On
=A0 =A0RewriteOptions 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 =AD so it is handling /fred =AD bu= t
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<= br> [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] =A0Starting logging in handler .........<= br> [Thu Apr 28 20:52:49 2011] [info] =A0Input message: <soapenv:Envelope xmlns:soapenv=3D"http://schemas.xmlsoap.org/soap/envelope/">&= lt;soapenv:Body><Ge
tFredInfo xmlns=3D"urn:fred"><_this
type=3D"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] =A0Service Not found. Endpoint reference<= br> is : http://127.0.0.1/f= red
[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)<= br> 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)<= br> 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 =AD 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 ht= tp://wso2.org/library/2663 regarding handling /fred =AD 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


--20cf307abe7f0b9df604abc0cf03--