tuscany-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonio De Berardis <antonio.de-berar...@aps-prevoyance.fr>
Subject Re: Default WS port - Tuscany 2 runtime
Date Wed, 30 Nov 2011 17:03:06 GMT
On 30/11/2011 10:56, ant elder wrote:
> On Thu, Nov 24, 2011 at 3:22 PM, Antonio De Berardis
> <antonio.de-berardis@aps-prevoyance.fr>  wrote:
>> Le 24/11/2011 15:28, Simon Laws a écrit :
>>
>> On Thu, Nov 24, 2011 at 10:57 AM, Antonio De Berardis
>> <antonio.de-berardis@aps-prevoyance.fr>  wrote:
>>
>> Hi,
>>
>> I have a question about web service binding, for example:
>>
>> <component name="HelloworldComponent">
>>      <implementation.java class="sample.HelloworldImpl"/>
>>      <service name="Helloworld">
>>          <binding.ws/>
>>      </service>
>> </component>
>>
>> When I deploy this component in a webapp on Tomcat, It publishes a service
>> at http://localhost:8085/HelloworldComponent/Helloworld. The
>> “localhost:8085” seems to be a default value.
>>
>> I actually have lots of Tuscany based webapps with many components in them,
>> therefore all publishing their webservices at http://localhost:8085/...
>>
>> One way to change that is to set the uri attribute in binding.ws. , which
>> means that if I want to relocate my webservices in the future I will have to
>> change the URI in each and every one of my webapps.
>>
>> Is there a way to set a default "Host:Port"? I'm using the tuscany.war
>> deployed on Tomcat, is there may be a way to do this in the Tomcat’s conf or
>> in Tuscany.war?
>> Or if not, what do you think is better to do? Let binding.ws with no URI or
>> define it in each WS? Am I missing something? Are you planning to change
>> this behavior?
>>
>> Best Regards.
>>
>> Antonio
>>
>> Hi Antonio
>>
>> I assume that you're embedding Tuscany in the WAR and configuring the
>> TuscanyServletFilter.
>>
>> I think in a webapp Tuscany just adopts the host:port configuration of
>> the host Tomcat installation.
>>
>> If you're running outside of Tomcat from a Tuscany launcher you can
>> configure the default port that gets used when fluffing up Tomcat or
>> Jetty etc instances by providing default binding configuration to the
>> node. But I don't think that's what you're doing.
>>
>> Regards
>>
>> Simon
>>
>> Hi Simon,
>>
>> I'm using the tuscany-war-2.0-Beta3.war deployed in Tomcat; It's this war
>> that configures the TuscanyServletFilter for each webapp.
>>
>> Here is my log when I start Tomcat:
>>
>> WARN: [SetPropertiesRule]{Server/Service/Engine/Host} Setting property
>> 'hostConfigClass' to 'org.apache.tuscany.sca.tomcat.TuscanyHostConfig' did
>> not find a matching property.
>> 24 nov. 2011 15:49:52 org.apache.tuscany.sca.tomcat.TuscanyLifecycleListener
>> lifecycleEvent
>> INFO: Using Tuscany webapp:
>> /test/tuscany-tomcat-6.0.32/webapps/tuscany-war-2.0-Beta3
>> 24 nov. 2011 15:49:52 org.apache.tuscany.sca.tomcat.TuscanyLifecycleListener
>> lifecycleEvent
>> INFO: Tuscany enabled on connector: localhost:8080
>> 24 nov. 2011 15:49:52 org.apache.tuscany.sca.tomcat.TuscanyLifecycleListener
>> lifecycleEvent
>> INFO: Tuscany enabled on connector: localhost:8009
>> 24 nov. 2011 15:49:52 org.apache.coyote.http11.Http11Protocol init
>> INFO: Initialisation de Coyote HTTP/1.1 sur http-8080
>> 24 nov. 2011 15:49:52 org.apache.catalina.startup.Catalina load
>> INFO: Initialization processed in 417 ms
>> 24 nov. 2011 15:49:52 org.apache.catalina.core.StandardService start
>> INFO: Démarrage du service Catalina
>> 24 nov. 2011 15:49:52 org.apache.catalina.core.StandardEngine start
>> INFO: Starting Servlet Engine: Apache Tomcat/6.0.32
>> 24 nov. 2011 15:49:52 org.apache.catalina.startup.HostConfig
>> deployDescriptor
>> INFO: Déploiement du descripteur de configuration manager.xml
>> 24 nov. 2011 15:49:53 org.apache.catalina.startup.HostConfig
>> deployDescriptor
>> INFO: Déploiement du descripteur de configuration host-manager.xml
>> 24 nov. 2011 15:49:53 org.apache.catalina.startup.HostConfig deployWAR
>>
>> INFO: Déploiement de l'archive tuscany-war-2.0-Beta3.war de l'application
>> web
>> 24 nov. 2011 15:49:53 org.apache.catalina.startup.HostConfig deployDirectory
>> INFO: Déploiement du répertoire ROOT de l'application web
>> 24 nov. 2011 15:49:53 org.apache.catalina.startup.HostConfig deployDirectory
>> INFO: Déploiement du répertoire docs de l'application web
>> 24 nov. 2011 15:49:53 org.apache.catalina.startup.HostConfig deployDirectory
>> INFO: Déploiement du répertoire examples de l'application web
>> 24 nov. 2011 15:49:53 org.apache.coyote.http11.Http11Protocol start
>> INFO: Démarrage de Coyote HTTP/1.1 sur http-8080
>> 24 nov. 2011 15:49:53 org.apache.jk.common.ChannelSocket init
>> INFO: JK: ajp13 listening on /0.0.0.0:8009
>> 24 nov. 2011 15:49:53 org.apache.jk.server.JkMain start
>> INFO: Jk running ID=0 time=1/15  config=null
>> 24 nov. 2011 15:49:53 org.apache.catalina.startup.Catalina start
>> INFO: Server startup in 576 ms
>> 24 nov. 2011 15:50:13 org.apache.catalina.startup.HostConfig deployWAR
>> INFO: Déploiement de l'archive _TestSCA.war de l'application web
>> 24 nov. 2011 15:50:13 org.apache.tuscany.sca.node.impl.NodeImpl start
>> INFO: Starting node: http://tuscany.apache.org/sca/1.1/nodes/default0
>> domain: default
>> 24 nov. 2011 15:50:14 org.apache.tuscany.sca.tomcat.TuscanyStandardContext
>> enableTuscany
>> INFO: Tuscany SCA is enabled for: /_TestSCA
>> 24 nov. 2011 15:50:14
>> org.apache.tuscany.sca.host.webapp.TuscanyContextListener contextInitialized
>> INFO: _TestSCA is starting.
>> 24 nov. 2011 15:50:14 org.apache.tuscany.sca.host.webapp.WebAppServletHost
>> initContextPath
>> INFO: ContextPath: /_TestSCA
>> 24 nov. 2011 15:50:14 org.apache.tuscany.sca.node.impl.NodeImpl start
>> INFO: Starting node: /test/tuscany-tomcat-6.0.32/webapps/_TestSCA/ domain:
>> default
>> 24 nov. 2011 15:50:14 org.apache.tuscany.sca.node.impl.NodeFactoryImpl
>> loadContributions
>> INFO: Loading contribution:
>> file:/test/tuscany-tomcat-6.0.32/webapps/_TestSCA/
>> Binding.ws JAXWS provider - Service URI:
>> http://localhost:8085/TestComponent/TestService
>> Binding.ws JAXWS provider - Service URI:
>> http://localhost:8085/Test2Component/Test2Service
>> 24 nov. 2011 15:50:15
>> org.apache.tuscany.sca.core.assembly.impl.DomainRegistryImpl addEndpoint
>> INFO: Add endpoint - binding.ws -
>> http://localhost:8085/TestComponent/TestService
>> 24 nov. 2011 15:50:15
>> org.apache.tuscany.sca.core.assembly.impl.DomainRegistryImpl addEndpoint
>> INFO: Add endpoint - binding.ws -
>> http://localhost:8085/Test2Component/Test2Service
>
> I think whats going on here is that the beta3 release includes the
> JAX-WS RI based web service binding by default which uses is own HTTP
> listener port. We decided a while ago to deprecate that binding in
> favour of the Axis2 based web service binding and that Axis2 based one
> will use the standard Tomcat connector ports, but that didn't happen
> yet in the beta3 release.
>
> You can still use the Axis2 based binding, what you need to do is
> include the tuscany-binding-ws-runtime-axis2 jar and its dependencies
> in the Tuscany war. The easiest way to do that is rebuild the .war
> from the Tuscany source release with the extra dependency, i've done
> that and uploaded the updated .war to
> http://people.apache.org/~antelder/tuscany/2.0-Beta3/tuscany.war
>
>     ...ant
I ant,
I have a strange behavior with it:
when I deploy a webapp, the endpoint is created on the right port(8081), but the log says

