I have not yet tried this myself and we are actually looking to do this as
well (possibly use CXF with WAS7).  Realize that IBM WAS7s classloader is a
complex thing (mess IMO).

We fought with the classloading when attempting to deploy WAR files
containing the JAX-WS RI / Metro JAR files in the WEB-INF/lib.  WAS7 uses a
built-in Axis2 stack and it often "gets in the way".  Assuming the "client"
you are calling from is part of a web application:

1) Are the CXF jars you need in the WEB-INF/lib of the WAR?

2) Make sure classloader policy is PARENT LAST and classloader *per
application*.  (not a single classloader).  This is what we had to do get
the WAR file that was using Metro JARs to work.

3) Are you using only the CXF JAR files you need (there are many in the
full stack) and there may be other JARs in the WAS 7 stack itself (it's
huge) that conflict unless the classloading is set properly.

Just some thoughts.

Mark

On Sat, Jan 14, 2012 at 9:53 AM, jayaprakash m <jayaprakash....@gmail.com>wrote:

> Hi,
>
> I am using CXF 2.5.1 client and the server is WebSphere 7.0.
>
> When I make a service call from the client program, i am getting the below
> error.
>
> This error is blocking me since many days.
> Could you please help me out...
>
> I could not get the proper solution after spending time in googling for the
> solutions.
>
> Note:- We were able to get the response when we deploy the service in
> Tomcat with same client program.
> Exception as below:-
> ---------------------------------------------
>
> org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader.
> at
>
> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:237)
> at
>
> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:60)
> at
>
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
> at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:799)
> at
>
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1627)
> at
>
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1494)
> at
>
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1402)
> at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
> at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:649)
> at
>
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
> at
>
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
> at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:533)
> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463)
> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:366)
> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319)
> at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:88)
> at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:134)
> at $Proxy37.eeDownstreamAuthenticate(Unknown Source)
> at
>
> com.aciworldwide.aps.initiate.ee.downstream.sso.EeDownstreamAuthenticationClientTest1.main(EeDownstreamAuthenticationClientTest1.java:76)
> Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
>  at [row,col {unknown-source}]: [1,0]
> at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:677)
> at com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2104)
> at
>
> com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2010)
> at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1102)
> at com.ctc.wstx.sr.BasicStreamReader.nextTag(BasicStreamReader.java:1125)
> at
>
> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:138)
> ... 18 more
> Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Error
> reading XMLStreamReader.
> at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:156)
> at $Proxy37.eeDownstreamAuthenticate(Unknown Source)
> at
>
> com.aciworldwide.aps.initiate.ee.downstream.sso.EeDownstreamAuthenticationClientTest1.main(EeDownstreamAuthenticationClientTest1.java:76)
> Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
>  at [row,col {unknown-source}]: [1,0]
> at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:677)
>  -------------------------The client is similar to as
> below----------------------------------
>  Service ss = new Service(wsdlURL, SERVICE_NAME);
> AuthenticationInterface port = ss.getService();
>  org.apache.cxf.endpoint.Client client = ClientProxy.getClient(port);
>  HTTPConduit httpConduit = (HTTPConduit) client.getConduit();
>        httpConduit.getClient().setAllowChunking(false);
>      Response return = port.authenticate("value");
>
>   -----------------
> Thanks,
> Jayaprakash
>



*
*

Reply via email to