You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by David Sanchez Escobar <da...@gmail.com> on 2009/12/02 15:52:14 UTC

Runtime problem running webapp with web service binding

Hi Guys!

I have a wsdl definition problem running a webapp. When I access  to the
service (http://localhost:8080/ptool-task-sca-ws/TaskService) I got this
error

org.apache.axis2.AxisFault: The endpoint reference (EPR) for the Operation
not found is /ptool-task-sca-ws/TaskService and the WSA Action = null at
org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPhase.java:89)
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.util.RESTUtil.invokeAxisEngine(RESTUtil.java:136)
at
org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(RESTUtil.java:130)
at
org.apache.axis2.transport.http.AxisServlet$RestRequestProcessor.processURLRequest(AxisServlet.java:829)
at org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:255)
at
org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceServlet.doGet(Axis2ServiceServlet.java:321)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at
org.apache.tuscany.sca.host.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:107)
at
org.apache.tuscany.sca.host.webapp.TuscanyServletFilter.doFilter(TuscanyServletFilter.java:94)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
...


I deployed the contribution as a webapp in Tomcat with a ws.binding in this
way:

***  .composite graphical diagram

http://www.imageno.com/zckmhtxj3k0ipic.html

*** This is the code of the .composite definition

<?xml version="1.0" encoding="UTF-8"?>
<sca:composite xmlns:sca="http://www.osoa.org/xmlns/sca/1.0" name="Task"
targetNamespace="http://eclipse.org/PlanningToolSCA/src/Task">
 <sca:component name="TaskListServiceComponent">
 <sca:implementation.java class="main.task.lib.TaskListServiceImpl"/>
 <sca:service name="TaskListService">
 <sca:interface.java interface="main.task.api.TaskListService"/>
 </sca:service>
 <sca:reference name="taskCrudService"/>
 </sca:component>
 <sca:service name="TaskService"
promote="TaskListServiceComponent/TaskListService">
 <sca:binding.ws uri="http://localhost:8080/ptool-task-sca-ws/TaskService"/>
 </sca:service>
 <sca:component name="TaskServiceComponent">
 <sca:implementation.java class="main.task.lib.TaskCrudServiceImpl"/>
 <sca:service name="TaskCrudService">
 <sca:interface.java interface="main.task.api.TaskCrudService"/>
 </sca:service>
 </sca:component>
 <sca:wire source="TaskListServiceComponent/taskCrudService"
target="TaskServiceComponent/TaskCrudService"/>
</sca:composite>

(What I'm trying to do is to use the promote of
 TaskListServiceComponent/TaskListService   in "TaskService" and  put a  ws
binding  in "TaskService" for doing an explicit and conceptualy correct
"service exposition", and allow the composite to be accesed trough web
services from any place.)


