Hi Scott,
 
I have 2 applications using a number of Value Objects.  One of these is a Web Service.  In the Web Service implementation the Timestamp is in one of the Value Objects however its value is nver set, and always null.  On my development server this seems to work fine and seems to deal with it (maybe false comfort). 
 
This is the same scenario on the deployment Server, however here it seems to fail.  It's as if its denomination xsi:null="true", is sufficent to allow it through the soap system, i.e. since it is always null, soap has never attempted to try and deserialize it.
 
Hope this makes sense.
 
Jonathan

Scott Nichol <[EMAIL PROTECTED]> wrote:
I don't see how it could ever work, unless some version of
java.sql.Timestamp has a default ctor. The following code in
BeanSerializer creates the bean:

private Object instantiateBean(Class javaType)
throws IllegalArgumentException
{
try
{
return javaType.newInstance();
}
catch (Throwable t)
{
throw new IllegalArgumentException("Unable to instantiate '" +

StringUtils.getClassName(javaType) +
"': " + t.getMessage());
}
}

The newInstance is only going to work if the class has a default ctor
(or in Sun's terminology, a "nullary constructor").

On 2 Jun 2003 at 15:14, Jonathan Roberts wrote:

> HI Scott,
>
> I thought I'd got around this by declaring the java.sql.Timestamp as a class in the xml file and loaded it with all the other classes. This seems to be fine on my machine but not on a deployment server. Could it be a class problem?
>
> Cheers
>
> Jonathan
>
> Scott Nichol <[EMAIL PROTECTED]>wrote:
> java.sql.Timestamp does not have a default constructor, which Apache
> SOAP requires for instantiation. An alternative for you would be to
> return a java.util.Date, which Apache SOAP knows how to serialize and
> de-serialize.
>
> On 2 Jun 2003 at 10:54, Jonathan Roberts wrote:
>
> > Hi.
> >
> > I'm getting the following errors on the response from the soap server :
> >
> > on the
> > r = c.invoke ( new URL( mstrHostString + "/soap/servlet/rpcrouter"), "" );
> > call
> > where Response r;
> > and Call c;
> > ---------------------------------------------------------------------------
> >
> > Error report :
> > 1. If information exists and is returned :
> >
> > Unable to instantiate 'java.sql.Timestamp': java.sql.Timestamp
> >
> > You chose fetchAccountUsingAccountNo 10015301
> >
> > Exception = [SOAPException: faultCode=SOAP-ENV:Client; msg=Unable to instantiate 'java.sql.Timestamp': java.sql.Timestamp; targetException=java.lang.IllegalAr
> >
> > gumentException: Unable to instantiate 'java.sql.Timestamp': java.sql.Timestamp].
> >
> > ----------------------------------------------------------------------------------------------------
> > 2. If no information:
> >
> > Exception = [SOAPException: faultCode=SOAP-ENV:Client; msg=
> >
> > Can't yet deserialize non-null Objects;
> >
> > targetException=java.lang.IllegalArgumentException: Can't yet deserialize non-null Objects]
> >
> > ------------------------------------------
> >
> > Isssues :
> >
> > 1. I'm aware of problems with the timestamp and have set it up in the client side thus have named it explicitly :
> >
> > QName qn9 = new QName("urn:xml-IVR-App", "java.sql.Timestamp");
> > //map the type
> > smr.mapTypes(Constants.NS_URI_SOAP_ENC, qn9, java.sql.Timestamp.class, bsr, bsr);
> > //telling the call object to use this mapping
> > c.setSOAPMappingRegistry(smr);
> >
> > 2. and the xml
> >
> > >
> > xmlns:x="urn:xml-IVR-App"
> >
> > qname="x:java.sql.Timestamp"
> >
> > javaType="java.sql.Timestamp"
> >
> > java2XMLClassName="org.apache.soap.encoding.soapenc.BeanSerializer"
> >
> > xml2JavaClassName="org.apache.soap.encoding.soapenc.BeanSerializer"
> >
> > />
> >
> > 3. Wierder - this works on the development machine but not on the stand-alone Test Server.
> >
> > Any help would be appreciated.
> >
> > Jonathan
> >
> >
> >
> >
> >
> >
> > ---------------------------------
> > Yahoo! Plus - For a better Internet experience
> >
>
>
> Scott Nichol
>
> Do not reply directly to this e-mail address,
> as it is filtered to only receive e-mail from
> specific mailing lists.
>
>
>
>
>
> ---------------------------------
> Yahoo! Plus - For a better Internet experience
>


Scott Nichol

Do not reply directly to this e-mail address,
as it is filtered to only receive e-mail from
specific mailing lists.



Yahoo! Plus - For a better Internet experience

Reply via email to