Hi Davis,

In your case Axis2 was unable to find the service. The only method that
Axis2 looks up the service is using the URL. So that URL should have enough
information on what the serviceName is. I'm sure this is a problem in your
mapping somewhere. Did you set the contextRoot in the axis2.xml?

On a side note this post [1] explains how Axis2 finds the operation for the
service.

Thanks,
Keith.

[1]
http://www.keith-chapman.org/2009/02/axis2-endpoint-reference-epr-for.html



On Mon, Feb 23, 2009 at 10:52 PM, Davis, Christopher (Baltimore) <
[email protected]> wrote:

>  I get the above error while trying to consume a web service embedded  in
> my Tomcat webapp.  I'm looking for ideas.  The error is occurring in the
> Dispatch Phase.
>
>
>
> I generated the Axis2 server and client code using the code generator in
> Eclipse.
>
>
>
> 1) Modified web.xml to add servlet and mapping for Axis2.
>
> 2) Put axis2.xml in my WEB-INF/conf directory
>
> 3) Put services.xml in my WEB-INF/services/MyWebService/META-INF directory.
>
> 4) Placed my generated Axis2 server-side code in a package in my source
> folder.
>
>
>
> I have Axis2 itself running successfully within Tomcat.  I see in the
> Eclipse debugger that the Axis2 servlet does indeed get invoked when I call
> my webservice on the endpoint
> http://localhost:8080/mywebapp/services/MyWebService.  Axis2 also seems to
> be reading my axis2.xml file when it starts up and seems to be reading my
> services.xml.   But it just can't find my webservice or its operation, even
> though the Eclipse debugger seems to show that my endpoint path is being
> parsed correctly and the various pieces (contextRoot, servicePath, service)
> are well-formed names as expected.
>
>
>
> The Axis2 Architecture Guide states that "The in-built dispatchers dispatch
> to a particular operation depending on various conditions like WS-Addressing
> information, URI information, SOAP action information, etc."    I accepted
> the default dispatch phases for Axis2, but they're not working correctly and
> I'm not sure how to get them to work correctly.
>
>
>
> My call stack in the log in the immediate vicinity of the error looks like
> this:
>
>
>
>
>
> 2009-02-23
> 11:36:59,349:http-8080-Processor200:DEBUG:org.apache.axis2.engine.Phase.invoke(Phase.java:314):[MessageContext:
> logID=urn:uuid:02C5592C0DAB916C831235407016297] Invoking Handler
> 'HTTPLocationBasedDispatcher' in Phase 'Dispatch'
>
> 2009-02-23
> 11:36:59,349:http-8080-Processor200:DEBUG:org.apache.axis2.engine.Phase.invoke(Phase.java:328):[MessageContext:
> logID=urn:uuid:02C5592C0DAB916C831235407016297] Checking post-conditions for
> phase "Dispatch"
>
> 2009-02-23
> 11:36:59,349:http-8080-Processor200:DEBUG:org.apache.axis2.i18n.ProjectResourceBundle.handleGetObject(ProjectResourceBundle.java:70):org.apache.axis2.i18n.resource::handleGetObject(servicenotfoundforepr)
>
> 2009-02-23 
> 11:36:59,349:http-8080-Processor200:*ERROR*:org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:212):The
> service cannot be found for the endpoint reference (EPR)
> http://127.0.0.1:8080/frontier_axis/services/WSItemUpdate
>
> org.apache.axis2.AxisFault: The service cannot be found for the endpoint
> reference (EPR) http://127.0.0.1:8080/frontier_axis/services/WSItemUpdate
>
>                 at
> org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPhase.java:65)
>
>                 at org.apache.axis2.engine.Phase.invoke(Phase.java:333)
>
>                 at
> org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:264)
>
>                 at
> org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:163)
>
>                 at
> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)
>
>                 at
> org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:133)
>
>                 at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
>
>                 at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>
>                 at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
>
>                 at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>
>                 at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>
>                 at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
>
>                 at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
>
>
>
> Thanks for any help!
>
>
>
> Chris Davis
>
>
>



-- 
Keith Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/

blog: http://www.keith-chapman.org

Reply via email to