Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Web Service - return value = List of lists

Status
Not open for further replies.

sknyppy

Programmer
May 14, 1999
137
US
I'm invoking a webservice method which returns a List of Lists and CF is generating an error message about 'marshalling data..."?
All my other methods that return a String value work perfect. How can I get this to work properly in CF? It works ok in Java.

========= CF ERROR MSG ===========
Cannot perform web service invocation itemDetail.
The fault returned when invoking the web service operation is:
AxisFault
faultCode: { faultSubcode:
faultString: Marshalling Error: class java.util.ArrayList nor any of its super class is known to this context.
faultActor:
faultNode:
faultDetail:
{ Error: class java.util.ArrayList nor any of its super class is known to this context.
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:221)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:128)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
===================================

========= WEB SERVICE METHOD that returns a List containing multiple Lists. ===============
public List<Object> itemDetail(String itemName) {

List<String> statusMsgs = new ArrayList<String>();
List<Error> errorList = new ArrayList<Error>();
List<Subscriber> itemList = new ArrayList<Subscriber>();
List<SubscriberAttribute> itemTypeList = new ArrayList<SubscriberAttribute>();
List<IpAssignment> itemStockList = new ArrayList<IpAssignment>();
List<Object> returnList = new ArrayList<Object>();

(********* POPULATE EACH LIST HERE - blah blah*********)

returnList.add(errorList);
returnList.add(itemList);
returnList.add(itemTypeList);
returnList.add(itemStockList);
returnList.add(statusMsgs);

return returnList;
}
===================================

Thanks,
Dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top