Hello,

So at the server side I replaced 
        <bean id="ContainerISOService" class="service.ContainerISOImpl"/>       

by 
        <bean id="ContainerISOService"
class="org.codehaus.xfire.spring.ServiceBean" >
                <property name="serviceClass" value="service.ContainerISOImpl"/>
                <property name="serviceFactory" ref="jaxbServiceFactory"/>      
        </bean>

                <bean name="jaxbServiceFactory"
class="org.codehaus.xfire.jaxb2.JaxbServiceFactory">
          <constructor-arg ref="xfire.transportManager"/>
        </bean>  

Again, through a browser I can review the wsdl.

At the client side I made a similar change, by adding the ServiceFactory
property to the webservice bean.

   <bean id="testWebService"
        class="org.codehaus.xfire.spring.remoting.XFireClientFactoryBean">
        <property name="serviceClass">
                <value>service.ContainerISOImpl</value>
        </property>
        <property name="wsdlDocumentUrl">
        
<value>http://localhost:8080/CosmosServiceLayer/services/ContainerISOImpl?wsdl</value>
        </property>
        <property name="serviceFactory" ref ="jaxbServiceFactory"/>
   </bean>

        <bean name="jaxbServiceFactory"
class="org.codehaus.xfire.jaxb2.JaxbServiceFactory">
        <constructor-arg ref="xfire.transportManager"/>
        </bean>


However I still get

Resovling. Base: , URI:
http://localhost:8080/CosmosServiceLayer/services/ContainerISOImpl?wsdl
Retrieving document at 'null'.
class $Proxy6

The SoapUI reveals an error on the server ; 

java.lang.IllegalArgumentException: object is not an instance of declaring
class
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at
org.codehaus.xfire.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:54)
        at
org.codehaus.xfire.service.invoker.ObjectInvoker.invoke(ObjectInvoker.java:45)
        at
org.codehaus.xfire.service.binding.ServiceInvocationHandler.sendMessage(ServiceInvocationHandler.java:271)
        at
org.codehaus.xfire.service.binding.ServiceInvocationHandler$1.run(ServiceInvocationHandler.java:84)
        at
org.codehaus.xfire.service.binding.ServiceInvocationHandler.execute(ServiceInvocationHandler.java:132)
        at
org.codehaus.xfire.service.binding.ServiceInvocationHandler.invoke(ServiceInvocationHandler.java:107)
        at
org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
        at
org.codehaus.xfire.transport.DefaultEndpoint.onReceive(DefaultEndpoint.java:64)

Can you help me a little bit further ?

Luc


Fried Hoeben wrote:
> 
> Luc,
> 
> I think I see what may be your client problem. I assume you want to use
> JAXB and not Aegis (a guess based on the server code you supply). 
> 
> You need to specify in the Spring config that you want to use JAXB, your
> using the default which is Aegis.
> 
> "By default this factory bean creates a service endpoint using an
> instance of [EMAIL PROTECTED]
> org.codehaus.xfire.service.binding.ObjectServiceFactory}. Another one
> can be configured using [EMAIL PROTECTED] #setServiceFactory(ServiceFactory)}"
> 
> Fried
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/JSR181---Spring-based-server-and-client-tf2961233.html#a8296729
Sent from the XFire - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to