[Installation, Configuration & DEPLOYMENT] - Re: Configuring virtual host in jboss-4.2.0.GA?
by vlaugier
Hello,
I hope this discussion is not closed because I have the same problem with jboss_eap_4.2.0_CP1
I have followed instructions on http://wiki.jboss.org/wiki/Wiki.jsp?page=VirtualHosts hoping that the configuration for jboss 4.0 also works for 4.2 (unlike Tom I do not know if my configuration would work on jboss 4.0)
This is what I get with :
http://www.mydomain.fr leads me to the jboss default page JBOSS_HOME/server/production/deploy/jboss-web.deployer/ROOT.war/index.html
http://mydomain.fr leads me to a blank page
http://www.orangeadomicile.fr/portalOAV2 and http://orangeadomicile.fr/portalOAV2 lead to the application
The server.xml configuration is :
| <Connector port="80" address="${jboss.bind.address}"
| maxThreads="250" maxHttpHeaderSize="8192"
| emptySessionPath="true" protocol="HTTP/1.1"
| enableLookups="false" redirectPort="8443" acceptCount="100"
| connectionTimeout="20000" disableUploadTimeout="true" />
|
| [...]
|
|
| <Host name="orangeadomicile.fr"
| autoDeploy="false" deployOnStartup="false" deployXML="false">
| <Alias>orangeadomicile.fr</Alias>
| <Alias>www.orangeadomicile.fr</Alias>
| <Valve className="org.apache.catalina.valves.AccessLogValve"
| prefix="orangeadomicile.fr-120-" suffix=".log"
| pattern="common" directory="${jboss.server.home.dir}/log"/>
| </Host>
|
|
and jboss-web.xml
| <?xml version="1.0"?>
| <!DOCTYPE jboss-web>
| <jboss-web>
| <virtual-host>orangeadomicile.fr</virtual-host>
| </jboss-web>
|
or (I do not quite understand the difference, but I have seen both on forums)
| <?xml version="1.0"?>
| <!DOCTYPE jboss-web>
| <jboss-web>
| <context-root>/portalOAV2</context-root>
| <virtual-host>orangeadomicile.fr</virtual-host>
| </jboss-web>
|
We have configured the DNS for this domain in the same manner as for our other domains pointing to apache websites. That is to say we tell the DNS server to point this domain name to this IP adress, we cannot specify more I think on the DNS side.
What we want is achieve the same thing as in apache, in apache we would have written for a domain name albumus.fr
| <VirtualHost our IP adress:80>
| ServerAdmin vincent.laugier(a)helmet.fr
| ServerName www.albumus.fr
| ServerAlias www.albumus.fr albumus.fr
| DocumentRoot /var/www/album/
| <Directory /var/www/album>
| AllowOverride All
| Allow from all
| </Directory>
| ErrorLog /var/www/album/logs/error.log
| LogLevel warn
| CustomLog /var/www/album/logs/access.log combined
| ServerSignature Off
| </VirtualHost>
|
Note : jboss is not running locally, so changin /etc/hosts is no use
I hope you Tom or someone else have found a solution, documentation is scarce
regards
Vincent
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4095599#4095599
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4095599
18Â years, 9Â months
[JBossWS] - SessionBean as WebService - again complex data structures
by CarstenRudat
Hi all,
I have a SLSB and want it to be accessable through a webservice. So I write
| package com.genloop.ejb.beans.service;
|
| import javax.ejb.Remote;
| import javax.jws.WebMethod;
| import javax.jws.WebService;
| import javax.jws.soap.SOAPBinding;
|
| @WebService
| @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
| @Remote
| public interface PartnerWebService extends java.rmi.Remote{
|
| @WebMethod
| public String sayHello(String hello);
|
| }
|
and
| package com.genloop.ejb.beans.service;
|
| import java.util.Date;
|
| import javax.ejb.Remote;
| import javax.ejb.Stateless;
| import javax.interceptor.Interceptors;
| import javax.jws.WebService;
|
| import org.jboss.annotation.ejb.RemoteBinding;
| import org.jboss.annotation.security.SecurityDomain;
|
| import com.genloop.ejb.commons.SecurityInterceptor;
| import com.genloop.ejb.commons.UserInterceptor;
|
| @Stateless
| @Remote(PartnerWebService.class)
| @SecurityDomain("...")
| @org.jboss.annotation.ejb.Clustered
| @RemoteBinding(jndiBinding="test/PartnerWebService/remote")
| @Interceptors({UserInterceptor.class, SecurityInterceptor.class})
| @WebService(endpointInterface="com.genloop.ejb.beans.service.PartnerWebService", serviceName="PartnerService")
| public class PartnerWebServiceBean implements PartnerWebService {
|
| public String sayHello(String hello) {
| return hello;
| }
|
| }
|
My Client works well:
| public class PartnerWSClient {
|
| public static void main(String[] args) {
| try {
| URL url = new URL("http://localhost:8080/test-ea-test-service/PartnerWebServiceBean?wsdl");
| QName qname = new QName("http://service.beans.ejb.genloop.com/", "PartnerService");
|
| ServiceFactory factory = ServiceFactory.newInstance();
| Service service = factory.createService(url, qname);
|
| PartnerWebService partnerService = (PartnerWebService)service.getPort(PartnerWebService.class);
|
| System.out.println(partnerService.sayHello("test"));
| } catch (MalformedURLException e) {
| e.printStackTrace();
| } catch (ServiceException e) {
| e.printStackTrace();
| }
| }
| }
|
But now, I add another mehtod:
| public ComplexObject getComplexObject() {
| return new ComplexObject(new Date(), "test");
| }
|
| ...
|
| @WebMethod
| public ComplexObject getComplexObject();
|
| ...
|
| public class ComplexObject implements Serializable {
|
| protected Date date;
|
| protected String string;
|
| public ComplexObject() {
| }
|
| getter/setter
| }
|
No, I just get this exception:
| Cannot obtain java/xml type mapping for: {http://service.beans.ejb.genloop.com/}complexObject
|
I use JBoss 4.2.1 and updated JBoss Web Services to version 2.0.
And my question is: What am I doing wrong? Is there any way to get user datastructures work?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4095598#4095598
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4095598
18Â years, 9Â months