---------- Forwarded message ----------
From: Valmir Macário <[EMAIL PROTECTED]>
Date: May 18, 2006 7:10 PM
Subject: org.apache.axis2.AxisFault: java.lang.ClassCastException
To: [email protected]
Hi all, i´m trying to pass a java bean object with 3 string arguments and give this error when i try to call the service. Please, i need help to find what´s is wrong becouse there isnt much material about axiom. I apreciate some help. Thanks
the code in service wich try to create the OMelement is:
//Cria OMElement para trafegar na rede
OMFactory fac = OMAbstractFactory.getOMFactory();
OMNamespace omNs = fac.createOMNamespace(
" http://ControlerService", "controler");
response = fac.createOMElement("clientRequestServiceResponse",omNs);
//cria OMElement para colocar objeto de resposta
OMElement serverReply_ele = fac.createOMElement("serverReply", omNs);
//DataHandler expectedDH = new DataHandler();
OMText textData = fac.createOMText(serverReply, true);
serverReply_ele.addChild(textData);
OMFactory fac = OMAbstractFactory.getOMFactory();
OMNamespace omNs = fac.createOMNamespace(
" http://ControlerService", "controler");
response = fac.createOMElement("clientRequestServiceResponse",omNs);
//cria OMElement para colocar objeto de resposta
OMElement serverReply_ele = fac.createOMElement("serverReply", omNs);
//DataHandler expectedDH = new DataHandler();
OMText textData = fac.createOMText(serverReply, true);
serverReply_ele.addChild(textData);
The wsdl is like follow:
<!-- Types -->
<wsdl:types>
<xsd:schema elementFormDefault="qualified"
targetNamespace="
http://ControlerService.controler.service.aileader.com/xsd "
xmlns="
http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/" >
<xsd:element name="clientRequestServiceResponse"
type="xsd1:serverReply" />
<xsd:element name="notifyProcessUnitIsDown"
>
<xsd:complexType>
<xsd:sequence>
<xsd:element type="xsd1:serverReply"
/>
<xsd:element name="idClient"
type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="notifyProcessUnitIsDownResponse"
type="xsd1:serverReply" />
<xsd:complexType name="serverReply"
>
<xsd:all>
<xsd:element type="xsd:string"
name="puName" />
<xsd:element type="xsd:string"
name="address" />
<xsd:element type="xsd:string"
name="password" />
</xsd:all>
</xsd:complexType>
</xsd:schema>
</wsdl:types>
<!-- Messages --> <wsdl:message name="clientRequestServiceMessage" > <wsdl:part element="ns2:clientRequestService" name="input" /> </wsdl:message> <wsdl:message name="clientRequestServiceResponseMessage" > <wsdl:part element="ns2:clientRequestServiceResponse" name="output" /> </wsdl:message>
<wsdl:message name="notifyProcessUnitIsOnlineMessage" > <wsdl:part element="ns2:notifyProcessUnitIsOnline" name="input" /> </wsdl:message>
<wsdl:message name="notifyProcessUnitIsDownMessage" > <wsdl:part element="ns2:notifyProcessUnitIsDown" name="input" /> </wsdl:message> <wsdl:message name="notifyProcessUnitIsDownResponseMessage" > <wsdl:part element="ns2:notifyProcessUnitIsDownResponse" name="output" /> </wsdl:message>
<wsdl:message name="verifyPasswordMessage" > <wsdl:part element="ns2:verifyPassword" name="input" /> </wsdl:message> <wsdl:message name="verifyPasswordResponseMessage" > <wsdl:part element="ns2:verifyPasswordResponse" name="output" /> </wsdl:message> <!-- Port type --> <wsdl:portType name="ControlerPortType" > <wsdl:operation name="clientRequestService" > <wsdl:input message="tns:clientRequestServiceMessage" /> <wsdl:output message="tns:clientRequestServiceResponseMessage" /> </wsdl:operation>
<wsdl:operation name="notifyProcessUnitIsOnline" > <wsdl:input message="tns:notifyProcessUnitIsOnlineMessage" /> </wsdl:operation>
<wsdl:operation name="notifyProcessUnitIsDown" > <wsdl:input message="tns:notifyProcessUnitIsDownMessage" /> <wsdl:output message="tns:notifyProcessUnitIsDownResponseMessage" /> </wsdl:operation>
<wsdl:operation name="verifyPassword" > <wsdl:input message="tns:verifyPasswordMessage" /> <wsdl:output message="tns:verifyPasswordResponseMessage" /> </wsdl:operation>
</wsdl:portType> <!-- Binding --> <wsdl:binding name="ControlerSOAPBinding" type="tns:ControlerPortType"> <soap:binding transport=" http://schemas.xmlsoap.org/soap/http" style="document" /> <wsdl:operation name="clientRequestService" > <soap:operation style="rpc" soapAction="urn:clientRequestService" /> <wsdl:input> <soap:body namespace=" http://ControlerService.controler.service.aileader.com " use="literal" /> </wsdl:input> <wsdl:output> <soap:body namespace=" http://ControlerService.controler.service.aileader.com " use="literal" /> </wsdl:output> </wsdl:operation>