INFO: Add endpoint - binding.ws - http://srvantonio:8080/_TestSCA/TestComponent/TestService

I can however get the wsdl at http://srvantonio:8081/_TestSCA/TestComponent/TestService?wsdl

Second, when I deploy another webapp(called Person), the endpoint is created on http://srvantonio:8080/_TestSCA/PersonComponent/PersonService
and not on
http://srvantonio:8080/Production/ProdComponent/ProdService.
All other webapps I deploy, are created on http://srvantonio:8080/_TestSCA/...

here is the log:

INFO: Starting node: http://tuscany.apache.org/sca/1.1/nodes/default0 domain: default
Nov 30, 2011 5:30:48 PM org.apache.tuscany.sca.tomcat.TuscanyStandardContext enableTuscany
INFO: Tuscany SCA is enabled for: /_TestSCA
Nov 30, 2011 5:30:48 PM org.apache.tuscany.sca.host.webapp.TuscanyContextListener contextInitialized
INFO: null is starting.
Nov 30, 2011 5:30:48 PM org.apache.tuscany.sca.host.webapp.WebAppServletHost initContextPath
INFO: ContextPath: /_TestSCA
Nov 30, 2011 5:30:48 PM org.apache.tuscany.sca.node.impl.NodeImpl start
INFO: Starting node: /home/antonio/Bureau/tuscany-tomcat-6.0.32/webapps/_TestSCA/ domain:
default
Nov 30, 2011 5:30:48 PM org.apache.tuscany.sca.node.impl.NodeFactoryImpl loadContributions
INFO: Loading contribution: file:/home/antonio/Bureau/tuscany-tomcat-6.0.32/webapps/_TestSCA/
Nov 30, 2011 5:30:48 PM org.apache.tuscany.sca.host.webapp.WebAppServletHost addServletMapping
INFO: Added Servlet mapping: http://antonio-OptiPlex-980:8080/_TestSCA/TestComponent/TestService
Nov 30, 2011 5:30:48 PM org.apache.tuscany.sca.core.assembly.impl.DomainRegistryImpl addEndpoint
INFO: Add endpoint - binding.ws - http://srvantonio:8080/_TestSCA/TestComponent/TestService
...

