Hello

   It turns out that my core problem was in the client I was using to access
my RESTful service. When I accessed the service from a browser everything
worked. I got the NPE when I tried to call the same URI from ServiceMix. It
turns out that the browser was calling doing an http GET while ServiceMix
was doing an http POST by default. When I configured ServiceMix to do a GET
it worked.

    <http:provider service="test:myHttpProviderRestService"
                   interfaceName="myHttpProviderRest"
                   endpoint="myHttpProviderRest"
                   marshaler="#marshaler"/>

    <bean id="marshaler"
class="org.apache.servicemix.http.endpoints.DefaultHttpProviderMarshaler">
        <property name="locationURI"
                  value="http://localhost:8080/foo-app/bars"/>
        <property name="method"
                  value="GET"/>
    </bean>




Thanks
Tom






priya j wrote:
> 
> Hi,
> 
> when i try executing my rs-basic (with https) in eclipse, the server
> through  a null pointer exception but my client works. I am not sure whats
> wrong.
> 
> Then my other issue is if im changing to https. what are the config i need
> to do.
> As far as i know i have changed my server.xml in tomcat
> 
> <Connector SSLEnabled="true" clientAuth="false" maxThreads="150"
> port="8443" protocol="HTTP/1.1" scheme="https" secure="true"
> sslProtocol="TLS"/>
> 
> and set my server argument to the cherryserver.
> 
> Is that anything else need to be done....
> Can anyone plssssssssssss guide me.
> waiting for the reply asap.
> 
> Regards,
> Priya
> 
> priya j wrote:
>> 
>> Hi All,
>> 
>> I am using JAX-RS for my RESTful web service with security.
>> I am able to execute the sample in 2.1 snapshot when i try for the spring
>> configuration it fail.
>> 
>> Can anyone tell me whats wrong or is that any configuration needs to be
>> done.
>> 
>> I use the application level tomcat.( Do i need to do any changes to my
>> server.xml in tomcat for https configuration.)
>> 
>> *my web.xml and bean.xml and the service class are same as in sample.
>> 
>> ERROR:
>> 
>> Jan 18, 2008 3:58:57 PM org.apache.catalina.core.AprLifecycleListener
>> init
>> INFO: The Apache Tomcat Native library which allows optimal performance
>> in production environments was not found on the java.library.path:
>> C:\Program
>> Files\Java\jre1.6.0_04\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program
>> Files\eclipse\jdk1.6.0_04\jre\bin
>> Jan 18, 2008 3:58:57 PM org.apache.coyote.http11.Http11Protocol init
>> INFO: Initializing Coyote HTTP/1.1 on http-8080
>> Jan 18, 2008 3:58:57 PM org.apache.catalina.startup.Catalina load
>> INFO: Initialization processed in 1155 ms
>> Jan 18, 2008 3:58:57 PM org.apache.catalina.core.StandardService start
>> INFO: Starting service Catalina
>> Jan 18, 2008 3:58:57 PM org.apache.catalina.core.StandardEngine start
>> INFO: Starting Servlet Engine: Apache Tomcat/6.0.14
>> Jan 18, 2008 3:58:57 PM org.apache.catalina.loader.WebappClassLoader
>> validateJarFile
>> INFO: validateJarFile(C:\Documents and Settings\sspriya\REST - CXF\final
>> with news\back-up_07\With
>> drools\back-up\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\sfe-wss\WEB-INF\lib\geronimo-servlet_2.5_spec-
>> 1.1-M1.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2.
>> Offending class: javax/servlet/Servlet.class
>> Jan 18, 2008 3:58:58 PM org.apache.catalina.loader.WebappClassLoader
>> validateJarFile
>> INFO: validateJarFile(C:\Documents and Settings\sspriya\REST - CXF\final
>> with news\back-up_07\With
>> drools\back-up\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\sfe-wss\WEB-INF\lib\servlet-
>> api-2.5.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2.
>> Offending class: javax/servlet/Servlet.class
>> Jan 18, 2008 3:58:59 PM org.apache.catalina.core.ApplicationContext log
>> INFO: Initializing Spring root WebApplicationContext
>> Jan 18, 2008 3:59:03 PM org.apache.cxf.endpoint.ServerImpl
>> initDestination
>> INFO: Setting the server's publish address to be /
>> Jan 18, 2008 3:59:03 PM org.apache.cxf.transport.servlet.CXFServlet
>> loadSpringBus
>> INFO: Load the bus with application context
>> Jan 18, 2008 3:59:03 PM org.apache.cxf.bus.spring.BusApplicationContext
>> getConfigResources
>> INFO: Could not find the configuration file C:\Documents and
>> Settings\sspriya\REST - CXF\final with news\back-up_07\With
>> drools\back-up\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\sfe-wss\WEB-INF\classes\CherryServer.cxf
>> on the classpath.
>> Jan 18, 2008 3:59:03 PM
>> org.apache.cxf.transport.servlet.AbstractCXFServlet
>> replaceDestinationFactory
>> INFO: Servlet transport factory already registered
>> Jan 18, 2008 3:59:03 PM org.apache.coyote.http11.Http11Protocol start
>> INFO: Starting Coyote HTTP/1.1 on http-8080
>> Jan 18, 2008 3:59:03 PM org.apache.jk.common.ChannelSocket init
>> INFO: JK: ajp13 listening on /0.0.0.0:8009
>> Jan 18, 2008 3:59:03 PM org.apache.jk.server.JkMain start
>> INFO: Jk running ID=0 time=0/63  config=null
>> Jan 18, 2008 3:59:03 PM org.apache.catalina.startup.Catalina start
>> INFO: Server startup in 6739 ms
>> Jan 18, 2008 3:59:04 PM
>> org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor handleMessage
>> INFO: Request path is: /
>> Jan 18, 2008 3:59:04 PM
>> org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor handleMessage
>> INFO: Request HTTP method is: GET
>> Jan 18, 2008 3:59:04 PM
>> org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor handleMessage
>> INFO: Request contentType is: */*
>> Jan 18, 2008 3:59:04 PM
>> org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor handleMessage
>> INFO: Accept contentType is: */*
>> Jan 18, 2008 3:59:04 PM
>> org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor handleMessage
>> SEVERE: No operation found for path: /, contentType: */*, Accept
>> contentType: */*
>> Jan 18, 2008 3:59:04 PM org.apache.cxf.phase.PhaseInterceptorChain
>> doIntercept
>> INFO: Interceptor has thrown exception, unwinding now
>> java.lang.NullPointerException
>>     at
>> org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(JAXRSInInterceptor.java:102)
>>     at
>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java
>> :207)
>>     at
>> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:78)
>> 
>>     at
>> org.apache.cxf.transport.servlet.ServletDestination.doMessage(ServletDestination.java:79)
>>     at
>> org.apache.cxf.transport.servlet.ServletController.invokeDestination
>> (ServletController.java:264)
>> 
>>     at
>> org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160)
>>     at
>> org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:170)
>>     at
>> org.apache.cxf.transport.servlet.AbstractCXFServlet.doGet(AbstractCXFServlet.java:152)
>>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
>>     at javax.servlet.http.HttpServlet.service(HttpServlet.java :803)
>>     at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>>     at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>>     at
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>>     at
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
>>     at org.apache.catalina.core.StandardHostValve.invoke
>> (StandardHostValve.java:128)
>>     at
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>>     at
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>>     at org.apache.catalina.connector.CoyoteAdapter.service
>> (CoyoteAdapter.java:263)
>>     at
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
>>     at
>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
>>     at
>> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>>     at java.lang.Thread.run(Unknown Source)
>> 
>> 
>> Thanks inadvance. Its kind of very urgent.
>> Please do reply ASAP.
>> Regards,
>> Priya
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Jax-rs-issue-tp14948036p16048628.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to