**** You can see the WSDL generated when I access to (
http://localhost:8080/ptool-task-sca-ws/TaskService?wsdl) here :

http://codepaste.net/pkjiu3


¿I missed something in the .composite?


*****Additionally I developed a client for that web service and I don't know
if it will going to work (I suppose it works like any ws but I want to be
sure), this is the code of my client

String wsdlURL = "http://localhost:8080/ptool-task-sca-ws/TaskService?wsdl";
String namespace = "http://eclipse.org/PlanningToolSCA/src/Task";
String serviceName = "TaskService";
QName serviceQN = new QName(namespace, serviceName);
ServiceFactory serviceFactory = ServiceFactory.newInstance();
 /* The "new URL(wsdlURL)" parameter is optional */
Service service = serviceFactory.createService(serviceQN);
Call mycall = service.createCall();
Object response = mycall.invoke();



Thanks for your help!

Best Regards
David

RE: Runtime problem running webapp with web service binding

Posted by "Phillips, Chad" <Ch...@gdit.com>.
Hi David,

If you're accessing the service URL from a web browser, you should expect to see an error such as the one you provided; this is not a problem w/ your service.  Have you tried executing your client code yet?  If you're not sure if your client code is correct you can also use a tool such as soapUI [1] to access your service using the WSDL.

[1] http://www.soapui.org/ 

________________________________________
From: David Sanchez Escobar [mailto:davock@gmail.com] 
Sent: Wednesday, December 02, 2009 06:52
To: user@tuscany.apache.org
Subject: Runtime problem running webapp with web service binding

Hi Guys!

I have a wsdl definition problem running a webapp. When I access  to the service (http://localhost:8080/ptool-task-sca-ws/TaskService) I got this error

org.apache.axis2.AxisFault: The endpoint reference (EPR) for the Operation not found is /ptool-task-sca-ws/TaskService and the WSA Action = null at org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPhase.java:89) 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.util.RESTUtil.invokeAxisEngine(RESTUtil.java:136) at org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(RESTUtil.java:130) at org.apache.axis2.transport.http.AxisServlet$RestRequestProcessor.processURLRequest(AxisServlet.java:829) at org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:255) at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceServlet.doGet(Axis2ServiceServlet.java:321) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.tuscany.sca.host.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:107) at org.apache.tuscany.sca.host.webapp.TuscanyServletFilter.doFilter(TuscanyServletFilter.java:94) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at 
...


I deployed the contribution as a webapp in Tomcat with a ws.binding in this way:

***  .composite graphical diagram

http://www.imageno.com/zckmhtxj3k0ipic.html 

*** This is the code of the .composite definition

<?xml version="1.0" encoding="UTF-8"?>
<sca:composite xmlns:sca="http://www.osoa.org/xmlns/sca/1.0" name="Task" targetNamespace="http://eclipse.org/PlanningToolSCA/src/Task">
 <sca:component name="TaskListServiceComponent">
 <sca:implementation.java class="main.task.lib.TaskListServiceImpl"/>
 <sca:service name="TaskListService">
 <sca:interface.java interface="main.task.api.TaskListService"/>
 </sca:service>
 <sca:reference name="taskCrudService"/>
 </sca:component>
 <sca:service name="TaskService" promote="TaskListServiceComponent/TaskListService">
 <sca:binding.ws uri="http://localhost:8080/ptool-task-sca-ws/TaskService"/>
 </sca:service>
 <sca:component name="TaskServiceComponent">
 <sca:implementation.java class="main.task.lib.TaskCrudServiceImpl"/>
 <sca:service name="TaskCrudService">
 <sca:interface.java interface="main.task.api.TaskCrudService"/>
 </sca:service>
 </sca:component>
 <sca:wire source="TaskListServiceComponent/taskCrudService" target="TaskServiceComponent/TaskCrudService"/>
</sca:composite>

(What I'm trying to do is to use the promote of  TaskListServiceComponent/TaskListService   in "TaskService" and  put a  ws binding  in "TaskService" for doing an explicit and conceptualy correct "service exposition", and allow the composite to be accesed trough web services from any place.)


**** You can see the WSDL generated when I access to (http://localhost:8080/ptool-task-sca-ws/TaskService?wsdl) here :

http://codepaste.net/pkjiu3


¿I missed something in the .composite?


*****Additionally I developed a client for that web service and I don't know if it will going to work (I suppose it works like any ws but I want to be sure), this is the code of my client

	String wsdlURL = "http://localhost:8080/ptool-task-sca-ws/TaskService?wsdl";
	String namespace = "http://eclipse.org/PlanningToolSCA/src/Task";
	String serviceName = "TaskService";
	QName serviceQN = new QName(namespace, serviceName);        
	ServiceFactory serviceFactory = ServiceFactory.newInstance();
	/* The "new URL(wsdlURL)" parameter is optional */
	Service service = serviceFactory.createService(serviceQN);
	Call mycall = service.createCall();
	Object response = mycall.invoke();



Thanks for your help!

Best Regards
David