You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsif-user@ws.apache.org by David McDivitt <x1...@yahoo.com> on 2006/03/17 00:36:26 UTC

WSIFException

Thanks Aleksander for replying to my previous question. I decided to quit
the home-made route and try the formal route. Websphere has a nice
step-by-step example on setting up a web service. It goes like this:

1) make the service (mine uses IMS Connect and does IMS transactions on the
mainframe)
2) on the service.WSDL file, create the service proxy and helper classes
3) write a test class to exercise the service and prove it
4) on the service.WSDL file create deploy code, which auto generates
separate EJB, Web, and EAR projects
5) manually create a client project
6) in the web project, on the service.WSDL file, create a service proxy, but
have it go to the client project instead
7) on a server do J2C setup
8) add the service EAR to the server
9) start the server
10) copy the test class from the original service project into the client
project and try to run it
11) laugh out loud

When I run the test class in the client project I get a ClassCastException
as seen in the server log pasted below. All code was autogenerated. So why
the ClassCastException? It's a bunch of crap.

Help would be appreciated.

I think I am wasting time on this and need to return to the home-made route
and get that working. Thanks



org.apache.wsif.WSIFException: [Attributes={}] [faultCode=SOAP-ENV:Server]
[faultString=Error in connecting to EJB]
[faultActorURI=/IMSPayeeAdjustmentInquiryServiceWeb/servlet/rpcrouter]
[DetailEntries=
[(0)=<stackTrace>java.lang.ClassCastException:
com.ibm.connector2.ims.ico.IMSConnectionFactory
	at
com.ibm.rmi.javax.rmi.PortableRemoteObject.getObjectImpl(PortableRemoteObject.java:614)
	at
com.ibm.rmi.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:339)
	at
javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:157)
	at
com.ibm.soap.providers.impl.WASStatelessEJBProviderImpl.locate(WASStatelessEJBProviderImpl.java:354)
	at org.apache.soap.server.http.RPCRouterServlet.doPost(Unknown
Source)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
	at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
	at
com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
	at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
	at
com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
	at
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
	at
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
	at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1019)
	at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:592)
	at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:204)
	at
com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:125)
	at
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:286)
	at
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
	at
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
	at
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
	at
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
	at
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:615)
	at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:912)
</stackTrace>]
] [FaultEntries=]
	at WSDL.WSDL02Proxy.execute(WSDL02Proxy.java:181)
	at WSDL.WSDL02Proxy.getAdjustmentInfo(WSDL02Proxy.java:73)
	at test.testService.main(testService.java:15)
Exception in thread "main" 


Re: WSIFException

Posted by David McDivitt <x1...@yahoo.com>.
I got it working as a standalone java application! The java command
referenced about fifteen jar files. I extracted each one, one at a time,
into the same folder on my desktop. There was only one file name conflict -
a config file. IBM also references a bunch of jars through the platform, so
I had to find each of those and extract to the same place. I recommend the
new Winzip highly. With it you can display the folder structure in the left
pane and folder contents in the right pane, just like Windows Explorer. This
makes examining jar files much easier. My approach was to make one massive
jar file and copy that to UNIX, only referencing that jar on the java
command line. After numerous attempts, directed by errors generated, and
substituting the config files, I was finally able to get the right
combination. The standalone java app works with no errors.



>From: Aleksander Slominski <as...@cs.indiana.edu>
>Date: Thu, 16 Mar 2006 18:56:41 -0500
>
>David McDivitt wrote:
>> Thanks Aleksander for replying to my previous question. I decided to quit
>> the home-made route and try the formal route. Websphere has a nice
>> step-by-step example on setting up a web service. It goes like this:
>>
>> 1) make the service (mine uses IMS Connect and does IMS transactions on the
>> mainframe)
>> 2) on the service.WSDL file, create the service proxy and helper classes
>> 3) write a test class to exercise the service and prove it
>> 4) on the service.WSDL file create deploy code, which auto generates
>> separate EJB, Web, and EAR projects
>> 5) manually create a client project
>> 6) in the web project, on the service.WSDL file, create a service proxy, but
>> have it go to the client project instead
>> 7) on a server do J2C setup
>> 8) add the service EAR to the server
>> 9) start the server
>> 10) copy the test class from the original service project into the client
>> project and try to run it
>> 11) laugh out loud
>>
>> When I run the test class in the client project I get a ClassCastException
>> as seen in the server log pasted below. All code was autogenerated. So why
>> the ClassCastException? It's a bunch of crap.
>>   
>haha - that kind of errors can be very very frustrating. i do not have
>practical experience with Websphere but i would hunt around to see how
>classpath and classloaders are set (in tomcat one would look in WEB-INF
>common/libs and places like that) to make sure you do not have
>duplicates (in particular how IMSConnectionFactory comes to existence)
>> Help would be appreciated.
>>
>> I think I am wasting time on this and need to return to the home-made route
>> and get that working. Thanks
>>   
>i wish i could help you more but IMS/WS is a mystery to me :)
>
>alek


