I'm having the same problem also when I deserialize. The string field all contains the same value from the first attribute.
Vasilis wrote: > > Anna, > > Thank you a lot for your help. > I tried it and i get another error :-). The client can't deserialize > correctly the response. I send a request with a RequestData object with > this data (x = "Hello", y="User" , num = 10). In the client the object has > these values: > x="Hello" > y="Hello' > num=10 > > I tried with 3 and four strings and i get the same results (All string > variables get the value of the first String). In the monitor i can see > that the request has the right values for each string var. > > Do you know why this is happening? > > Thank you, > Roy > > > > > Anne Thomas Manes <[EMAIL PROTECTED]> wrote: Roy, > > The problem is that the "ns" namespace declaration is not in scope for the > <parameter> element. > > Change the <parameter> definition to this and see if it works: > > > <parameter qname="pns:reqData" xmlns:pns=" http://test.com/ejb/" type=" > pns:RequestData" xmlns:tns="http://www.w3.org/2001/XMLSchema " /> > > Anne > > On 5/29/06, Roy <[EMAIL PROTECTED]> wrote: Dear Anne, > > I think that i have declared it here: > > <beanMapping xmlns:ns=" http://ejb.test.com/rd" > qname="ns:RequestData" > languageSpecificType="java:com.test.ejb.rd.RequestData"/> > > > I tried to set my complex type only with a String ant an int var. It > worked. I tried it with 2 Strings and both Strings take the same value > (the value of the first string) when i call the service. In the Soap > monitor i can see that both string are sent with different values. Have > you ever any similar problems? > > > > > Anne Thomas Manes <[EMAIL PROTECTED] > έγραψε: Roy, > > You have an error in your WSDD: > > <parameter qname="pns:reqData" xmlns:pns=" http://test.com/ejb/" > type="ns:RequestData" xmlns:tns=" http://www.w3.org/2001/XMLSchema " /> > > > You have not declared the "ns" namespace. > > Anne > > On 5/26/06, Suyog Gandhi < [EMAIL PROTECTED]> wrote: Check out > the issue AXIS2-770 , may be it is realted to this. > I faced problems about serialization of complex types. 2nd level of > nesting is not working. Once I re-structure wsdl for only 1 level of > nesting, it started working. > e.g > > following complex type does NOT work: ( Gives null for Name and Value > for the attributes. ) > WMemberInfo > -------|- ID > -------|- Attrbutes [] > -------------|- Name > -------------|- Value > > Following complex type works. > WMemberInfo > --------|- ID > --------|- Attr1Name > --------|- Attr1 Value > --------|- Attr2 Name > --------|- Attr2 Value > > But this is a crude workaround till the time problem is fixed. > > Hope this helps. > Suyog > > > > -----Original Message----- > From: robert lazarski [mailto: [EMAIL PROTECTED] > Sent: Friday, May 26, 2006 9:36 AM > To: axis-user@ws.apache.org > Subject: Re: Complex type problem > > > > The other thing is make sure your vendor supports wsdl2java - jboss > does not, for example (although they run a modified version of axis 1.2 > internally). The problem I had was similair, although IIRC correctly I was > getting ser / deser errors, not null. It was working on simple types but > failing on complex ones. > > HTH, > Robert > http://www.braziloutsource.com/ > > On 5/26/06, Roy <[EMAIL PROTECTED] > wrote: I think that > this is not exactly my problem. I can call normally the service from > my client when i use simple types. When i try to pass complex types i > face the problem. > > robert lazarski <[EMAIL PROTECTED]> έγραψε: > You're trying to use a non-ejb client to connect to a > Web Service that implements implements SessionBean, is that > correct? The only way I got that to work - using jboss - was > something like... > > // remote ejb / web service > private CallCentreWebEndpoint endpoint; > > String wsdl_loc = " > http://localhost:8080/CallCentreWebServiceJAR?wsdl"; > // generated by JSWDP wscompile, which jboss insists > on using > URL mappinglocation = > ClassLoader.getSystemResource("CallCentreWeb_Mapping.xml"); > assertNotNull(mappinglocation); > // bean mapping > URL ws4eeMetaData = > ClassLoader.getSystemResource("ws4ee-deploy.xml"); > assertNotNull(ws4eeMetaData); > > QName qname = new QName(" > http://localhost/callcentreweb", > "CallCentreWebService"); > URL url = new URL(wsdl_loc); > > org.jboss.webservice.client.ServiceFactoryImpl factory= > > (org.jboss.webservice.client.ServiceFactoryImpl) > ServiceFactoryImpl.newInstance(); > javax.xml.rpc.Service service = > factory.createService(url, mappinglocation, ws4eeMetaData, qname, > > null); > endpoint = (CallCentreWebEndpoint) > service.getPort(CallCentreWebEndpoint.class); > > The main idea here is ServiceFactoryImpl, which varies by vendor. > This may not be your problem, but thought I'd post it in case it > helps. > > HTH, > Robert > http://www.braziloutsource.com/ > > On 5/26/06, Roy <[EMAIL PROTECTED] > wrote: > > I tried the beanmapping too but it didn't work. This is the the > complex type i want to send and the deploy.wsdd file: > > Deploy.wsdd: > > <deployment xmlns="http://xml.apache.org/axis/wsdd/ " xmlns:java=" > http://xml.apache.org/axis/wsdd/providers/java"> > <service name="EJBTestService" provider="java:EJB"> > <parameter name="wsdlTargetNamespace" value=" > http://ejb.test.com"/> > <parameter name="beanJndiName" > value="ejb/TestService"/> > <parameter name="homeInterfaceName" value=" > com.test.ejb.TestServiceHome"/> > <parameter name="remoteInterfaceName" value=" > com.test.ejb.TestService"/> > <parameter name="allowedMethods" value="*"/> > <operation name="sendData" qname="operNS:SendData" > xmlns:operNS=" http://test.com/ejb/" returnQName="retNS:Result" > xmlns:retNS=" http://test.com/ejb/ " returnType="rtns:int" > xmlns:rtns=" http://www.w3.org/2001/XMLSchema "> > <parameter qname="pns:reqData" xmlns:pns=" > http://test.com/ejb/ " type="ns:RequestData" > xmlns:tns="http://www.w3.org/2001/XMLSchema " /> > </operation> > <parameter name="allowedMethods" value="*"/> > <beanMapping xmlns:ns=" http://ejb.test.com/rd" > qname="ns:RequestData" > languageSpecificType="java:com.test.ejb.rd.RequestData"/> > </service> > </deployment> > > --- > > public class RequestData implements java.io.Serializable{ > > private String x; > private String y; > private int num; > > public void setX(String x) > this.x = x; > public void setY(String y) > this.y = y; > public void setNum(String n) > this.num = n; > > public String getX(){ > return x; > } > > public String getY(){ > return y; > > } > > public int getNum{ > return num; > } > > } > > If you see something wrong please tell me... > > > > > > > Anne Thomas Manes < [EMAIL PROTECTED]> έγραψε: > I think you need to use a beanmapping element > rather than a typemapping element. > If that doesn't work, please post more information. > > Anne > > On 5/25/06, Roy < [EMAIL PROTECTED]> wrote: > > Hello all, > > I have deployed an ejb service with a method that takes as > input a complex object (it contains 2 Strings and one int > var). When i generate the code in the client with WSDL2Java and > call the method i can see that this complex type object becomes > null. I can see in the monitor that the request object isn't null > but in the debug mode i can see that the service receives a null > object. This problem doesn't occur when I use simple types to > transfer. > I tried the same code on a non-ejb service and works > normally. > In the deploy wsdd i use a typemapping element to describe > the object and i use the BeanSerializerFactory and > BeanDeSerializer factory as serializer-deserializer. > > Can someone explain why is this happening? > > Regards, > > Roy > > > > > --------------------------------- > Χρησιμοποιείτε Yahoo! > Βαρεθήκατε τα ενοχλητικά μηνύ ματα (spam); Το Yahoo! Mail > διαθέτει την καλύτερη δυνατή προστασία κατά των ενοχλητικών > μηνυμάτων > http://login.yahoo.com/config/mail?.intl=gr > > > > > > > > --------------------------------- > > Χρησιμοποιείτε Yahoo! > Βαρεθήκατε τα ενοχλητικά μηνύ ματα (spam); Το Yahoo! Mail > διαθέτει την καλύτερη δυνατή προστασία κατά των ενοχλητικών > μηνυμάτων > http://login.yahoo.com/config/mail?.intl=gr > > > > > > > > > --------------------------------- > > Χρησιμοποιείτε Yahoo! > Βαρεθήκατε τα ενοχλητικά μηνύ ματα (spam); Το Yahoo! Mail διαθέτει > την καλύτερη δυνατή προστασία κατά των ενοχλητικών μηνυμάτων > http://login.yahoo.com/config/mail?.intl=gr > > > > > > > > > > > > > > --------------------------------- > > Χρησιμοποιείτε Yahoo! > Βαρεθήκατε τα ενοχλητικά μηνύ ματα (spam); Το Yahoo! Mail διαθέτει την > καλύτερη δυνατή προστασία κατά των ενοχλητικών μηνυμάτων > http://login.yahoo.com/config/mail?.intl=gr > > > > > > > > --------------------------------- > Χρησιμοποιείτε Yahoo! > Βαρεθήκατε τα ενοχλητικά μηνύ ματα (spam); Το Yahoo! Mail διαθέτει την > καλύτερη δυνατή προστασία κατά των ενοχλητικών μηνυμάτων > http://login.yahoo.com/config/mail?.intl=gr > -- View this message in context: http://www.nabble.com/Complex-type-problem-tp4555084p14735845.html Sent from the Axis - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]