You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ax...@ws.apache.org on 2004/10/14 11:50:51 UTC

[jira] Commented: (AXIS-1438) MessageContext.getTargetService() is empty by using client-config.wsdd

The following comment has been added to this issue:

     Author: Jayachandra Sekhara Rao Sunkara
    Created: Thu, 14 Oct 2004 2:49 AM
       Body:
Hi Christian Muller,
In your case your handler, I think, is getting invoked prior to URLMapper handler. URLMapper actually sets the TargetService if not set earlier anywhere in the handler chain. One work around is to add to your handler the following code section which would set the TargetService in msgContext.

******** START of code section ********
if ( msgContext.getService() == null ) {
     // path may or may not start with a "/". see http://issues.apache.org/jira/browse/AXIS-1372
     String path = (String)msgContext.getProperty(HTTPConstants.MC_HTTP_SERVLETPATHINFO);

     if ((path != null) && (path.length() >= 1)) { //rules out the cases of path="", path=null
         if(path.startsWith("/"))
            path = path.substring(1); //chop the extra "/"     

         msgContext.setTargetService( path );
     }
}
********* END of code section *********

I guess, as of 1.2 there is no standard way to specify the order in which handlers should be invoked in the handler chain. But we can anxiously look forward for such configuration to be possible in say Axis-2.0 or later.

Hope that helps
Jayachandra
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/AXIS-1438?page=comments#action_54038

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/AXIS-1438

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: AXIS-1438
    Summary: MessageContext.getTargetService() is empty by using client-config.wsdd
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: Axis
 Components: 
             Basic Architecture
   Versions:
             1.1

   Assignee: 
   Reporter: Christian Müller

    Created: Wed, 7 Jul 2004 7:49 AM
    Updated: Thu, 14 Oct 2004 2:49 AM
Environment: Red Hat Enterprise Linux AS release 3 (Taroon Update 2);
j2sdk1.4.2_04;
Tomcat 4.1.30;
axis 1.1

Description:
Sorry for my english!!

I have problem with client handler. I have a client-config.wsdd (in classpath) and define a handler:

...
	<globalConfiguration>
		<requestFlow>
			<handler name="OutgoingPerformanceHandler" type="java:de.arcor.dra.ws.handler.OutgoingPerformanceHandler"/>
		</requestFlow>
		<responseFlow>
			<handler name="OutgoingPerformanceHandler" type="java:de.arcor.dra.ws.handler.OutgoingPerformanceHandler"/>
		</responseFlow>
	</globalConfiguration>
...

my handler invoke method is call, but msgContext.getTargetService() is empty (alse msgContext.getTargetService())!

    public void invoke(MessageContext msgContext) throws AxisFault {
        if (log.isDebugEnabled()) {
            log.debug("Target: " + msgContext.getTargetService());
            log.debug("SOAPActionURI: " + msgContext.getSOAPActionURI());
        }
    }

It's my first bug-report. I hope, it's enough information.

THX,
Christian


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira