List Info

Thread: WSIFException




WSIFException
user name
2006-03-16 23:36:26
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(Por
tableRemoteObject.java:614)
	at
com.ibm.rmi.javax.rmi.PortableRemoteObject.narrow(PortableRe
moteObject.java:339)
	at
javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.j
ava:157)
	at
com.ibm.soap.providers.impl.WASStatelessEJBProviderImpl.loca
te(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.doServ
ice(StrictServletInstance.java:110)
	at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv
ice(StrictLifecycleServlet.java:174)
	at
com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str
ictLifecycleServlet.java:313)
	at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi
ce(StrictLifecycleServlet.java:116)
	at
com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv
letInstance.java:283)
	at
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d
ispatch(ValidServletReferenceState.java:42)
	at
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis
patch(ServletInstanceReference.java:40)
	at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl
eWebAppDispatch(WebAppRequestDispatcher.java:1019)
	at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa
tch(WebAppRequestDispatcher.java:592)
	at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa
rd(WebAppRequestDispatcher.java:204)
	at
com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn
voker.java:125)
	at
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo
ok(WebAppInvoker.java:286)
	at
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha
ndleInvocation(CachedInvocation.java:71)
	at
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch
ByURI(ServletRequestProcessor.java:182)
	at
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.se
rvice(OSEListener.java:334)
	at
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Ht
tpConnection.java:56)
	at
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConn
ection.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" 

WSIFException
user name
2006-03-16 23:56:41
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(Por
tableRemoteObject.java:614)
> 	at
>
com.ibm.rmi.javax.rmi.PortableRemoteObject.narrow(PortableRe
moteObject.java:339)
> 	at
>
javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.j
ava:157)
> 	at
>
com.ibm.soap.providers.impl.WASStatelessEJBProviderImpl.loca
te(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.doServ
ice(StrictServletInstance.java:110)
> 	at
>
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._serv
ice(StrictLifecycleServlet.java:174)
> 	at
>
com.ibm.ws.webcontainer.servlet.IdleServletState.service(Str
ictLifecycleServlet.java:313)
> 	at
>
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.servi
ce(StrictLifecycleServlet.java:116)
> 	at
>
com.ibm.ws.webcontainer.servlet.ServletInstance.service(Serv
letInstance.java:283)
> 	at
>
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.d
ispatch(ValidServletReferenceState.java:42)
> 	at
>
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dis
patch(ServletInstanceReference.java:40)
> 	at
>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handl
eWebAppDispatch(WebAppRequestDispatcher.java:1019)
> 	at
>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispa
tch(WebAppRequestDispatcher.java:592)
> 	at
>
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forwa
rd(WebAppRequestDispatcher.java:204)
> 	at
>
com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppIn
voker.java:125)
> 	at
>
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHo
ok(WebAppInvoker.java:286)
> 	at
>
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.ha
ndleInvocation(CachedInvocation.java:71)
> 	at
>
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatch
ByURI(ServletRequestProcessor.java:182)
> 	at
>
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.se
rvice(OSEListener.java:334)
> 	at
>
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(Ht
tpConnection.java:56)
> 	at
>
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConn
ection.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

WSIFException
user name
2006-03-17 20:22:26
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 <aslomcs.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

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )