3 Replies Latest reply on Jun 12, 2006 6:25 AM by nuno oliveira

    deploy web services in different connectors please help!!

    nuno oliveira Newbie

      I was able to setup two differnt connectors like this:

      <Server>
      
       <!-- Use a custom version of StandardService that allows the
       connectors to be started independent of the normal lifecycle
       start to allow web apps to be deployed before starting the
       connectors.
       -->
       <Service name="jboss.web"
       className="org.jboss.web.tomcat.tc5.StandardService">
      
       <!-- A HTTP/1.1 Connector on port 8080 -->
       <Connector port="8080" address="${jboss.bind.address}"
       maxThreads="250" strategy="ms" maxHttpHeaderSize="8192"
       emptySessionPath="true"
       enableLookups="false" redirectPort="8443" acceptCount="100"
       connectionTimeout="20000" disableUploadTimeout="true"/>
      
       <!-- Add this option to the connector to avoid problems with
       .NET clients that don't implement HTTP/1.1 correctly
       restrictedUserAgents="^.*MS Web Services Client Protocol 1.1.4322.*$"
       -->
      
       <!-- A AJP 1.3 Connector on port 8009 -->
       <Connector port="8009" address="${jboss.bind.address}"
       emptySessionPath="true" enableLookups="false" redirectPort="8443"
       protocol="AJP/1.3"/>
      
       <!-- SSL/TLS Connector configuration using the admin devl guide keystore-->
       <Connector port="8443" address="${jboss.bind.address}"
       maxThreads="100" strategy="ms" maxHttpHeaderSize="8192"
       emptySessionPath="true"
       scheme="https" secure="true" clientAuth="false"
       keystoreFile="${jboss.server.home.dir}/conf/localhost.ks"
       keystorePass="123456"
       truststoreFile="${jboss.server.home.dir}/conf/localhost.ks"
       truststorePass="123456"
       sslProtocol="TLS" />
      
       <Engine name="jboss.web" defaultHost="localhost">
      
       <!-- The JAAS based authentication and authorization realm implementation
       that is compatible with the jboss 3.2.x realm implementation.
       - certificatePrincipal : the class name of the
       org.jboss.security.auth.certs.CertificatePrincipal impl
       used for mapping X509[] cert chains to a Princpal.
       -->
       <Realm className="org.jboss.web.tomcat.security.JBossSecurityMgrRealm"
       certificatePrincipal="org.jboss.security.auth.certs.SubjectDNMapping"
       />
       <!-- A subclass of JBossSecurityMgrRealm that uses the authentication
       behavior of JBossSecurityMgrRealm, but overrides the authorization
       checks to use JACC permissions with the current java.security.Policy
       to determine authorized access.
       <Realm className="org.jboss.web.tomcat.security.JaccAuthorizationRealm"
       certificatePrincipal="org.jboss.security.auth.certs.SubjectDNMapping"
       />
       -->
      
       <Host name="localhost"
       autoDeploy="false" deployOnStartup="false" deployXML="false">
      
       <!-- Uncomment to enable request dumper. This Valve "logs interesting
       contents from the specified Request (before processing) and the
       corresponding Response (after processing). It is especially useful
       in debugging problems related to headers and cookies."
       -->
       <!--
       <Valve className="org.apache.catalina.valves.RequestDumperValve" />
       -->
      
       <!-- Access logger -->
       <!--
       <Valve className="org.apache.catalina.valves.FastCommonAccessLogValve"
       prefix="localhost_access_log." suffix=".log"
       pattern="common" directory="${jboss.server.home.dir}/log"
       resolveHosts="false" />
       -->
      
       <!-- Uncomment to enable single sign-on across web apps
       deployed to this host. Does not provide SSO across a cluster.
      
       If this valve is used, do not use the JBoss ClusteredSingleSignOn
       valve shown below.
       -->
       <!--
       <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
       -->
      
       <!-- Uncomment to enable single sign-on across web apps
       deployed to this host AND to all other hosts in the cluster.
      
       If this valve is used, do not use the standard Tomcat SingleSignOn
       valve shown above.
      
       Valve uses a JBossCache instance to support SSO credential
       caching and replication across the cluster. The JBossCache
       instance must be configured separately. By default, the valve
       shares a JBossCache with the service that supports HttpSession
       replication. See the "tc5-cluster-service.xml" file in the
       server/all/deploy directory for cache configuration details.
      
       Besides the attributes supported by the standard Tomcat
       SingleSignOn valve (see the Tomcat docs), this version also
       supports the following attribute:
      
       treeCacheName JMX ObjectName of the JBossCache MBean used to
       support credential caching and replication across
       the cluster. If not set, the default value is
       "jboss.cache:service=TomcatClusteringCache", the
       standard ObjectName of the JBossCache MBean used
       to support session replication.
       -->
       <!--
       <Valve className="org.jboss.web.tomcat.tc5.sso.ClusteredSingleSignOn" />
       -->
      
      
       <!-- Uncomment to check for unclosed connections and transaction terminated checks
       in servlets/jsps.
       Important: You need to uncomment the dependency on the CachedConnectionManager
       in META-INF/jboss-service.xml
       <Valve className="org.jboss.web.tomcat.tc5.jca.CachedConnectionValve"
       cachedConnectionManagerObjectName="jboss.jca:service=CachedConnectionManager"
       transactionManagerObjectName="jboss:service=TransactionManager" />
       -->
      
       </Host>
      
       </Engine>
      
       </Service>
      
       <Service name="my.web"
       className="org.jboss.web.tomcat.tc5.StandardService">
      
       <!-- A HTTP/1.1 Connector on port 8080 -->
       <Connector port="8081" address="${jboss.bind.address}"
       maxThreads="250" strategy="ms" maxHttpHeaderSize="8192"
       emptySessionPath="true"
       enableLookups="false" redirectPort="8444" acceptCount="100"
       connectionTimeout="20000" disableUploadTimeout="true"/>
      
       <!-- SSL/TLS Connector configuration using the admin devl guide keystore-->
       <Connector port="8444" address="${jboss.bind.address}"
       maxThreads="100" strategy="ms" maxHttpHeaderSize="8192"
       emptySessionPath="true"
       scheme="https" secure="true" clientAuth="true"
       keystoreFile="${jboss.server.home.dir}/conf/localhost.ks"
       keystorePass="123456"
       truststoreFile="${jboss.server.home.dir}/conf/localhost.ks"
       truststorePass="123456"
       sslProtocol="TLS" />
      
       <Engine name="my.web" defaultHost="localhost">
      
       <Realm className="org.jboss.web.tomcat.security.JBossSecurityMgrRealm"
       certificatePrincipal="org.jboss.security.auth.certs.SubjectDNMapping"
       />
      
       <Host name="localhost" appBase="D:\programs\jboss-4.0.3SP1\temp" unpackWARs="false"
       autoDeploy="true" deployOnStartup="true" deployXML="true"/>
      
       </Engine>
      
       </Service>
      
      </Server>
      


      The problem is that when i deploy a war with a web service inside the all/deploy directory the following happens

      [TomcatDeployer] deploy, ctxPath=/authentication-simple, warUrl=.../tmp/deploy/tmp3567authentication-simple-exp.war/
      [WSDLFilePublisher] WSDL published to: file:/D:/programs/jboss-4.0.3SP1/bin/../server/all/deploy/wsdls.war/SimpleAuthTargetService.
      [TypeMappingDescription] Class not found: com.myrio.tm.security.authentication.target.util.AuthResult
      [AxisService] WSDD published to: D:\programs\jboss-4.0.3SP1\server\all\data\wsdl\authentication-simple.war\ISimpleAuthTarget.wsdd
      [AxisService] Web Service deployed: http://pt1wgczc:8080/authentication-simple/simpleauthtarget
      


      but if i dump the war inside the test directory only this happens
      [HostConfig] Deploying web application archive authentication-simple.war


      How can i replicate the former behavior for the deployments in the test directory ? Otherwise I cannot dploy my webservices in this second connector. Please urgent help is needed !!!

      Thanks

        • 3. Re: deploy web services in different connectors please help!
          nuno oliveira Newbie

          Hi Thomas,

          Thanks for answering. I need to be able to deploy web services to both connectors, not just the new one, so I think the link you referred (which, by the way, i already knew) is not applicable.

          I thought that there could be more than meets the eye in your answer, so I reverted the new service creation and moved the new connector definiton into the jboss.web service definition, along with the other connectors 8080, and 8443 already there. Then I hard coded in one of the web service's wsdl a url to the alternative (8081) connector url. I ignored the test deployment directory and deployed this web service in the all/deploy directory, but as expected that hard coding only reflects upon the deployed wsdl. During this deployment i still get the message that the web service is being deployed in the connector associated with the definitons in the ws4ee jboss-service.xml (8080). Note that I set the to "false".

          So, unless I'm missing something obvious, this is not a viable solution to my problem. How can I attach ws deployments to differents connectors ? With servlets, the new tomcat service definition solved it, but how can I trigger wsdeployer when i deploy services in the directory attached to the other service/connectors ? As explained in my original question, that is simply not working. Hey! I'm even open to manualy deploy the ws artifacts. Is this viable ?

          Any other thoughts ? anyone ? Please do not assume I'm not trying to solve this concurrently. this is no a question of dumping my work on another persons' shoulders. My need for help is still quite real.

          Thank you very much.