You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Paulo Henrique Trecenti <pt...@gmail.com> on 2007/04/27 20:20:48 UTC

SCA composite jarLocation

Hi,

I'm try using the same configurations like the sample sca/das-service
And I see an config:

<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
name="DASServiceComposite">
    <component name="DASServiceComponent">
    <implementation.composite name="DASServiceComposite"
jarLocation="lib/sample-das-service-1.0-incubator-SNAPSHOT.jar"/>
    </component>
</composite>

And I try make 2 components 1 - room-schedule-component
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
    name="RoomScheduleServiceComposite">

    <service name="RoomScheduleService" promote="RoomScheduleComponent">
        <interface.java    class="roomschedule.services.RoomScheduleService"
/>
        <binding.ws wsdlElement="
http://roomschedule#wsdl.port(RoomScheduleService/RoomScheduleSoapPort)"/>
    </service>

    <component name="RoomScheduleComponent">
        <implementation.java class="
roomschedule.services.RoomScheduleServiceImpl"/>
    </component>

</composite>
And 1 - calendar-component
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
    name="CalendarServiceComposite">

    <service name="CalendarService" promote="CalendarComponent">
        <interface.java    class="calendar.services.CalendarService" />
        <binding.ws wsdlElement="
http://calendar#wsdl.port(CalendarService/CalendarSoapPort)"/>
    </service>

    <component name="CalendarComponent">
        <implementation.java class="calendar.services.CalendarServiceImpl"/>
    </component>

</composite>

And I want compose and expose that services in an 3º component called
"webservice-component", this component need run behind any web container:
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
name="RoomScheduleComposite">

    <component name="RoomScheduleComponent">
        <implementation.composite name="RoomScheduleComposite"
jarLocation="lib/tuscany-
sample-room-schedule-component-1.0-incubator-SNAPSHOT.jar"/>
    </component>

    <component name="CalendarComponent">
        <implementation.composite name="CalendarComposite"
jarLocation="lib/tuscany-
sample-room-schedule-calendar-component-1.0-incubator-SNAPSHOT.jar"/>
    </component>

</composite>

But when I'm run a test:
@Before
    public void startServer() throws Exception {
        SCARuntime.start("webservice.composite");
    }

    @Test
    public void testPing() throws IOException {
        new Socket("127.0.0.1", 8080);
    }

    @After
    public void stopServer() throws Exception {
        SCARuntime.stop();
    }

The SCA runtime show that message:

[DAS RDB] - URLBasedAxisConfigurator.getAxisConfiguration (67) : No
repository found , module will be loaded from classpath

This config has been make just only for this sample?

How I can expose and compose that's components?

How I can put that's components behind a web container? Better how
distribute that's components in an war file.

-- 
Paulo Henrique Trecenti

Re: SCA composite jarLocation

Posted by Paulo Henrique Trecenti <pt...@gmail.com>.
Hi,

> A little more context will help. How do you start this application?

SCARuntime.start("webservice.composite");
 The composite file is:

"<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
name="RoomScheduleComposite">
    <component name="RoomScheduleComponent">
        <implementation.composite name="RoomScheduleComposite"
jarLocation="lib/tuscany-
sample-room-schedule-component-1.0-incubator-SNAPSHOT.jar"/>
    </component>

    <component name="CalendarComponent">
        <implementation.composite name="CalendarComposite"
jarLocation="lib/tuscany-
sample-room-schedule-calendar-component-1.0-incubator-SNAPSHOT.jar"/>
   </component>

</composite>"



> Can you tell us what dependencies you have on your classpath?
> Do you have the tuscany-binding-ws-axis2.jar as well as the required axis2
jars?

The jars "
tuscany-sample-room-schedule-calendar-component-1.0-incubator-SNAPSHOT.jar"
and "tuscany-sample-room-schedule-component-1.0-incubator-SNAPSHOT.jar" has
builting using maven and they work fine. The required jars for using ws has
been satisfied.

> The other question is, what are you planning to put in the WAR?
> Are you looking for a WAR because you want to develop a Webapp with JSPs
or another Web UI? or are
> you  looking for a WAR as a way to host a service with a Web Service
binding?

I'm looking for a WAR as a way to host a service with a Web Service binding.
But I understood that SCARuntime is a host and do not need other container,
but I need make deploy of more components and more service.
I need to understand how to distribute my components or applications, where
I can find the services stats , if they running and all others informations
about the system.
But for now I just need put 2 or more services components in an composition
for using in a Swing client application. The client access the services
through the web service.

> With SCA 1.0, you need to specify a targetNamespace on your composite,
> <implementation.composite name="..."> takes the XML QName of a
> composite, and jarLocation is not supported.

Can you show me an example or any sample where the composite file make a <
implementation.composite name="...">
I'm working with the

Thanks a lot for answering,

sorry about my poor english,

I am improving. :)





