|
|
Re: simple example wont work with 1.5.1 - help required [message #506955 is a reply to message #506772] |
Mon, 11 January 2010 14:06 |
|
Hi William,
My answers below.
William Woodman a écrit :
> tried afresh - coming back after a gap
>
> downloaded tuscany 1.5.1 and stored in file system. created eclipse
> user lib to inlcude all the tuscany /lib jars
>
> created a very simple hello world app and keep getting the same error
> Quote:
>> Starting ...
>> 09-Jan-2010 19:30:52 org.apache.tuscany.sca.node.impl.NodeImpl <init>
>> INFO: Creating node: scaTest.composite
>> 09-Jan-2010 19:30:52 org.apache.tuscany.sca.node.impl.NodeImpl
>> configureNode
>> INFO: Loading contribution:
>> file:/C:/Users/will/eclipseWorkspace/scaTest/bin/
>> 09-Jan-2010 19:30:53 org.apache.tuscany.sca.node.impl.NodeImpl start
>> INFO: Starting node: scaTest.composite
>> 09-Jan-2010 19:30:54 org.apache.tuscany.sca.http.jetty.JettyServer
>> addServletMapping
>> INFO: Added Servlet mapping: http://MONSTER-PC:8085/HelloWorldService
>> wills test ready for big business !!!
>> - The endpoint reference (EPR) for the Operation not found is
>> /HelloWorldService and the WSA Action = null
>> org.apache.axis2.AxisFault: The endpoint reference (EPR) for the
>> Operation not found is /HelloWorldService and the WSA Action = null
>> at org.apache.axis2.engine.DispatchPhase.checkPostConditions(Di
>> spatchPhase.java:89)
>> at org.apache.axis2.engine.Phase.invoke(Phase.java:333)
>> at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:26 4)
>> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:1 63)
>> at org.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngi
>> ne(RESTUtil.java:136)
>> at org.apache.axis2.transport.http.util.RESTUtil.processURLRequ
>> est(RESTUtil.java:130)
>> at org.apache.axis2.transport.http.AxisServlet$RestRequestProce
>> ssor.processURLRequest(AxisServlet.java:829)
>> at org.apache.axis2.transport.http.AxisServlet.doGet(AxisServle
>> t.java:255)
>> at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceServlet.
>> doGet(Axis2ServiceServlet.java:321)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>> at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder
>> .java:487)
>> at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandl
>> er.java:362)
>> at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandl
>> er.java:181)
>> at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandl
>> er.java:726)
>> at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapp
>> er.java:139)
>> at org.mortbay.jetty.Server.handle(Server.java:324)
>> at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnectio
>> n.java:505)
>> at org.mortbay.jetty.HttpConnection$RequestHandler.headerComple
>> te(HttpConnection.java:828)
>> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
>> at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java: 211)
>> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java: 380)
>> at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEn
>> dPoint.java:395)
>> at org.apache.tuscany.sca.core.work.Work.run(Work.java:63)
>> at org.apache.tuscany.sca.core.work.ThreadPoolWorkManager$Decor
>> atingWork.run(ThreadPoolWorkManager.java:215)
>> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unkno
>> wn Source)
>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>> at java.lang.Thread.run(Unknown Source)
>
>
> basically i have a client that launches the embedded tuscany web service
> Quote:
>> import org.apache.tuscany.sca.host.embedded.SCADomain;
>>
>>
>> public class Launch {
>>
>> /**
>> * @param args
>> */
>> public static void main(String[] args) throws Exception {
>> System.out.println("Starting ...");
>> SCADomain scaDomain = SCADomain.newInstance("scaTest.composite");
>> System.out.println("wills test ready for big business !!!");
>> System.in.read();
>> System.out.println("Stopping ...");
>> scaDomain.close();
>> System.out.println();
>> }
>>
>> }
Seems OK.
> I then have a simple interface class
> Quote:
>> import org.osoa.sca.annotations.Service;
>>
>> @Service (HelloWorldService.class)
>> public class HelloWorldImpl implements HelloWorldService
>> {
>> public HelloWorldImpl ()
>> {}
>>
>> public String sayHello ()
>> {
>> return "hello William";
>> }
>> }
>
>
> and a simple componnt that implements
> Quote:
>> import org.osoa.sca.annotations.Remotable;
>>
>> @Remotable
>> public interface HelloWorldService {
>> String sayHello ();
>> }
Both seem correct.
> lastly my composite file (tried various varitions on this and
> essentially net out to same error ) - tried service at top level and
> child withiun the component, one trying the sca:interface declarition, etc
> current config looks like this
> Quote:
>> <?xml version="1.0" encoding="UTF-8"?>
>> <sca:composite xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
>> name="scaTest" targetNamespace="http://eclipse.org/scaTest/src/scaTest">
>> <sca:component name="HelloWorld">
>> <sca:implementation.java class="scaTest.HelloWorldImpl"/>
>> <sca:service name="HelloWorldService"
>> promote="HelloWorld/HelloWorldService">
>> <sca:binding.ws uri="http://localhost:8085/HelloWorldService"/>
>> </sca:service>
>> </sca:component>
>> </sca:composite>
It seems, and I cannot believe it, that the SCA builder does not show an
error with such a composite.
You set the promote on a component service.
The right way to promote a service, is to declare it in the component,
declare another in the composite and make it promote the first one.
Here is one exemple of your composite with a correct promotion:
> <?xml version="1.0" encoding="UTF-8"?>
> <sca:composite xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
> name="scaTest" targetNamespace="http://eclipse.org/scaTest/src/scaTest">
>
> <sca:service name="visibleService" promote="HelloWorld/HelloWorldService" />
>
> <sca:component name="HelloWorld">
> <sca:implementation.java class="scaTest.HelloWorldImpl" />
> <sca:service name="HelloWorldService">
> <sca:binding.ws uri="http://localhost:8085/HelloWorldService" />
> </sca:service>
> </sca:component>
> </sca:composite>
Once it is promoted, the service can be exposed correctly.
Vincent.
|
|
|
Re: simple example wont work with 1.5.1 - help required [message #506956 is a reply to message #506811] |
Mon, 11 January 2010 14:07 |
|
Hi William,
William Woodman a écrit :
> okay - think i've managed to sort myself (mostly ) out.
>
> the web service was generated - and pointing my browser at it didnt do
> any good as it wasnt a soap message generated.
To check if a web service is correctly deployed with a Web browser, go
to the WSDL address. Generally <ws url>?wsdl
> downloaded soapUI and point at the wsdl and i got the service work.
>
> in passing is their an equivelent to @Local as opposed to @Remotable.
> That is if you want to build a reference to a local component - i got
> more errors until i added the @remotable to the referenced interface.
>
> or do all sca interfaces have to be marked @remotable?
No.
Just those that can be invoked remotly.
Vincent.
|
|
|
|
Re: simple example wont work with 1.5.1 - help required [message #576819 is a reply to message #506772] |
Mon, 11 January 2010 14:06 |
|
Hi William,
My answers below.
William Woodman a écrit :
> tried afresh - coming back after a gap
>
> downloaded tuscany 1.5.1 and stored in file system. created eclipse
> user lib to inlcude all the tuscany /lib jars
>
> created a very simple hello world app and keep getting the same error
> Quote:
>> Starting ...
>> 09-Jan-2010 19:30:52 org.apache.tuscany.sca.node.impl.NodeImpl <init>
>> INFO: Creating node: scaTest.composite
>> 09-Jan-2010 19:30:52 org.apache.tuscany.sca.node.impl.NodeImpl
>> configureNode
>> INFO: Loading contribution:
>> file:/C:/Users/will/eclipseWorkspace/scaTest/bin/
>> 09-Jan-2010 19:30:53 org.apache.tuscany.sca.node.impl.NodeImpl start
>> INFO: Starting node: scaTest.composite
>> 09-Jan-2010 19:30:54 org.apache.tuscany.sca.http.jetty.JettyServer
>> addServletMapping
>> INFO: Added Servlet mapping: http://MONSTER-PC:8085/HelloWorldService
>> wills test ready for big business !!!
>> - The endpoint reference (EPR) for the Operation not found is
>> /HelloWorldService and the WSA Action = null
>> org.apache.axis2.AxisFault: The endpoint reference (EPR) for the
>> Operation not found is /HelloWorldService and the WSA Action = null
>> at org.apache.axis2.engine.DispatchPhase.checkPostConditions(Di
>> spatchPhase.java:89)
>> at org.apache.axis2.engine.Phase.invoke(Phase.java:333)
>> at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:26 4)
>> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:1 63)
>> at org.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngi
>> ne(RESTUtil.java:136)
>> at org.apache.axis2.transport.http.util.RESTUtil.processURLRequ
>> est(RESTUtil.java:130)
>> at org.apache.axis2.transport.http.AxisServlet$RestRequestProce
>> ssor.processURLRequest(AxisServlet.java:829)
>> at org.apache.axis2.transport.http.AxisServlet.doGet(AxisServle
>> t.java:255)
>> at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceServlet.
>> doGet(Axis2ServiceServlet.java:321)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>> at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder
>> .java:487)
>> at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandl
>> er.java:362)
>> at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandl
>> er.java:181)
>> at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandl
>> er.java:726)
>> at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapp
>> er.java:139)
>> at org.mortbay.jetty.Server.handle(Server.java:324)
>> at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnectio
>> n.java:505)
>> at org.mortbay.jetty.HttpConnection$RequestHandler.headerComple
>> te(HttpConnection.java:828)
>> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
>> at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java: 211)
>> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java: 380)
>> at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEn
>> dPoint.java:395)
>> at org.apache.tuscany.sca.core.work.Work.run(Work.java:63)
>> at org.apache.tuscany.sca.core.work.ThreadPoolWorkManager$Decor
>> atingWork.run(ThreadPoolWorkManager.java:215)
>> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unkno
>> wn Source)
>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>> at java.lang.Thread.run(Unknown Source)
>
>
> basically i have a client that launches the embedded tuscany web service
> Quote:
>> import org.apache.tuscany.sca.host.embedded.SCADomain;
>>
>>
>> public class Launch {
>>
>> /**
>> * @param args
>> */
>> public static void main(String[] args) throws Exception {
>> System.out.println("Starting ...");
>> SCADomain scaDomain = SCADomain.newInstance("scaTest.composite");
>> System.out.println("wills test ready for big business !!!");
>> System.in.read();
>> System.out.println("Stopping ...");
>> scaDomain.close();
>> System.out.println();
>> }
>>
>> }
Seems OK.
> I then have a simple interface class
> Quote:
>> import org.osoa.sca.annotations.Service;
>>
>> @Service (HelloWorldService.class)
>> public class HelloWorldImpl implements HelloWorldService
>> {
>> public HelloWorldImpl ()
>> {}
>>
>> public String sayHello ()
>> {
>> return "hello William";
>> }
>> }
>
>
> and a simple componnt that implements
> Quote:
>> import org.osoa.sca.annotations.Remotable;
>>
>> @Remotable
>> public interface HelloWorldService {
>> String sayHello ();
>> }
Both seem correct.
> lastly my composite file (tried various varitions on this and
> essentially net out to same error ) - tried service at top level and
> child withiun the component, one trying the sca:interface declarition, etc
> current config looks like this
> Quote:
>> <?xml version="1.0" encoding="UTF-8"?>
>> <sca:composite xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
>> name="scaTest" targetNamespace="http://eclipse.org/scaTest/src/scaTest">
>> <sca:component name="HelloWorld">
>> <sca:implementation.java class="scaTest.HelloWorldImpl"/>
>> <sca:service name="HelloWorldService"
>> promote="HelloWorld/HelloWorldService">
>> <sca:binding.ws uri="http://localhost:8085/HelloWorldService"/>
>> </sca:service>
>> </sca:component>
>> </sca:composite>
It seems, and I cannot believe it, that the SCA builder does not show an
error with such a composite.
You set the promote on a component service.
The right way to promote a service, is to declare it in the component,
declare another in the composite and make it promote the first one.
Here is one exemple of your composite with a correct promotion:
> <?xml version="1.0" encoding="UTF-8"?>
> <sca:composite xmlns:sca="http://www.osoa.org/xmlns/sca/1.0"
> name="scaTest" targetNamespace="http://eclipse.org/scaTest/src/scaTest">
>
> <sca:service name="visibleService" promote="HelloWorld/HelloWorldService" />
>
> <sca:component name="HelloWorld">
> <sca:implementation.java class="scaTest.HelloWorldImpl" />
> <sca:service name="HelloWorldService">
> <sca:binding.ws uri="http://localhost:8085/HelloWorldService" />
> </sca:service>
> </sca:component>
> </sca:composite>
Once it is promoted, the service can be exposed correctly.
Vincent.
|
|
|
Re: simple example wont work with 1.5.1 - help required [message #576832 is a reply to message #576804] |
Mon, 11 January 2010 14:07 |
|
Hi William,
William Woodman a écrit :
> okay - think i've managed to sort myself (mostly ) out.
>
> the web service was generated - and pointing my browser at it didnt do
> any good as it wasnt a soap message generated.
To check if a web service is correctly deployed with a Web browser, go
to the WSDL address. Generally <ws url>?wsdl
> downloaded soapUI and point at the wsdl and i got the service work.
>
> in passing is their an equivelent to @Local as opposed to @Remotable.
> That is if you want to build a reference to a local component - i got
> more errors until i added the @remotable to the referenced interface.
>
> or do all sca interfaces have to be marked @remotable?
No.
Just those that can be invoked remotly.
Vincent.
|
|
|
Powered by
FUDForum. Page generated in 0.04287 seconds