Forums Register Login

is there any alternative for ArrayList object in web services

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
 

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
+Pie Number of slices to send: Send
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
Slime does not pay. Always keep your tiny ad dry.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 4074 times.
Similar Threads
No 'message' attribute in <input> for operation ...
Axis 1.x web service: how to make a strongly-typed interface
WSDL2Java Error
Problems with WSDL2Java
[java] Java Result: 1 error
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 23:09:25.