• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

is there any alternative for ArrayList object in web services  RSS feed

Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Author and all-around good cowpoke
Posts: 13078
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.

Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!