Receiving a ClassCastException when using SOAPClient
stlecho May 27, 2008 10:43 AMHi,
When using SOAPClient to call an external HTTPs-based webservice, I'm receiving a ClassCastException.
In order to get detailed information about the Exception, I've configured a Notifier, but that does not change anything on the granularity of the Stacktrace.
-Have I configured the Notifier in a correct way ?
-How can I get more information - or even better: the cause- on the ClassCastException ?
Debug Info:
16:12:48,343 WARN [ActionProcessingPipeline] Unexpected exception caught while processing the action pipeline: header: [ To: JMSEpr [ PortReference < <wsa:Address jms://127.0.0.1:1099/queue/fphp_esb_request/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.initial : org.jnp.interfaces.NamingContextFactory/>, <wsa:ReferenceProperties jbossesb:java.naming.provider.url : localhost/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.url.pkgs : org.jnp.interfaces/>, <wsa:ReferenceProperties jbossesb:destination-type : queue/>, <wsa:ReferenceProperties jbossesb:specification-version : 1.1/>, <wsa:ReferenceProperties jbossesb:connection-factory : ConnectionFactory/>, <wsa:ReferenceProperties jbossesb:persistent : true/>, <wsa:ReferenceProperties jbossesb:acknowledge-mode : AUTO_ACKNOWLEDGE/>, <wsa:ReferenceProperties jbossesb:transacted : false/>, <wsa:ReferenceProperties jbossesb:type : urn:jboss/esb/epr/type/jms/> > ] MessageID: 78cc347a-cf97-483f-b846-44050945a877 RelatesTo: jms:correlationID#78cc347a-cf97-483f-b846-44050945a877 ] java.lang.ClassCastException: java.lang.String at org.jboss.soa.esb.actions.soap.SOAPClient.process(SOAPClient.java:377) at com.notary.esb.jboss.CredocSOAPClient.process(CredocSOAPClient.java:22) at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:316) at org.jboss.soa.esb.listeners.message.MessageAwareListener$TransactionalRunner.run(MessageAwareListener.java:530) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) at java.lang.Thread.run(Thread.java:595) 16:12:48,437 INFO [STDOUT] ConsoleNotifier 2008/05/27 04:12:48.437<<FPHP-Search>Hello from ESBSenderTestCase</FPHP-Search>>
Extract from jboss-esb.xml
<action name="notificationAction" class="org.jboss.soa.esb.actions.Notifier"> <property name="okMethod" value="notifyOK" /> <property name="exceptionMethod" value="notifyError" /> <property name="notification-details"> <NotificationList type="ok"> <target class="NotifyConsole" /> <!--target class="NotifyEmail" /--> </NotificationList> <NotificationList type="err"> <target class="NotifyConsole" /> <!-- Doc: http://wiki.jboss.org/wiki/en/JBossESBBasicFileListenerEmail?action=e&windowstate=normal&mode=view --> <!--target class="NotifyEmail" sendTo="lecho@fednot.be" from="lecho@fednot.be" subject="We received an errir"/--> </NotificationList> </property> </action> <action name="FSB-PersonQuery-findPerson" class="com.notary.esb.jboss.CredocSOAPClient"> <property name="wsdl" value="https://e-depottest.smals-mvm.be/fphp/3.1/ws/PersonQuery.jws?WSDL="> <http-client-property name="file" value="https-fsb.properties" /> </property> <property name="SOAPAction" value="urn://fsb.belgium.be/fphp/v3_0/findPerson"/> </action>
Regards, Stefan Lecho.