Why the List is treated as Object array and Date as GregorianCalendar? How can I avoide this? I am using Weblogic Server's clientgen ant task to create the stubs from WSDL. Is it the clientgen's limitations? which other utlity does not have this limitation?
Rashmi Tambe
Ranch Hand
Joined: Aug 07, 2001
Posts: 418
posted
0
can anybody please answer this?
Balaji Loganathan
author and deputy
Bartender
Joined: Jul 13, 2001
Posts: 3150
posted
0
Originally posted by Rashmi Tambe: I a web service deployed which exposes an API that takes the parameter of type "java.Util.Date" and returns a list -
public java.util.List getUsersCreatedOn(Java.util.Date date)
However, when i tried to create the stubs from the WSDL of this web service, the stub has an API like this -
I had the same problem. Java to soap mapping is like that. I ended up having to change the method signature in wrapper. I think I used java.util.calendar and did .gettime() I am not sure.
Rik Sha
Greenhorn
Joined: Jul 13, 2004
Posts: 6
posted
0
Originally posted by Sandeep Bhagavatula: I had the same problem. Java to soap mapping is like that. I ended up having to change the method signature in wrapper. I think I used java.util.calendar and did .gettime() I am not sure.
If you are using AXIS (or otherwise), please refer to http://ws.apache.org/axis/java/user-guide.html and look for "How your Java types map to SOAP/XML types". May be that is the reason the stub that is auto generated has different datatype.
Bret Waldow
Ranch Hand
Joined: Aug 04, 2000
Posts: 58
posted
0
"java.Util.Date" is a java construct. SOAP is "bigger" than just java, and doesn't provide datatypes for all java constructs. There's .NET too, and it doesn't have the same data objects as java in all cases.
SOAP does provide datatypes for very standard datums, like integers, and strings. You can also aggregate these primary datatypes into a complex construct and name it, and use that in SOAP.