Hi Sergey,

Sergey Beryozkin-2 wrote:
> 
> Please consider moving to JAX-RS, you won't lose, and
> there's a bunch of JAX-RS implementations is available...
> 

Thanks for the reply.

Actually, I started out with CXF with jax-rs in mind. Then I encountered
several problems trying to set-up the same simple service. I followed what
was stated in the guide:
http://cwiki.apache.org/CXF20DOC/jax-rs-jsr-311.html

AccountService.java
----
package some.package;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.ProduceMime;

@Path("/rest/Accounts")
@ProduceMime("application/xml")
public class AccountService {
        @GET
        @Path("/Account/{uniqueId}")
        public Account get(
                        @PathParam("uniqueId")
                        long uniqueId
                        ) {
                logger.info("get received: " + uniqueId);
                try{
                        return generateAccount();
                } finally {
                }
        }
        //other methods here...
}

beans.xml as follows:
        <jaxrs:server id="accountRestService" address="/rest/Accounts">
                <jaxrs:serviceBeans>
                        <ref bean="accountServiceClass" />
                </jaxrs:serviceBeans>
        </jaxrs:server>

        <bean id="accountServiceClass" class="some.package.AccountService" />

Account.java:
@XmlRootElement
public class Account {
        //fields go here
}

I fire up tomcat, nothing works. Even worse, the soap endpoint is also
inaccessible. List of services is also inaccessible. When I look at the root
directory http://localhost:8080/cxf/services/ I get the following:

java.lang.NullPointerException

org.apache.cxf.service.model.EndpointInfo.getInterface(EndpointInfo.java:54)

I could be missing something simple. Searching across the web has not helped
me for the past few days. I might consider recreating everything from
scratch again for an attempt for jax-rs implementation.

Any help on the error above would be help. Might also just start another
thread since the subject would eventually become misleading...
-- 
View this message in context: 
http://www.nabble.com/-REST--HTTP-BINDING-Service-does-not-receive-Post-parameter-tp19986914p19991022.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to