2007/4/30, Jean-Sebastien Delfino <js...@apache.org>:
>
> Luciano Resende wrote:
> > You might be having a problem described by Greg in [1]
> >
>
> I'm not sure that the problem described here is related to [1]. [1]
> talks about getting a null when trying to get a ComponentContext for a
> component implemented by a composite.
>
> > Let me try answering some of your questions :
> >
> >> [DAS RDB] - URLBasedAxisConfigurator.getAxisConfiguration (67) : No
> >> repository found , module will be loaded from classpath
> >> This config has been make just only for this sample?
> >
> > You are seeing this message with a [DAS RDB] prefix probably because
> > you are
> > reusing a DAS sample log4j.property file with something like :
> > log4j.appender.A1.layout.ConversionPattern=[DAS RDB] - %c{1}.%M (%L) :
> > %m %n
> >
> > You are actually getting an Axis error, but I'm probably not the best
> > person
> > to answer this part...
>
> A little more context will help. How do you start this application? Can
> you tell us what dependencies you have on your classpath? do you have
> the tuscany-binding-ws-axis2.jar as well as the required axis2 jars?
>
> >
> >> How I can put that's components behind a web container? Better how
> >> distribute that's components in an war file.
> >
> > You would have to do it manually as of now, we still need to bring the
> > maven
> > war-plugin back to life in order to be able to generate the war with
> > necessary Tuscany dependencies.
> >
>
> Integration in a WAR is not supported yet with the latest code in trunk.
> We had recent discussions on this on the list (see [2]). As the latest
> runtime and the distribution of our upcoming release are getting
> simpler, I am not sure that we'll still need a special Tuscany Maven
> plugin to create a WAR file.
>
> [2] http://www.mail-archive.com/tuscany-dev@ws.apache.org/msg16903.html
>
> The other question is, what are you planning to put in the WAR? Are you
> looking for a WAR because you want to develop a Webapp with JSPs or
> another Web UI? or are you looking for a WAR as a way to host a service
> with a Web Service binding?
>
> > [1]
> http://www.mail-archive.com/tuscany-dev%40ws.apache.org/msg17171.html
> >
> [snip]
> >>
> >> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
> >> name="DASServiceComposite">
> >>     <component name="DASServiceComponent">
> >>     <implementation.composite name="DASServiceComposite"
> >> jarLocation="lib/sample-das-service-1.0-incubator-SNAPSHOT.jar"/>
> >>     </component>
> >> </composite>
> >>
>
> I am assuming that you're running with the latest code in trunk, is that
> correct? If it's the case then you need to use the SCA 1.0 syntax, what
> you have here is 0.96 syntax with a Tuscany jarLocation extension which
> is not necessary now with SCA 1.0 and not supported by the latest code.
>
> With SCA 1.0, you need to specify a targetNamespace on your composite,
> <implementation.composite name="..."> takes the XML QName of a
> composite, and jarLocation is not supported.
>
> Hope this helps.
>
> --
> Jean-Sebastien
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>


-- 
Paulo Henrique Trecenti

Re: SCA composite jarLocation

Posted by Jean-Sebastien Delfino <js...@apache.org>.
Luciano Resende wrote:
> You might be having a problem described by Greg in [1]
>

I'm not sure that the problem described here is related to [1]. [1] 
talks about getting a null when trying to get a ComponentContext for a 
component implemented by a composite.

> Let me try answering some of your questions :
>
>> [DAS RDB] - URLBasedAxisConfigurator.getAxisConfiguration (67) : No
>> repository found , module will be loaded from classpath
>> This config has been make just only for this sample?
>
> You are seeing this message with a [DAS RDB] prefix probably because 
> you are
> reusing a DAS sample log4j.property file with something like :
> log4j.appender.A1.layout.ConversionPattern=[DAS RDB] - %c{1}.%M (%L) : 
> %m %n
>
> You are actually getting an Axis error, but I'm probably not the best 
> person
> to answer this part...

A little more context will help. How do you start this application? Can 
you tell us what dependencies you have on your classpath? do you have 
the tuscany-binding-ws-axis2.jar as well as the required axis2 jars?

>
>> How I can put that's components behind a web container? Better how
>> distribute that's components in an war file.
>
> You would have to do it manually as of now, we still need to bring the 
> maven
> war-plugin back to life in order to be able to generate the war with
> necessary Tuscany dependencies.
>

Integration in a WAR is not supported yet with the latest code in trunk. 
We had recent discussions on this on the list (see [2]). As the latest 
runtime and the distribution of our upcoming release are getting 
simpler, I am not sure that we'll still need a special Tuscany Maven 
plugin to create a WAR file.

[2] http://www.mail-archive.com/tuscany-dev@ws.apache.org/msg16903.html

The other question is, what are you planning to put in the WAR? Are you 
looking for a WAR because you want to develop a Webapp with JSPs or 
another Web UI? or are you looking for a WAR as a way to host a service 
with a Web Service binding?

