Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: Remote services and Hessian

  1. #11

    Default

    Actually, the non-java client thing is a non-issue, because the server always support both mangled and non-mangled method names, it's the client that default not to mangle method name. However, not mangling method name is the default value of hessian/burlap, Spring just doesn't mess with that if not asked. I guess caucho decided to have non-mangled method names by default for performance reasons.

  2. #12

    Default Hessian client connection problem

    Hello,

    I have exposed a Hessian service in my web-app and am trying to connect a standalone client to it. I seem to be getting the error:

    com.caucho.hessian.io.HessianProtocolException:
    at com.caucho.hessian.client.HessianProxy.invoke(Hess ianProxy.java:176)
    at $Proxy0.createArrayDesign2Persist(Unknown Source)

    .....

    my client config file is:

    <beans>
    <!-- Remoting -->
    <!-- Server Side RMI is on port 1299 ... see IntegrativeMetaAnalysis
    springapp-servlet.xml -->
    <!--Client Side Hessian -->
    <bean id="readFile" class="tools.SimpleClientObject">
    <property name="arrayDesignManagerInterface">
    <ref bean="arrayDesignManagerProxy"/>
    </property>
    </bean>
    <bean id="arrayDesignManagerProxy"
    class="org.springframework.remoting.caucho.Hessian ProxyFactoryBean">
    <property name="serviceUrl">
    <value>http://localhost:8080/ArrayDesignService</value>
    </property>
    <property name="serviceInterface">
    <value>bus.ArrayDesignManagerInterface</value>
    </property>
    </bean>
    </beans>

    my server config file is:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">

    <!--
    - Application context definition for "springapp" DispatcherServlet.
    -->


    <beans>
    <!-- Controller (Action equivalent) -->
    <bean id="springappController" class="web.SpringappController">
    <property name="geneManager">
    <ref bean="geneMan"/>
    </property>
    <property name="bioSequenceManager">
    <ref bean="biosequenceMan"/>
    </property>
    <property name="compositeSequenceManager">
    <ref bean="compositesequenceMan"/>
    </property>
    <property name="arrayDesignManager">
    <ref bean="arraydesignMan"/>
    </property>
    </bean>
    <!-- Validator and Form Controller for the "UserName" page -->
    <bean id="userNameValidator" class="bus.UserNameValidator"/>
    <bean id="userNameForm" class="web.UserNameFormController">
    <property name="sessionForm">
    <value>true</value>
    </property>
    <property name="commandName">
    <value>userName</value>
    </property>
    <property name="commandClass">
    <value>bus.UserName</value>
    </property>
    <property name="validator">
    <ref bean="userNameValidator"/>
    </property>
    <property name="formView">
    <value>username</value>
    </property>
    <property name="successView">
    <value>hello.htm</value>
    </property>
    <property name="geneManager">
    <ref bean="geneMan"/>
    </property>
    <property name="bioSequenceManager">
    <ref bean="biosequenceMan"/>
    </property>
    <property name="compositeSequenceManager">
    <ref bean="compositesequenceMan"/>
    </property>
    <property name="arrayDesignManager">
    <ref bean="arraydesignMan"/>
    </property>
    </bean>
    <!-- Bean Managers -->
    <bean id="geneMan" class="bus.GeneManager">
    <property name="geneManagerDao">
    <ref bean="geneManDaoHib"/>
    </property>
    </bean>
    <bean id="biosequenceMan" class="bus.BioSequenceManager">
    <property name="bioSequenceManagerDao">
    <ref bean="biosequenceManDaoHib"/>
    </property>
    </bean>
    <bean id="compositesequenceMan" class="bus.CompositeSequenceManager">
    <property name="compositeSequenceManagerDao">
    <ref bean="compositesequenceManDaoHib"/>
    </property>
    </bean>
    <bean id="arraydesignMan" class="bus.ArrayDesignManager">
    <property name="arrayDesignManagerDao">
    <ref bean="arraydesignManDaoHib"/>
    </property>
    </bean>
    <!-- Data Access Objects -->
    <bean id="geneManDao" class="db.GeneManagerDaoJdbc">
    <property name="dataSource">
    <ref bean="dataSource"/>
    </property>
    </bean>
    <bean id="geneManDaoHib" class="db.GeneManagerDaoHibernate">
    <property name="sessionFactory">
    <ref bean="mySessionFactory"/>
    </property>
    </bean>
    <bean id="biosequenceManDaoHib" class="db.BioSequenceManagerDaoHibernate">
    <property name="sessionFactory">
    <ref bean="mySessionFactory"/>
    </property>
    </bean>
    <bean id="compositesequenceManDaoHib"
    class="db.CompositeSequenceManagerDaoHibernate">
    <property name="sessionFactory">
    <ref bean="mySessionFactory"/>
    </property>
    </bean>
    <bean id="arraydesignManDaoHib" class="db.ArrayDesignManagerDaoHibernate">
    <property name="sessionFactory">
    <ref bean="mySessionFactory"/>
    </property>
    </bean>
    <!--
    <property name="genes">
    <list>
    <ref bean="gene1"/>
    <ref bean="gene2"/>
    <ref bean="gene3"/>
    </list>
    </property>
    </bean>
    -->
    <!--
    <bean id="gene1" class="bus.Gene">
    <property name="id"><value>0</value></property>
    <property name="name"><value>GeneA</value></property>
    <property name="description"><value>An A Gene.</value></property>
    </bean>

    <bean id="gene2" class="bus.Gene">
    <property name="id"><value>1</value></property>
    <property name="name"><value>GeneB</value></property>
    <property name="description"><value>An B Gene.</value></property>
    </bean>

    <bean id="gene3" class="bus.Gene">
    <property name="id"><value>2</value></property>
    <property name="name"><value>GeneC</value></property>
    <property name="description"><value>An C Gene.</value></property>
    </bean>
    -->
    <!--Using SessionFactory resource for Hibernate data access-->
    <bean id="mySessionFactory"
    class="org.springframework.orm.hibernate.LocalSess ionFactoryBean">
    <property name="mappingResources">
    <list>
    <value>Gene.hbm.xml</value>
    <value>BioSequence.hbm.xml</value>
    <value>CompositeSequence.hbm.xml</value>
    <value>ArrayDesign.hbm.xml</value>
    <value>Reporter.hbm.xml</value>
    </list>
    </property>
    <property name="hibernateProperties">
    <props>
    <prop key="hibernate.dialect">
    net.sf.hibernate.dialect.MySQLDialect</prop>
    </props>
    </property>
    <property name="dataSource">
    <ref bean="dataSource"/>
    </property>
    </bean>
    <!-- Used by straight jdbc as well as by hibernate's session factory -->
    <bean id="dataSource"
    class="org.springframework.jdbc.datasource.DriverM anagerDataSource">
    <property name="driverClassName">
    <value>com.mysql.jdbc.Driver</value>
    </property>
    <property name="url">
    <value>jdbc:mysql://localhost:3307/integrativemetaanalysis</value>
    <!--<value>jdbc:mysql://localhost:3307/ermine</value>-->
    <!--<value>jdbc:mysql://localhost:3306/ermine</value>-->
    </property>
    <property name="username">
    <value>pavlidis</value>
    </property>
    <property name="password">
    <value>toast</value>
    </property>
    </bean>
    <!--Transaction Management -->
    <!--
    <bean id="myTransactionManager"
    class="org.springframework.orm.hibernate.Hibernate TransactionManager">
    <property name="sessionFactory">
    <ref bean="mySessionFactory"/>
    </property>
    </bean>
    <bean id="myGeneServiceTarget" class="bus.GeneManager">
    <property name="geneManagerDao">
    <ref bean="geneManDaoHib"/>
    </property>
    </bean>
    <bean id="myGeneService"
    class="org.springframework.transaction.interceptor .TransactionProxyFactoryBean">
    <property name="transactionManager">
    <ref bean="myTransactionManager"/>
    </property>
    <property name="target">
    <ref bean="myGeneServiceTarget"/>
    </property>
    <property name="transactionAttributes">
    <props>
    <prop key="increasePrice*">PROPAGATION_REQUIRED</prop>
    <prop key="someOtherBusinessMethod">PROPAGATION_MANDATOR Y</prop>
    </props>
    </property>
    </bean>-->
    <!-- message bundle -->
    <bean id="messageSource"
    class="org.springframework.context.support.Resourc eBundleMessageSource">
    <property name="basename">
    <value>messages</value>
    </property>
    </bean>
    <!-- map urls -->
    <bean id="urlMapping"
    class="org.springframework.web.servlet.handler.Sim pleUrlHandlerMapping">
    <property name="mappings">
    <props>
    <prop key="/hello.htm">springappController</prop>
    <prop key="/username.htm">userNameForm</prop>
    </props>
    </property>
    </bean>
    <!-- Spring's view resolver implementation -->
    <bean id="viewResolver"
    class="org.springframework.web.servlet.view.Intern alResourceViewResolver">
    <property name="viewClass">
    <value>org.springframework.web.servlet.view.JstlVi ew</value>
    </property>
    <property name="prefix">
    <value>/WEB-INF/jsp/</value>
    </property>
    <property name="suffix">
    <value>.jsp</value>
    </property>
    </bean>
    <!-- Remoting -->
    <!--Server Side Hessian -->
    <bean name="/ArrayDesignService"
    class="org.springframework.remoting.caucho.Hessian ServiceExporter">
    <property name="service">
    <ref bean="arraydesignMan"/>
    </property>
    <property name="serviceInterface">
    <value>bus.ArrayDesignManagerInterface</value>
    </property>
    </bean>
    </beans>

    Any ideas? The only difference between this and the Spring examples I have looked at is the fact that I am using a standalone command line client as opposed to another servlet.

    Any help would be greatly appreciated.

    Thanks.

Similar Threads

  1. Using Hessian inside WebSphere
    By mynzai in forum Web
    Replies: 0
    Last Post: Sep 21st, 2005, 08:55 AM
  2. Hessian and the request..
    By tonygiaccone in forum JMS
    Replies: 2
    Last Post: Sep 12th, 2005, 03:02 PM
  3. Replies: 3
    Last Post: Sep 12th, 2005, 10:45 AM
  4. full blown spring-web services tutorial
    By lkjairath@yahoo.com in forum JMS
    Replies: 2
    Last Post: Feb 6th, 2005, 05:13 AM
  5. Testing Services
    By chenrici in forum Remoting
    Replies: 2
    Last Post: Nov 1st, 2004, 06:13 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •