You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by karusala kiranbabu <ki...@yahoo.com> on 2005/10/03 11:36:37 UTC

Re: class-cast exception while writing the client for the webservice

Hi krthekeyan,

I have transformed files into datasources which
further into datahandlers and send them to the
webservice .The service directly takes the
datahandlers as parameters.

In this process i am getting the exception mentioned
below.

So give me the process how to follow ?

Thanks in advance.

Thanks,
KiranBabu.K


It could be that you are setting the file in
datasource from client . 
and might be trying to take it directly from
datahandler.

Regards,
krthekeyan.s


karusala kiranbabu wrote:

>Hi,
>I have created one webservice and deployed that
>webservice jar file in AXIS/WEB-INF/lib/ directory.
>
>I have accessed the wdsl of the webservice by giving
>the url for the webservice.here there is no problem.
>
>After th
at, we have written the client and passing the
>datahandlers to the webservice .
> 1.It is not invoking the method of the webservice
and
>it is giving the exception as mentioned below.
>
>HOW CAN WE RESOLVE THIS ISSUE? plz help me in this
>regard, it's very urgent for me.
>
>
>
>
>THE EXCEPTION COMING IS:
>
>
>C:\Documents and
>Settings\Administrator\Desktop\Downloads\webservice\newwebservice_client\client>javac
>-d . XSLTClient.java
>
>C:\Documents and
>Settings\Administrator\Desktop\Downloads\webservice\newwebservice_client\client>java
>xsltransform/XSLTClient
> sample.xml sample.xsl
>the inFileDataHandler
>isjavax.activation.DataHandler@ca0b6
>the xslFileDataHandler
>isjavax.activation.DataHandler@10b30a7
>AxisFault
> faultCode:
>{http://schemas.xmlsoap.org/soap/envelope/}Server.userException
> faultSubcode:
> faultString: java.lang.ClassCastException
> faultActor:
> faultNode:
> faultDetail:
>        {http://xml.apache.org/axis/}hostname:SGSC1
>
>java.lang.ClassCastException
>        at
>org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:221)
>        at
>org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:128)
>        at
>org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
>        at
>org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
>Source)
>        at
>org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown
>Source)
>        at
>org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
>Source)
>        at
>org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
>Source)
>        at
>org.apache.xerces.parsers.XML11Configuration.parse(Unknown
>Source)
>        at
>org.apache.xerces.parsers.XML11Configuration.parse(Unknown
>Source)
>        at
>org.apache.xerces.parsers.XMLParser.parse(Unknown
>Source)
>        at
>org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
>Source)
>        at javax.xml.parsers.SAXParser.parse(Unknown
>Source)
>        at
>org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
>        at
>org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
>        at
>org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
>        at
>org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
>        at
>org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
>        at
>org.apache.axis.client.Call.invokeEngine(Call.java:2765)
>        at
>org.apache.axis.client.Call.invoke(Call.java:2748)
>        at
>org.apache.axis.client.Call.invoke(Call.java:2424)
>        at
>org.apache.axis.client.Call.invoke(Call.java:2347)
>        at
>org.apache.axis.client.Call.invoke(Call.java:1804)
>        at
>xsltransform.XSLTClient.main(XSLTClient.java:72)
>
>C:\Documents and
>Settings\Administrator\Desktop\Downloads\webservice\newwebservice_client\client>
>
>
>
>
>		
>__________________________________ 
>Yahoo! Mail - PC Magazine Editors' Choice 2005 
>http://mail.yahoo.com
>
>  
>


	
		
______________________________________________________ 
Yahoo! for Good 
Donate to the Hurricane Katrina relief effort. 
http://store.yahoo.com/redcross-donate3/ 


Regarding SOAP Header Information in WSDL

Posted by anshuk pal chaudhuri <an...@yahoo.com>.
Hi,

I am using Axis 1.2.1
When I am deploying a web service,the WSDL file is
being generated.
But I want to incorporate inside the WSDL ,that when
the client is sending the SOAP Request, he/she must
send the SOAP header with some elements inside the
header too.

This I want to convey inside the WSDL which is being
generated.
Is it possible?

Thanks in advance,

Regards,
Anshuk


	
		
______________________________________________________ 
Yahoo! for Good 
Donate to the Hurricane Katrina relief effort. 
http://store.yahoo.com/redcross-donate3/