Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 55976 invoked from network); 27 May 2004 19:11:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 27 May 2004 19:11:28 -0000 Received: (qmail 9283 invoked by uid 500); 27 May 2004 19:11:09 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 9140 invoked by uid 500); 27 May 2004 19:11:08 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 8991 invoked by uid 98); 27 May 2004 19:11:06 -0000 Received: from aravind.nallan@openwave.com by hermes.apache.org by uid 82 with qmail-scanner-1.20 (clamuko: 0.70. Clear:RC:0(206.46.164.53):. Processed in 0.172443 secs); 27 May 2004 19:11:06 -0000 X-Qmail-Scanner-Mail-From: aravind.nallan@openwave.com via hermes.apache.org X-Qmail-Scanner: 1.20 (Clear:RC:0(206.46.164.53):. Processed in 0.172443 secs) Received: from unknown (HELO oe-im2.bizmailsrvcs.net) (206.46.164.53) by hermes.apache.org with SMTP; 27 May 2004 19:11:04 -0000 Received: from mm-ismta4.bizmailsrvcs.net ([192.168.133.29]) by oe-im2.bizmailsrvcs.net (InterMail vM.5.01.06.05 201-253-122-130-105-20030824) with ESMTP id <20040527191030.LGDJ24679.oe-im2.bizmailsrvcs.net@mm-ismta4.bizmailsrvcs.net> for ; Thu, 27 May 2004 14:10:30 -0500 Received: from OPENWAVEANALLAN ([12.25.200.5]) by mm-ismta4.bizmailsrvcs.net (InterMail vM.5.01.06.05 201-253-122-130-105-20030824) with ESMTP id <20040527191030.LZYH21479.mm-ismta4.bizmailsrvcs.net@OPENWAVEANALLAN> for ; Thu, 27 May 2004 14:10:30 -0500 From: "Aravind Nallan" To: Subject: RE: returning Map objects from webservices Date: Thu, 27 May 2004 12:10:29 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-Spam-Rating: hermes.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Got it. Yes the RI maps it to java.util.Map. Do i have to register this type with axis in my client before i use it? I get the following exception trying to deserialize a response. org.xml.sax.SAXException: No deserializer defined for array type {http://java.sun.com/jax-rpc-ri/internal}mapEntry at org.apache.axis.AxisFault.makeFault(AxisFault.java:129) at org.apache.axis.client.Call.invoke(Call.java:2275) at org.apache.axis.client.Call.invoke(Call.java:2171) at org.apache.axis.client.Call.invoke(Call.java:1691) at opwv.UserPreferencesBindingStub.getPreferences(UserPreferencesBindingStub.ja va:245) at GalleryClient.main(GalleryClient.java:46) Caused by: org.xml.sax.SAXException: No deserializer defined for array type {http://java.sun.com/jax-rpc-ri/internal}mapEntry at org.apache.axis.encoding.ser.ArrayDeserializer.onStartElement(ArrayDeseriali zer.java:304) at org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerImpl.java :428) at org.apache.axis.encoding.DeserializationContextImpl.startElement(Deserializa tionContextImpl.java:976) at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:198) at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java: 722) at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:233) at org.apache.axis.message.RPCElement.getParams(RPCElement.java:347) at org.apache.axis.client.Call.invoke(Call.java:2272) even though the MapEntry class generated by wsdl2java is in classpath and has getSerializer and getDeserializer methods which return BeanSerializer objects. Thanks Aravind -----Original Message----- From: Tom Jordahl [mailto:tomj@macromedia.com] Sent: Thursday, May 27, 2004 11:43 AM To: 'axis-dev@ws.apache.org' Subject: RE: returning Map objects from webservices Yes, because there is no 'standard' Qualified name for the Java Map type. So WSDL2Java is just creating a type based on the XML Schema in the WSDL. Since the namespace is http://java.sun.com/jax-rpc-ri/internal, this gets turned in to the package name "com.sun.java.jax_rpc_ri.internal". I'll bet that the RI recognizes this QName and turns it in to a java.utils.Map type (HashMap?) I think we do similar things with Map Schema we emit in the axis.apache.org namespace..... -- Tom Jordahl Macromedia Server Development -----Original Message----- From: Aravind Nallan [mailto:aravind.nallan@openwave.com] Sent: Thursday, May 27, 2004 12:26 PM To: axis-dev@ws.apache.org Subject: returning Map objects from webservices I'm trying to generate java code from the attached wsdl. WSDL2Java creates the following code package opwv; public interface UserPreferences extends java.rmi.Remote { public com.sun.java.jax_rpc_ri.internal.MapEntry[] getPreferences(opwv.Crede ntials credentials_1, java.lang.String string_2, java.lang.String[] arrayOfStrin g_3) throws java.rmi.RemoteException, opwv.MMSException, opwv.InvalidArgumentExc eption, opwv.InvalidCredentialsException, opwv.UserAccountException; public void updatePreferences(opwv.Credentials credentials_1, java.lang.Stri ng string_2, com.sun.java.jax_rpc_ri.internal.MapEntry[] map_3) throws java.rmi. RemoteException, opwv.MMSException, opwv.InvalidArgumentException, opwv.InvalidC redentialsException, opwv.UserAccountException; } It creates type com.sun.java.jax_rpc_ri.internal.MapEntry[] for Maps. Is my implementation supposed to use this internal jaxrpc type instead of regular java.util.Map? Thanks Aravind