> [1] http://www.mail-archive.com/tuscany-dev%40ws.apache.org/msg17171.html
>
[snip]
>>
>> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
>> name="DASServiceComposite">
>>     <component name="DASServiceComponent">
>>     <implementation.composite name="DASServiceComposite"
>> jarLocation="lib/sample-das-service-1.0-incubator-SNAPSHOT.jar"/>
>>     </component>
>> </composite>
>>

I am assuming that you're running with the latest code in trunk, is that 
correct? If it's the case then you need to use the SCA 1.0 syntax, what 
you have here is 0.96 syntax with a Tuscany jarLocation extension which 
is not necessary now with SCA 1.0 and not supported by the latest code.

With SCA 1.0, you need to specify a targetNamespace on your composite, 
<implementation.composite name="..."> takes the XML QName of a 
composite, and jarLocation is not supported.

Hope this helps.

-- 
Jean-Sebastien


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: SCA composite jarLocation

Posted by Luciano Resende <lu...@gmail.com>.
You might be having a problem described by Greg in [1]

Let me try answering some of your questions :

>[DAS RDB] - URLBasedAxisConfigurator.getAxisConfiguration (67) : No
>repository found , module will be loaded from classpath
>This config has been make just only for this sample?

You are seeing this message with a [DAS RDB] prefix probably because you are
reusing a DAS sample log4j.property file with something like :
log4j.appender.A1.layout.ConversionPattern=[DAS RDB] - %c{1}.%M (%L) : %m %n

You are actually getting an Axis error, but I'm probably not the best person
to answer this part...

>How I can put that's components behind a web container? Better how
>distribute that's components in an war file.

You would have to do it manually as of now, we still need to bring the maven
war-plugin back to life in order to be able to generate the war with
necessary Tuscany dependencies.


[1] http://www.mail-archive.com/tuscany-dev%40ws.apache.org/msg17171.html

On 4/27/07, Paulo Henrique Trecenti <pt...@gmail.com> wrote:
>
> Hi,
>
> I'm try using the same configurations like the sample sca/das-service
> And I see an config:
>
> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
> name="DASServiceComposite">
>     <component name="DASServiceComponent">
>     <implementation.composite name="DASServiceComposite"
> jarLocation="lib/sample-das-service-1.0-incubator-SNAPSHOT.jar"/>
>     </component>
> </composite>
>
> And I try make 2 components 1 - room-schedule-component
> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
>     name="RoomScheduleServiceComposite">
>
>     <service name="RoomScheduleService" promote="RoomScheduleComponent">
>         <interface.java    class="
> roomschedule.services.RoomScheduleService"
> />
>         <binding.ws wsdlElement="
> http://roomschedule#wsdl.port(RoomScheduleService/RoomScheduleSoapPort)"/>
>     </service>
>
>     <component name="RoomScheduleComponent">
>         <implementation.java class="
> roomschedule.services.RoomScheduleServiceImpl"/>
>     </component>
>
> </composite>
> And 1 - calendar-component
> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
>     name="CalendarServiceComposite">
>
>     <service name="CalendarService" promote="CalendarComponent">
>         <interface.java    class="calendar.services.CalendarService" />
>         <binding.ws wsdlElement="
> http://calendar#wsdl.port(CalendarService/CalendarSoapPort)"/>
>     </service>
>
>     <component name="CalendarComponent">
>         <implementation.java class="calendar.services.CalendarServiceImpl
> "/>
>     </component>
>
> </composite>
>
> And I want compose and expose that services in an 3º component called
> "webservice-component", this component need run behind any web container:
> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
> name="RoomScheduleComposite">
>
>     <component name="RoomScheduleComponent">
>         <implementation.composite name="RoomScheduleComposite"
> jarLocation="lib/tuscany-
> sample-room-schedule-component-1.0-incubator-SNAPSHOT.jar"/>
>     </component>
>
>     <component name="CalendarComponent">
>         <implementation.composite name="CalendarComposite"
> jarLocation="lib/tuscany-
> sample-room-schedule-calendar-component-1.0-incubator-SNAPSHOT.jar"/>
>     </component>
>
> </composite>
>
> But when I'm run a test:
> @Before
>     public void startServer() throws Exception {
>         SCARuntime.start("webservice.composite");
>     }
>
>     @Test
>     public void testPing() throws IOException {
>         new Socket("127.0.0.1", 8080);
>     }
>
>     @After
>     public void stopServer() throws Exception {
>         SCARuntime.stop();
>     }
>
> The SCA runtime show that message:
>
> [DAS RDB] - URLBasedAxisConfigurator.getAxisConfiguration (67) : No
> repository found , module will be loaded from classpath
>
> This config has been make just only for this sample?
>
> How I can expose and compose that's components?
>
> How I can put that's components behind a web container? Better how
> distribute that's components in an war file.
>
> --
> Paulo Henrique Trecenti
>



-- 
Luciano Resende
http://people.apache.org/~lresende