开发者

How to run the HelloWorld ODE from the browser?

I develop a simple hello world project by using Eclipse IDE. I can run it from the IDE (Web Services -> Test with Web Services Explorer). From that it work perfectly, but if I try to access the http://localhost:8080/ode/processes/HelloWorld/

It gives some exceptions.

org.apache.axis2.AxisFault: The endpoint reference (EPR) for the Operation not found is /ode/processes/HelloWorld/ and the WSA Action = null at org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPhase.java:86) at org.apache.axis2.engine.Phase.invoke(Phase.java:308) at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:212) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:132) at org.apache.axis2.transpo开发者_StackOverflow中文版rt.http.util.RESTUtil.invokeAxisEngine(RESTUtil.java:125) at org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(RESTUtil.java:119) at org.apache.axis2.transport.http.AxisServlet$RestRequestProcessor.processURLRequest(AxisServlet.java:799) at org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:242) at org.apache.ode.axis2.hooks.ODEAxisServlet.doGet(ODEAxisServlet.java:62) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:729)

What may be the issue and how to develop it as, input values through the web browser and get the output from it. Thank you.


There are a few issues with your example:

First, according to the posted error message the URL of your endpoint is wrong. Of you are using the helloWorld example shipped with ODE, then the correct Endpoint URL is http://localhost:8080/ode/processes/helloWorld.

Second: With the Web Service Explorer, you are using a SOAP endpoint. Since a browser does not speak SOAP, you need to stick to the HTTP binding rendered by Axis2. This basically means that the URL should be composed like this:

<endpointURL>/<operationName>?<part>=<value>...

The helloWorld example renders a Web service providing one operation called "hello". This operation takes a message as input which contains one part called "TestPart". This part is taken to compute the output message.

Using the schema above, a working URL for your browser (via GET request) looks like this:

http://localhost:8080/ode/processes/helloWorld/hello?TestPart=Hello

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