axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anne Thomas Manes" <atma...@gmail.com>
Subject Re: Complex type problem
Date Sat, 27 May 2006 13:56:44 GMT
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 <sgandhi@vistaar.com> 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:robertlazarski@gmail.com]
> *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.2internally). 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 <vas_opel@yahoo.gr > 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 <robertlazarski@gmail.com>* έγραψε:
> >
> > 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 <vas_opel@yahoo.gr > 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 < atmanes@gmail.com>* έγραψε:
> > >
> > > 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 < vas_opel@yahoo.gr> 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
> >
> >
>
Mime
View raw message