Hi Tom,

I am not an expert myself but will try to help until one of the 
other folks replies.

Your error could be unrelated to AXIS itself. It could be that you
just have a bug in your Java code.  

Are you trying to cast a Calendar to a GregorianCalendar anywhere?

Or, are you trying to return a GregorianCalendar object as the
return type of a web service end point?  If so, you might need
a bean mapping construct in your WSDD deployment file for your
service.

Something like this:

  <beanMapping 
      qname="ns:GregorianCalendar" 
      xmlns:ns="http://model.webservice.crlcorp.com";
      languageSpecificType="java:com.crlcorp.webservice.model"/>


If you're writing a JAX-RPC DII client, you will need a 
serializer and de-serializer to help AXIS marshall and unmarshall
the GregorianCalendar object.  Add something like this to your
call.

        Service service = serviceFactory.createService(...);
        Call call = (Call) service.createCall(...);

        BeanSerializerFactory bsf = 
             new BeanSerializerFactory(cl, classQName);
        BeanDeserializerFactory bdf = 
             new BeanDeserializerFactory(cl, classQName);
        call.registerTypeMapping(cl, classQName, bsf, bdf);


Again, I'm relatively new to AXIS myself, so my apologies if I'm
sending you on the wrong track.

Vartan




--- Tom Bollwitt <[EMAIL PROTECTED]> wrote:

