users@jax-rpc.java.net

Re: parameter names in generated WSDL can be renamed? --> AXIS?

From: Pedro Salazar <pedro-b-salazar_at_ptinovacao.pt>
Date: Mon, 13 Jan 2003 19:42:05 +0000

Doug,

I tried the approach of using the java.util.Date in my service
interface/implementation, but it surprises me that when I run my
*client* it throws a java.lang.AbstractMethodError:

(java.lang.AbstractMethodError
PT.ptinovacao.ngincare.service.NGINCareIF_Stub.listDisabledMSISDN(Ljava/lang/String;Ljava/lang/String;Ljava/util/Date;)LPT/ptinovacao/ngincare/service/StatusMSISDN;)

What I did:
----------
I modified and compiled the java tie class where the error was happening
to handle a java.util.Date and not the java.util.Calendar as you may see
in the following code:

 PT.ptinovacao.ngincare.service.StatusMSISDN result =
            ((PT.ptinovacao.ngincare.service.NGINCareIF)
getTarget()).listDisabledMSISDN(myNGINCareIF_listDisabledMSISDN_RequestStruct.getUser(), myNGINCareIF_listDisabledMSISDN_RequestStruct.getPassword(), myNGINCareIF_listDisabledMSISDN_RequestStruct.getDate().getTime());

I repackage the classes, completing before the incomplete web.xml,
since that it stopped the generation process (could th process be more
than that after the compile error?!).

I'm confused now but I will try again the first approach again, and I'll
give a feedback with a confirmation about my results.

I will be brief in my revaluation.

thanks,
Pedro Salazar.

On Mon, 2003-01-13 at 19:05, Pedro Salazar wrote:
> Doug,
>
> this exception was thrown in the server side - is logged in tomcat's
> log.
>
> In attach goes my WSDL file that was previously created (generated) by
> xwrpcc from my service interface but also and *only* modified to fix the
> parameter names (eg. String_1, String_2, ...). In my service interface
> the parameter was a java.util.Date object (not a java.util.Calendar).
>
> If you need more info about my service, please don't hesitate to ask me
> (the detailed exception, code, ...).
>
> thanks,
> Pedro Salazar.
>
> On Mon, 2003-01-13 at 18:44, Doug Kohlert wrote:
> > Pedro, is this error on the client or the server? Can you send
> > me your WSDL file?
> >
> > Thanks
> >
> > Pedro Salazar wrote:
> > > Doug,
> > >
> > > yes, I *think* that I'm clear about the use of -import (wscompile) in
> > > conjunction with the model parameter in jaxrpc-ri.xml (wsdeploy), which
> > > doesn't not affect the generation of stubs for the client (no problem
> > > using -gen:client against the use of -gen:server). For that acknowledge
> > > I must express my gratitude to you.
> > >
> > > Unfortunately, it raised another problem about the dynamic generation of
> > > classes from a WSDL file.
> > > Im my first and old approach (interface->WSDL) I have my interface with
> > > a method which has a java.util.Date attribute in the signature method
> > > that was mapped to a "datetime" type in WSDL. Now, I have a WSDL file
> > > that in wsdeploy process creates a java.util.Calendar java object, which
> > > will result at run-time say that cannot instantiate a Abstract Class
> > > (java.util.Calendar) when I run a client invocation! Probably due the
> > > default constructor politics assumed in RMI for JAXRPC in the Calendar
> > > java object:
> > >
> > > "
> > > To be supported by JAX-RPC, an application class must conform to the
> > > following rules:
> > >
> > > * It must have a public default constructor.
> > > * It must not implement (either directly or indirectly) the
> > > java.rmi.Remote interface.
> > > * Its fields must be supported JAX-RPC types.
> > >
> > > The class may contain public, private, or protected fields. For its
> > > value to be passed (or returned) during a remote call, a field must meet
> > > these requirements:
> > >
> > > * A public field cannot be final or transient.
> > > * A non-public field must have corresponding getter and setter
> > > methods.
> > > "
> > >
> > > If I force to my parameter be a java.util.Date in my service interface I
> > > will get an error in wsdeploy saying that it cannot cast java.util.Date
> > > to java.util.Calendar! I'm thinking in editing the generated sources to
> > > get a date instead the calendar itself but I don't know if it will work
> > > (well I will try if I can do it).
> > >
> > > Could you assist me on that? I will post a message on that in jaxrpc
> > > list too.
> > >
> > > thanks,
> > > Pedro Salazar.
> > >