Re: WSIFException

Posted by Aleksander Slominski <as...@cs.indiana.edu>.
David McDivitt wrote:
> Thanks Aleksander for replying to my previous question. I decided to quit
> the home-made route and try the formal route. Websphere has a nice
> step-by-step example on setting up a web service. It goes like this:
>
> 1) make the service (mine uses IMS Connect and does IMS transactions on the
> mainframe)
> 2) on the service.WSDL file, create the service proxy and helper classes
> 3) write a test class to exercise the service and prove it
> 4) on the service.WSDL file create deploy code, which auto generates
> separate EJB, Web, and EAR projects
> 5) manually create a client project
> 6) in the web project, on the service.WSDL file, create a service proxy, but
> have it go to the client project instead
> 7) on a server do J2C setup
> 8) add the service EAR to the server
> 9) start the server
> 10) copy the test class from the original service project into the client
> project and try to run it
> 11) laugh out loud
>
> When I run the test class in the client project I get a ClassCastException
> as seen in the server log pasted below. All code was autogenerated. So why
> the ClassCastException? It's a bunch of crap.
>   
haha - that kind of errors can be very very frustrating. i do not have
practical experience with Websphere but i would hunt around to see how
classpath and classloaders are set (in tomcat one would look in WEB-INF
common/libs and places like that) to make sure you do not have
duplicates (in particular how IMSConnectionFactory comes to existence)
> Help would be appreciated.
>
> I think I am wasting time on this and need to return to the home-made route
> and get that working. Thanks
>   
i wish i could help you more but IMS/WS is a mystery to me :)

alek
>
>
> org.apache.wsif.WSIFException: [Attributes={}] [faultCode=SOAP-ENV:Server]
> [faultString=Error in connecting to EJB]
> [faultActorURI=/IMSPayeeAdjustmentInquiryServiceWeb/servlet/rpcrouter]
> [DetailEntries=
> [(0)=<stackTrace>java.lang.ClassCastException:
> com.ibm.connector2.ims.ico.IMSConnectionFactory
> 	at
> com.ibm.rmi.javax.rmi.PortableRemoteObject.getObjectImpl(PortableRemoteObject.java:614)
> 	at
> com.ibm.rmi.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:339)
> 	at
> javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:157)
> 	at
> com.ibm.soap.providers.impl.WASStatelessEJBProviderImpl.locate(WASStatelessEJBProviderImpl.java:354)
> 	at org.apache.soap.server.http.RPCRouterServlet.doPost(Unknown
> Source)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> 	at
> com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
> 	at
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
> 	at
> com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
> 	at
> com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
> 	at
> com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
> 	at
> com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
> 	at
> com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
> 	at
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1019)
> 	at
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:592)
> 	at
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:204)
> 	at
> com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:125)
> 	at
> com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:286)
> 	at
> com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
> 	at
> com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
> 	at
> com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
> 	at
> com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
> 	at
> com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:615)
> 	at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
> 	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:912)
> </stackTrace>]
> ] [FaultEntries=]
> 	at WSDL.WSDL02Proxy.execute(WSDL02Proxy.java:181)
> 	at WSDL.WSDL02Proxy.getAdjustmentInfo(WSDL02Proxy.java:73)
> 	at test.testService.main(testService.java:15)
> Exception in thread "main" 
>
>   


-- 
The best way to predict the future is to invent it - Alan Kay