How to use ArrayList in Java Web Service
Hi frenz,
i am having a web service that is having 3 operations. They are all working fine.
now i want to add the forth operation with a return type of "ArrayList".
i tried, but it thrown an error:
error: Collection types are not supported in literal mode - Type: "java.util.ArrayList"
This is my wsdl file.
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="palms" targetNamespace="urn:palms/wsdl" xmlns:tns="urn:palms/wsdl" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns2="urn:palms/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<types>
<schema targetNamespace="urn:palms/types" xmlns:tns="urn:palms/types" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://www.w3.org/2001/XMLSchema">
<complexType name="enroll">
<sequence>
<element name="String_1" type="string" nillable="true"/>
<element name="arrayOfbyte_2" type="base64Binary" nillable="true"/></sequence></complexType>
<complexType name="enrollResponse">
<sequence>
<element name="result" type="boolean"/></sequence></complexType>
<complexType name="loadLIb">
<sequence/></complexType>
<complexType name="loadLIbResponse">
<sequence/></complexType>
<complexType name="verify">
<sequence>
<element name="String_1" type="string" nillable="true"/></sequence></complexType>
<complexType name="verifyResponse">
<sequence>
<element name="result" type="base64Binary" nillable="true"/></sequence></complexType>
<element name="enroll" type="tns:enroll"/>
<element name="enrollResponse" type="tns:enrollResponse"/>
<element name="loadLIb" type="tns:loadLIb"/>
<element name="loadLIbResponse" type="tns:loadLIbResponse"/>
<element name="verify" type="tns:verify"/>
<element name="verifyResponse" type="tns:verifyResponse"/></schema></types>
<message name="palmsSEI_enroll">
<part name="parameters" element="ns2:enroll"/></message>
<message name="palmsSEI_enrollResponse">
<part name="result" element="ns2:enrollResponse"/></message>
<message name="palmsSEI_loadLIb">
<part name="parameters" element="ns2:loadLIb"/></message>
<message name="palmsSEI_loadLIbResponse">
<part name="result" element="ns2:loadLIbResponse"/></message>
<message name="palmsSEI_verify">
<part name="parameters" element="ns2:verify"/></message>
<message name="palmsSEI_verifyResponse">
<part name="result" element="ns2:verifyResponse"/></message>
<portType name="palmsSEI">
<operation name="enroll">
<input message="tns:palmsSEI_enroll"/>
<output message="tns:palmsSEI_enrollResponse"/></operation>
<operation name="loadLIb">
<input message="tns:palmsSEI_loadLIb"/>
<output message="tns:palmsSEI_loadLIbResponse"/></operation>
<operation name="verify">
<input message="tns:palmsSEI_verify"/>
<output message="tns:palmsSEI_verifyResponse"/></operation></portType>
<binding name="palmsSEIBinding" type="tns:palmsSEI">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="enroll">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/></input>
<output>
<soap:body use="literal"/></output></operation>
<operation name="loadLIb">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/></input>
<output>
<soap:body use="literal"/></output></operation>
<operation name="verify">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/></input>
<output>
<soap:body use="literal"/></output></operation></binding>
<service name="Palms">
<port name="palmsSEIPort" binding="tns:palmsSEIBinding">
<soap:address location="REPLACE_WITH_ACTUAL_URL"/></port></service></definitions>
can somebody help me?
thanx
--Subbu

