Consuming Service with Array of Complex Types Returned
cmnewcomer Jan 31, 2005 12:46 PMI am trying to deploy a EJB WS in JBoss 4.0.0 with an array of complex types as the return type. The service endpoint follows:
public HumanSubjectsUsedVOArray findAllHumanSubjectsByLogNo(String logNo)
throws RemoteException;
I then generated my WSDL, RPC mapping, etc. using wscompile using the
documentliteral for the -f option.
As discussed in the Wiki, I created a ws4ee-deploymnet.xml file to define the
complex type, HumanSubjectsUsedVOArray, used for the service as follows:
<deployment
xmlns='http://xml.apache.org/axis/wsdd/'
xmlns:java='http://xml.apache.org/axis/wsdd/providers/java'
xmlns:soap='http://schemas.xmlsoap.org/soap/encoding/'
xmlns:xsi='http://www.w3.org/2000/10/XMLSchema-instance'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
<typeMapping
qname='tns:findAllHumanSubjectsByLogNoResponse'
xmlns:tns='http://peer_review.beantier.publish.ws.constellagroup.com/types'
type='java:com.constellagroup.ws.publish.beantier.peer_review.humanSubjectsUsed.HumanSubjectsUsedVOArray'
serializer='org.apache.axis.encoding.ser.BeanSerializerFactory'
deserializer='org.apache.axis.encoding.ser.BeanDeserializerFactory'
encodingStyle=''>
Everything deploys fine but when I try to access the WSDL I get an error
indicating that the operation can not be synchronized. I then updated the
ws4ee-deploymnet.xml as follows:
<deployment
xmlns='http://xml.apache.org/axis/wsdd/'
xmlns:java='http://xml.apache.org/axis/wsdd/providers/java'
xmlns:soap='http://schemas.xmlsoap.org/soap/encoding/'
xmlns:xsi='http://www.w3.org/2000/10/XMLSchema-instance'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
<typeMapping
qname='tns:findAllHumanSubjectsByLogNo' xmlns:tns='http://peer_review.beantier.publish.ws.constellagroup.com/types'
type='java:java.lang.String'
serializer='org.apache.axis.encoding.ser.BeanSerializerFactory'
deserializer='org.apache.axis.encoding.ser.BeanDeserializerFactory'
encodingStyle=''>
<typeMapping
qname='tns:findAllHumanSubjectsByLogNoResponse'
xmlns:tns='http://peer_review.beantier.publish.ws.constellagroup.com/types'
type='java:com.constellagroup.ws.publish.beantier.peer_review.humanSubjectsUsed.HumanSubjectsUsedVOArray'
serializer='org.apache.axis.encoding.ser.BeanSerializerFactory'
deserializer='org.apache.axis.encoding.ser.BeanDeserializerFactory'
encodingStyle=''>
This deploys fine and I can now access the WSDL. But when I try to consume the
service, I get an error indicating invalid element - arg0.
Are there any examples for consuming a service with an array of objects as the
passed in parameter and an array of complex types as the return type?
If this is not possible, what must be done to consume the service?
Any quidance would be greatly appreciated.
Best Regards.
Carl