Hi
i have seen this usually hanppend when there is some namespace clash or some extra element. When u said it the XML seemed right using tcpmon did u mean all namespaces also ??? Vidyanand -----Original Message----- From: Lasker, Kory [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 18, 2002 11:35 AM To: '[EMAIL PROTECTED]' Subject: RE: beanSerialization Thanks for your reply, Tom. I understand your suggestion to use the Axis-generated stubs, because that's exactly what I did. First, I generated client stubs for my service and wrote a test client to actually harness them. In fact, I can see in the generated Stub that registerTypeMapping is being called and cached for every "object" I use (i.e. Address includes Obf, and Postal). That said, it's not very clear to me what I should be registering in the server-side WSDD. Am I supposed to map the generated client classes or do I need to use the ones I'm using on the server side? In any case, when I set them to the "server-side" classes when deploying my web service, I even get a perfect response from the server and I can see the SOAP messages fine through tcpmon. However, the client can't hack this response and bails with this error(Obf is a child element of Address which is returned from my service): testclient: [java] Connecting to http://someurl.com [java] - Exception: [java] org.xml.sax.SAXException: Invalid element in com.lavaclient.Obf - valid [java] at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(Unknown Source) [java] org.xml.sax.SAXException: Invalid element in com.lavaclient.Obf - valid [java] org.xml.sax.SAXException: Invalid element in com.lavaclient.Obf - valid [java] at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(Unknown Source) [java] at org.apache.axis.encoding.DeserializationContextImpl.startElement(Unknown Source) [java] at org.apache.axis.encoding.DeserializationContextImpl.startElement(Unknown Source) [java] at org.apache.axis.message.SAX2EventRecorder.replay(Unknown Source) [java] at org.apache.axis.message.SAX2EventRecorder.replay(Unknown Source) If I change my deploy.wsdd to use the client-specific object classes, I get the following server-side error that's coming back as a SOAPFault: testclient: [java] Connecting to http://someurl.com [java] org.apache.axis.deployment.wsdd.WSDDException: java.lang.ClassNotFoundException: com.lavaclient.Address [java] at org.apache.axis.message.SOAPFaultBuilder.endElement(Unknown Source) [java] at org.apache.axis.encoding.DeserializationContextImpl.endElement(Unknown Source) [java] at org.apache.xerces.parsers.SAXParser.endElement(SAXParser.java:1398) [java] at org.apache.xerces.validators.common.XMLValidator.callEndElement(XMLValid ator .java:1019) I think that makes since. Why should the server need to know what the java client classes are if we're trying to avoid dependencies in remote rpc? Sorry this is so long, I just really want to understand what's causing these problems. Kory Lasker -----Original Message----- From: Tom Jordahl [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 17, 2002 4:38 PM To: '[EMAIL PROTECTED]' Subject: RE: beanSerialization You will need a type mapping on both the client and server side for the type. On the server side, type mappings go in the WSDD file (server-config.wsdd) and are usually part of the service element. They generally get there when the service is deployed. On the client side, type mappings can be in client-config.wsdd, but more likely they are established via calling APIs. For examples, run WSDL2Java -s on the WSDL for your service and check out the code in the *Stub.java and the deploy.wsdd. The Stub code is a bit obscure, but the relevant API is call.registerTypeMapping(). Hope this helps. -- Tom Jordahl Macromedia -----Original Message----- From: Lasker, Kory [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 16, 2002 4:25 PM To: '[EMAIL PROTECTED]' Subject: beanSerialization I'm having problems trying to unserialize a complexType from my service on the client side, causing me many problems between the role of the client and the deployment descriptor. In the <typeMapping> section of the DD using the default beanSerializer, am I supposed to refer to a class known only by the server-side, client-side, or both? The latter doesn't make any sense to me at all. But, if I use the client-side classes generated from WSDL2Java, I get a "class not found" type exception like this: org.apache.axis.deployment.wsdd.WSDDException: java.lang.ClassNotFoundException: com.lavaclient.Address My WSDD was generated by WSDL2Java as well. <typeMapping xmlns:ns="http://mynamespace.com" qname="ns:Address" type="java:com.lavaclient.Address" serializer="org.apache.axis.encoding.ser.BeanSerializerFactory" deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> Any ideas out there? Thanks, Kory Lasker
