• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

NullPointer when calling XFire service using CXF client.

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All.

I am trying to call a working XFire set of services using a CXF client. Everything was working great until we noticed that XFire was leaving sockets in a CLOSE_WAIT state.

So I began looking for solutions for the CLOSE_WAITS and attempted subclassing the close method of the CommonsHttpMessageSender class. This however did not work and then decided to try CXF as the client to our XFire Services.

After implementing the CXF client like so:


with an interface of the following:


I get the following returned:
INFO: Creating Service {http://ats.olmis/}IOlmisManager from class olmis.ats.IOlmisManager
Feb 1, 2011 10:09:20 AM org.apache.cxf.interceptor.AbstractLoggingInterceptor log
INFO: Outbound Message
---------------------------
ID: 1
Address: http://localhost:8080/atsms/services/OlmisManager
Encoding: UTF-8
Content-Type: text/xml
Headers: {SOAPAction=[""], Accept=[*/*]}
Payload: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns1:serviceLogin xmlns:ns1="http://ats.olmis/"><arg0 xmlns="http://ats.olmis/">olmis</arg0><arg1 xmlns="http://ats.olmis/">wEtxRPd5vUNboYYRdkkkLw==</arg1></ns1:serviceLogin></soap:Body></soap:Envelope>
--------------------------------------
Feb 1, 2011 10:09:20 AM org.apache.cxf.interceptor.AbstractLoggingInterceptor log
INFO: Inbound Message
----------------------------
ID: 1
Response-Code: 200
Encoding: UTF-8
Content-Type: text/xml;charset=UTF-8
Headers: {content-type=[text/xml;charset=UTF-8], Date=[Tue, 01 Feb 2011 18:09:20 GMT], transfer-encoding=[chunked], Set-Cookie=[JSESSIONID=67C70EBCE3EB2F73C1076BE4C66A384A; Path=/atsms], Server=[Apache-Coyote/1.1]}
Payload: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soap:Body><ns1:serviceLoginResponse xmlns:ns1="http://ws.oed.state.or.us"><ns1:out>true</ns1:out></ns1:serviceLoginResponse></soap:Body></soap:Envelope>
--------------------------------------
WsClient.callWebService(): Exception: java.lang.NullPointerException
Feb 1, 2011 10:09:21 AM org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromClass
INFO: Creating Service {http://ats.olmis/}IOlmisManager from class olmis.ats.IOlmisManager

If anyone can point me to what is wrong I would GREATLY appreciate it. If something else is needed, please let me know.

I'm sure it's something silly that I haven't done right.

Thanks!
 
John Janes
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Solved the issue. It was all in the annotations of the service interface.

The fix was as follows:


As usual, it turned out to be something silly on my part.
 
I just had the craziest dream. This tiny ad was in it.
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic