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 "Kennard Consulting (JIRA)" <ax...@ws.apache.org> on 2007/02/28 04:59:05 UTC
[jira] Updated: (AXIS-2359) AxisServlet does not set targetService
on MessageContext
[ https://issues.apache.org/jira/browse/AXIS-2359?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kennard Consulting updated AXIS-2359:
-------------------------------------
Affects Version/s: 1.4
A year (and a 1.4 release) after Jeremy's report, I have encountered the same problem and resolved it using Jeremy's fix (thanks Jeremy!).
Should we assume this fix is correct and needs integrating back into Axis? If so, it would seem a major problem (as Jeremy indicated).
Or have both Jeremey and I made the same silly mistake? Could anybody comment?
> AxisServlet does not set targetService on MessageContext
> --------------------------------------------------------
>
> Key: AXIS-2359
> URL: https://issues.apache.org/jira/browse/AXIS-2359
> Project: Axis
> Issue Type: Bug
> Affects Versions: 1.3, 1.4
> Environment: JDK 1.5.0_03-b07 on Windows XP
> Reporter: Jeremy Rosenberger
>
> First some background: I'm "embedding" Axis into a Jetty server using AxisServlet; the Axis configuration is coming from a .wsdd file that I'm configuring using a FileProvider. I was using a slightly hacked version of SimpleAxisWorker to hand off the HTTP connection from Jetty to Axis. Although this worked fine, once I discovered AxisServlet I thought it would provide a much cleaner integration.
> In any case, when using AxisServlet, any SOAP request (or even trying to fetch the WSDL for a service) results in an AxisFault with faultCode "{http://xml.apache.org/axis/}Server.NoService" and faultString "The AXIS engine could not find a target service to invoke! targetService is null". Tracing through the code, I don't see where AxisServlet's logic even tries to set the targetService on the MessageContext.
> I noticed that JWSHandler sets service information on the MessageContext, so perhaps everyone else using AxisServlet is deploying through JWS?
> The proposed fix is fairly straightforward: In AxisServlet.createMessageContext(), add some code that calls MessageContext.setTargetService(). The code I added is very similar to a portion of processQuery(), so perhaps some common code could even be factored out:
> String serviceName;
> String servletURI = req.getContextPath() + req.getServletPath();
> String reqURI = req.getRequestURI();
> // chop off '/'.
> if (servletURI.length() + 1 < reqURI.length()) {
> serviceName = reqURI.substring(servletURI.length() + 1);
> } else {
> serviceName = "";
> }
> try {
> msgContext.setTargetService(serviceName);
> } catch (AxisFault af) {
> exceptionLog.info("Exception setting targetService on MessageContext " + af);
> }
> Of course it's entirely possible that AxisServlet is working fine, and I'm overlooking something. In that case I'd appreciate further insight. Thanks!
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org