INFO: Deploying web application archive Person.war
Nov 30, 2011 5:30:51 PM org.apache.tuscany.sca.tomcat.TuscanyStandardContext enableTuscany
INFO: Tuscany SCA is enabled for: /Person
Nov 30, 2011 5:30:51 PM org.apache.tuscany.sca.host.webapp.TuscanyContextListener contextInitialized
INFO: Person is starting.
Nov 30, 2011 5:30:51 PM org.apache.tuscany.sca.node.impl.NodeImpl start
INFO: Starting node: /home/antonio/Bureau/tuscany-tomcat-6.0.32/webapps/Person/ domain: default
Nov 30, 2011 5:30:51 PM org.apache.tuscany.sca.node.impl.NodeFactoryImpl loadContributions
INFO: Loading contribution: file:/home/antonio/Bureau/tuscany-tomcat-6.0.32/webapps/Person/
Nov 30, 2011 5:30:52 PM org.apache.tuscany.sca.core.assembly.impl.DomainRegistryImpl addEndpoint
INFO: Add endpoint - binding.ws - http://srvantonio:8080/_TestSCA/PersonComponent/PersonService
Nov 30, 2011 5:30:52 PM org.apache.tuscany.sca.host.webapp.WebAppServletHost addServletMapping
INFO: Added Servlet mapping: http://srvantonio:8080/_TestSCA/PersonComponent/PersonService

Antonio




Mime
View raw message