File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes is there any alternative for ArrayList object in web services Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "is there any alternative for ArrayList object in web services" Watch "is there any alternative for ArrayList object in web services" New topic
Author

is there any alternative for ArrayList object in web services

Narendra Kumar Pinnaka
Greenhorn

Joined: Jul 05, 2007
Posts: 9
i have to use an ArrayList type in my model class when i complile all webservices files i am getting a build error

[java2wsdl] Java2WSDL com.verisign.xmlgateway.webservices.accountservicehistorygateway.AccountServiceHistoryGatewayWSImpl
[java2wsdl] 1 [Main Thread] WARN fromJava.Types - The class java.util.ArrayList is defined in a java or javax package and cannot be converted into an xml schema type. An xml schema anyType will be used to define this class in the wsdl file.
[copy] Copying 1 file to /app/starteam/npkshema/NextGen/main/xmlgateway/gen-src/accountservicehistorygateway/wsdl
[echo] copied /app/starteam/npkshema/NextGen/dist/ear/xmlgateway/accountservicehistorygateway.wsdl to /app/starteam/npkshema/NextGen/main/xmlgateway/gen-src/accountservicehistorygateway/wsdl/accountservicehistorygateway.wsdl
[copy] Copying 1 file to /app/starteam/npkshema/NextGen/dist/ear/xmlgateway/WEB-INF/wsdl
[echo] copied /app/starteam/npkshema/NextGen/dist/ear/xmlgateway/accountservicehistorygateway.wsdl to /app/starteam/npkshema/NextGen/dist/ear/xmlgateway/WEB-INF/accountservicehistorygateway.wsdl
[echo] running wsdl2java for accountservicehistorygateway
[echo] wsdl2java for /app/starteam/npkshema/NextGen/main/xmlgateway/gen-src/accountservicehistorygateway/wsdl/accountservicehistorygateway.wsdl
[wsdl2java] WSDL2Java /app/starteam/npkshema/NextGen/main/xmlgateway/gen-src/accountservicehistorygateway/wsdl/accountservicehistorygateway.wsdl
[wsdl2java] Parsing XML file: /app/starteam/npkshema/NextGen/main/xmlgateway/gen-src/accountservicehistorygateway/wsdl/accountservicehistorygateway.wsdl
[wsdl2java] Running Wsdl2javaAntTask with parameters:
[wsdl2java] verbose:true
[wsdl2java] debug:true
[wsdl2java] server-side:true
[wsdl2java] skeletonDeploy:false
[wsdl2java] helperGen:true
[wsdl2java] factory:null
[wsdl2java] testCase:true
[wsdl2java] noImports:false
[wsdl2java] NStoPkg:{}
[wsdl2java] output:/app/starteam/npkshema/NextGen/main/xmlgateway/gen-src/accountservicehistorygateway/src
[wsdl2java] deployScope:Request
[wsdl2java] URL:/app/starteam/npkshema/NextGen/main/xmlgateway/gen-src/accountservicehistorygateway/wsdl/accountservicehistorygateway.wsdl
[wsdl2java] all:true
[wsdl2java] typeMappingVersion:1.1
[wsdl2java] timeout:45000
[wsdl2java] failOnNetworkErrors:false
[wsdl2java] printStackTraceOnFailure:true
[wsdl2java] namespaceMappingFile:null
[wsdl2java] username:null
[wsdl2java] asswordnull
[wsdl2java] http.proxyHost=null
[wsdl2java] http.proxyPort=null
[wsdl2java] http.proxyUser=null
[wsdl2java] http.proxyPassword=null
[wsdl2java] socks.proxyHost=null
[wsdl2java] socks.proxyPort=null
[wsdl2java] java.io.IOException: Type Array is referenced but not defined.
[wsdl2java] at org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.java:522)
[wsdl2java] at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:422)
[wsdl2java] at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:408)
[wsdl2java] at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:393)
[wsdl2java] at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:245)
[wsdl2java] at java.lang.Thread.run()V(Unknown Source)


please help me its very urgent
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
i have to use an ArrayList type in my model class

No you don't have to - just add a method that returns the contents of the ArrayList as an array. The very convenient toArray() method will make this easy.
As the error message is trying to tell you the Java ArrayList class is not a standard SOAP type.

Bill
Amit M Tank
Ranch Hand

Joined: Mar 28, 2004
Posts: 257
Or convert the ArrayList into a byte[] object and return and then reconvert it into an ArrayList in the client side. This is a bad way to do it, but it works.

Regards
Amit


Amit Tank
Linked In
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: is there any alternative for ArrayList object in web services
 
Similar Threads
[java] Java Result: 1 error
Axis 1.x web service: how to make a strongly-typed interface
No 'message' attribute in <input> for operation ...
Problems with WSDL2Java
WSDL2Java Error