Hello,

I have a simple Webservice with one method 

        @WebMethod public ServiceWSArray getServiceInfos( Long 
serviceProviderId ) throws UnknownServiceProviderException;

It returns a ServiceArray which in fact is a wrapper that contains ServiceWS 
elements. I generated my client stubs with wstools and it creates the 
ServiceWSArray as expected 

/*
 * JBossWS WS-Tools Generated Source
 *
 * Generation Date: Thu Oct 26 15:23:00 CEST 2006
 *
 * This generated source code represents a derivative work of the input to
 * the generator that produced it. Consult the input for the copyright and
 * terms of use that apply to this source code.
 */

package com.siemens.ivon.soap.client;


public class  ServiceWSArray
{

protected com.siemens.ivon.soap.client.ServiceWS[]  value;
public ServiceWSArray(){}

public ServiceWSArray(com.siemens.ivon.soap.client.ServiceWS[] value){
this.value=value;
}
public com.siemens.ivon.soap.client.ServiceWS[]  getValue() { return value ;}

public void setValue(com.siemens.ivon.soap.client.ServiceWS[] value){ 
this.value=value; }

}



When I call the WS method from within a junit test I see the complete soap 
message comes in but the tests throws the following error. Can anybody help me 
and tell me what I'm doing wrong or is this a known bug. I'm using JBoss 4.0.4 
GA with EJB3.

Thanks

Erik

    [junit] java.rmi.RemoteException: Call invocation failed: Java type 'class 
com.siemens.ivon.soap.client.ServiceWSArray' is not assignable from: 
[Lcom.siemens.ivon.soap.client.ServiceWS;; nested exception is: 
    [junit]     org.jboss.ws.WSException: Java type 'class 
com.siemens.ivon.soap.client.ServiceWSArray' is not assignable from: 
[Lcom.siemens.ivon.soap.client.ServiceWS;
    [junit]     at 
org.jboss.ws.jaxrpc.CallImpl.invokeInternal(CallImpl.java:719)
    [junit]     at org.jboss.ws.jaxrpc.CallImpl.invoke(CallImpl.java:398)
    [junit]     at org.jboss.ws.jaxrpc.CallProxy.invoke(CallProxy.java:164)
    [junit]     at $Proxy1.getServiceInfos(Unknown Source)
    [junit]     at 
com.siemens.ivon.facade.soap.TestServiceSOAP.testGetServiceInfos(TestServiceSOAP.java:336)
    [junit]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [junit]     at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    [junit]     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [junit]     at java.lang.reflect.Method.invoke(Method.java:585)
    [junit]     at junit.framework.TestCase.runTest(TestCase.java:164)
    [junit]     at junit.framework.TestCase.runBare(TestCase.java:130)
    [junit]     at junit.framework.TestResult$1.protect(TestResult.java:110)
    [junit]     at junit.framework.TestResult.runProtected(TestResult.java:128)
    [junit]     at junit.framework.TestResult.run(TestResult.java:113)
    [junit]     at junit.framework.TestCase.run(TestCase.java:120)
    [junit]     at junit.framework.TestSuite.runTest(TestSuite.java:228)
    [junit]     at junit.framework.TestSuite.run(TestSuite.java:223)
    [junit]     at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:289)
    [junit]     at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:656)
    [junit]     at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:558)
    [junit] Caused by: org.jboss.ws.WSException: Java type 'class 
com.siemens.ivon.soap.client.ServiceWSArray' is not assignable from: 
[Lcom.siemens.ivon.soap.client.ServiceWS;
    [junit]     at 
org.jboss.ws.soap.SOAPContentElement.getObjectValue(SOAPContentElement.java:299)
    [junit]     at 
org.jboss.ws.binding.EndpointInvocation.transformPayloadValue(EndpointInvocation.java:233)
    [junit]     at 
org.jboss.ws.binding.EndpointInvocation.getReturnValue(EndpointInvocation.java:182)
    [junit]     at 
org.jboss.ws.jaxrpc.CallImpl.syncOutputParams(CallImpl.java:871)
    [junit]     at 
org.jboss.ws.jaxrpc.CallImpl.invokeInternal(CallImpl.java:706)
    [junit]     ... 19 more



            

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981011#3981011

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981011
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to