> Hello,
>  
> Im a newbie to AXIS and am having troubles with Calendars.
> I assume its something simple, but cant seem to figure it out.
> Any help is MUCH appreciated.
>  
>  
>  
> Here is the error
>  
> AxisFault
> faultCode:
> {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
> faultSubcode: 
> faultString: java.lang.ClassCastException: java.util.GregorianCalendar
> faultActor: 
> faultNode: 
>  
> faultDetail: 
> {http://xml.apache.org/axis/}hostname:C1002441
> java.lang.ClassCastException: java.util.GregorianCalendar
> at
>
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.ja
> va:222)
> at
>
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.jav
> a:129)
> at
>
org.apache.axis.encoding.DeserializationContext.endElement(Deserializati
> onContext.java:1087)
> at
>
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(
> AbstractSAXParser.java:633)
> at
>
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEnd
> Element(XMLNSDocumentScannerImpl.java:719)
> at
>
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$F
>
ragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:16
> 85)
> at
>
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.s
> canDocument(XMLDocumentFragmentScannerImpl.java:368)
> at
>
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML1
> 1Configuration.java:834)
> at
>
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML1
> 1Configuration.java:764)
> at
>
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.jav
> a:148)
> at
>
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Abstr
> actSAXParser.java:1242)
> at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
> at
>
org.apache.axis.encoding.DeserializationContext.parse(DeserializationCon
> text.java:227)
> at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
> at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
> at
>
org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstan
> dChecker.java:62)
> at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
> at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
> at org.apache.axis.client.Call.invoke(Call.java:2767)
> at org.apache.axis.client.Call.invoke(Call.java:2443)
> at org.apache.axis.client.Call.invoke(Call.java:2366)
> at org.apache.axis.client.Call.invoke(Call.java:1812)
> at
>
com.crlcorp.webservice.AuthorizeLabSoapBindingStub.processAuthorization(
> AuthorizeLabSoapBindingStub.java:205)
> at test.TestClient.main(TestClient.java:36)
>  
>  
>  
>  
> Here is the generated WSDL:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions targetNamespace="urn:AuthorizeLabTest"
> xmlns:apachesoap="http://xml.apache.org/xml-soap";
> xmlns:impl="urn:AuthorizeLabTest" xmlns:intf="urn:AuthorizeLabTest"
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";
> xmlns:tns1="http://model.webservice.crlcorp.com";
> xmlns:tns2="http://datautil.crlcorp.com";
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
> <!--WSDL created by Apache Axis version: 1.3
> Built on Oct 05, 2005 (05:23:37 EDT)-->
>  <wsdl:types>
>   <schema targetNamespace="http://model.webservice.crlcorp.com";
> xmlns="http://www.w3.org/2001/XMLSchema";>
>    <import namespace="urn:AuthorizeLabTest"/>
>    <import namespace="http://datautil.crlcorp.com"/>
>    <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
>    <complexType name="AuthorizationRequest">
>     <sequence>
>      <element name="bloodState" nillable="true" type="soapenc:string"/>
>      <element name="cocID" nillable="true" type="soapenc:string"/>
>      <element name="urinState" nillable="true" type="soapenc:string"/>
>      <element name="userId" nillable="true" type="soapenc:string"/>
>      <element name="userPwd" nillable="true" type="soapenc:string"/>
>     </sequence>
>    </complexType>
>    <complexType name="AuthorizationResult">
>     <sequence>
>      <element name="bloodMessage" nillable="true"
> type="soapenc:string"/>
>      <element name="cocId" nillable="true" type="soapenc:string"/>
>      <element name="message" nillable="true" type="soapenc:string"/>
>      <element name="urinMessage" nillable="true"
> type="soapenc:string"/>
>     </sequence>
>    </complexType>
>    <complexType name="LabTestAuthorization">
>     <sequence>
>      <element name="id" nillable="true" type="soapenc:long"/>
>      <element name="cocID" nillable="true" type="soapenc:string"/>
>      <element name="bloodTestState" nillable="true"
> type="soapenc:string"/>
>      <element name="urinTestState" nillable="true"
> type="soapenc:string"/>
>      <element name="lastDateModified" nillable="true"
> type="xsd:dateTime"/>
>     </sequence>
>    </complexType>
>   </schema>
>   <schema targetNamespace="http://datautil.crlcorp.com";
> xmlns="http://www.w3.org/2001/XMLSchema";>
>    <import namespace="urn:AuthorizeLabTest"/>
>    <import namespace="http://model.webservice.crlcorp.com"/>
>    <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
>    <complexType name="DatabaseException">
>     <sequence/>
>    </complexType>
>   </schema>
>   <schema targetNamespace="urn:AuthorizeLabTest"
> xmlns="http://www.w3.org/2001/XMLSchema";>
>    <import namespace="http://datautil.crlcorp.com"/>
>    <import namespace="http://model.webservice.crlcorp.com"/>
>    <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
>    <complexType name="ArrayOf_tns2_LabTestAuthorization">
>     <complexContent>
>      <restriction base="soapenc:Array">
>       <attribute ref="soapenc:arrayType"
> wsdl:arrayType="tns1:LabTestAuthorization[]"/>
>      </restriction>
>     </complexContent>
>    </complexType>
>   </schema>
>  </wsdl:types>
> 
>    <wsdl:message name="getAuthorizationsResponse">
> 
>       <wsdl:part name="getAuthorizationsReturn"
> type="impl:ArrayOf_tns2_LabTestAuthorization"/>
> 
>    </wsdl:message>
> 
>    <wsdl:message name="getAuthorizationByCocIdResponse">
> 
>       <wsdl:part name="getAuthorizationByCocIdReturn"
> type="tns1:LabTestAuthorization"/>
> 
>    </wsdl:message>
> 
>    <wsdl:message name="getAuthorizationByCocIdRequest">
> 
>       <wsdl:part name="in0" type="soapenc:string"/>
> 
>    </wsdl:message>
> 
>    <wsdl:message name="getAuthorizationsRequest">
> 
>    </wsdl:message>
> 
>    <wsdl:message name="DatabaseException">
> 
>       <wsdl:part name="fault" type="tns2:DatabaseException"/>
> 
>    </wsdl:message>
> 
>    <wsdl:message name="processAuthorizationRequest">
> 
>       <wsdl:part name="in0" type="tns1:AuthorizationRequest"/>
> 
>    </wsdl:message>
> 
>    <wsdl:message name="processAuthorizationResponse">
> 
>       <wsdl:part name="processAuthorizationReturn"
> type="tns1:AuthorizationResult"/>
> 
>    </wsdl:message>
> 
>    <wsdl:portType name="AuthorizeLabTest">
> 
>       <wsdl:operation name="processAuthorization" parameterOrder="in0">
> 
=== message truncated ===


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to