You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by Gonçalo Jesus <gj...@student.dei.uc.pt> on 2005/12/06 09:03:45 UTC

Exception in Java Client for an Axis C++ Server

Hi,

(I don't like to say this but it really is an URGENT matter)

I'm trying to integrate a server written in C++, through Web Services 
(AxisC++/Apache1.3 for Windows 2003 Server), with a java application. 
I've already developed both of them, and i actually already deployed the 
Web Service in Apache (copied the .dll, etc).

This was the wsdl from which I generated the stubs/skeletons:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://DefaultNamespace" 
xmlns:apachesoap="http://xml.apache.org/xml-soap" 
xmlns:impl="http://DefaultNamespace" 
xmlns:intf="http://DefaultNamespace" 
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
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.2
Built on May 03, 2005 (02:20:24 EDT)-->
   <wsdl:message name="doOperationRequest">
      <wsdl:part name="in0" type="soapenc:string"/>
   </wsdl:message>
   <wsdl:message name="doOperationResponse">
      <wsdl:part name="doOperationReturn" type="xsd:int"/>
   </wsdl:message>
   <wsdl:portType name="DaMiniBankServerSOAP">
      <wsdl:operation name="doOperation" parameterOrder="in0">
         <wsdl:input message="impl:doOperationRequest" 
name="doOperationRequest"/>
         <wsdl:output message="impl:doOperationResponse" 
name="doOperationResponse"/>
      </wsdl:operation>
   </wsdl:portType>
   <wsdl:binding name="DaMiniBankServerSOAPSoapBinding" 
type="impl:DaMiniBankServerSOAP">
      <wsdlsoap:binding style="rpc" 
transport="http://schemas.xmlsoap.org/soap/http"/>
      <wsdl:operation name="doOperation">
         <wsdlsoap:operation soapAction=""/>
         <wsdl:input name="doOperationRequest">
            <wsdlsoap:body 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="http://DefaultNamespace" use="encoded"/>
         </wsdl:input>
         <wsdl:output name="doOperationResponse">
            <wsdlsoap:body 
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
namespace="http://DefaultNamespace" use="encoded"/>
         </wsdl:output>
      </wsdl:operation>
   </wsdl:binding>
   <wsdl:service name="DaMiniBankServerSOAPService">
      <wsdl:port binding="impl:DaMiniBankServerSOAPSoapBinding" 
name="DaMiniBankServerSOAP">
         <wsdlsoap:address 
location="http://192.168.200.209/axis/DaMiniBankServerSOAP"/>
      </wsdl:port>
   </wsdl:service>
</wsdl:definitions>

----------

It seemed that I've done everything alright, at least i followed the 
developer guides! BUT when i try to run the client application this returns 
an exception:

                java.lang.ClassCastException

 From the server side all maintains like nothing happened...i've put 
lots of prints for debugging but none of them appears on the server side! The strange is that the Apache log is changed, the requests are written in Access Log 
and Apache "says" the return code is 200! 

Anyone can help me!!! I don't know if it is a client side problem or a 
server side...How can i fix this?

Thanks for the help,
Gonçalo


Re: Exception in Java Client for an Axis C++ Server

Posted by Samisa Abeysinghe <sa...@gmail.com>.
Gonçalo Jesus wrote:

> Hi,
>
> (I don't like to say this but it really is an URGENT matter)
>
> I'm trying to integrate a server written in C++, through Web Services 
> (AxisC++/Apache1.3 for Windows 2003 Server), with a java application. 
> I've already developed both of them, and i actually already deployed 
> the Web Service in Apache (copied the .dll, etc).
>
> This was the wsdl from which I generated the stubs/skeletons:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions targetNamespace="http://DefaultNamespace" 
> xmlns:apachesoap="http://xml.apache.org/xml-soap" 
> xmlns:impl="http://DefaultNamespace" 
> xmlns:intf="http://DefaultNamespace" 
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
> 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.2
> Built on May 03, 2005 (02:20:24 EDT)-->
>   <wsdl:message name="doOperationRequest">
>      <wsdl:part name="in0" type="soapenc:string"/>
>   </wsdl:message>
>   <wsdl:message name="doOperationResponse">
>      <wsdl:part name="doOperationReturn" type="xsd:int"/>
>   </wsdl:message>
>   <wsdl:portType name="DaMiniBankServerSOAP">
>      <wsdl:operation name="doOperation" parameterOrder="in0">
>         <wsdl:input message="impl:doOperationRequest" 
> name="doOperationRequest"/>
>         <wsdl:output message="impl:doOperationResponse" 
> name="doOperationResponse"/>
>      </wsdl:operation>
>   </wsdl:portType>
>   <wsdl:binding name="DaMiniBankServerSOAPSoapBinding" 
> type="impl:DaMiniBankServerSOAP">
>      <wsdlsoap:binding style="rpc" 
> transport="http://schemas.xmlsoap.org/soap/http"/>
>      <wsdl:operation name="doOperation">
>         <wsdlsoap:operation soapAction=""/>
>         <wsdl:input name="doOperationRequest">
>            <wsdlsoap:body 
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
> namespace="http://DefaultNamespace" use="encoded"/>
>         </wsdl:input>
>         <wsdl:output name="doOperationResponse">
>            <wsdlsoap:body 
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
> namespace="http://DefaultNamespace" use="encoded"/>
>         </wsdl:output>
>      </wsdl:operation>
>   </wsdl:binding>
>   <wsdl:service name="DaMiniBankServerSOAPService">
>      <wsdl:port binding="impl:DaMiniBankServerSOAPSoapBinding" 
> name="DaMiniBankServerSOAP">
>         <wsdlsoap:address 
> location="http://192.168.200.209/axis/DaMiniBankServerSOAP"/>
>      </wsdl:port>
>   </wsdl:service>
> </wsdl:definitions>
>
> ----------
>
> It seemed that I've done everything alright, at least i followed the 
> developer guides! BUT when i try to run the client application this 
> returns an exception:
>
>                java.lang.ClassCastException
>
> From the server side all maintains like nothing happened...i've put 
> lots of prints for debugging but none of them appears on the server 
> side! The strange is that the Apache log is changed, the requests are 
> written in Access Log and Apache "says" the return code is 200!
> Anyone can help me!!! I don't know if it is a client side problem or a 
> server side...How can i fix this?

You could use tcpmon from Axis Java to track the request and response 
SOAP messages. Use that tool to see if the request goes to the server 
and if the server sends the correct response.

Samisa...

>
> Thanks for the help,
> Gonçalo
>
>