Hi all,

I'm implementing an unwrapped REST web service using HTTP Binding, deployed
on JBoss, using Spring. 
In a specific method I need to use a class that's extending other as a web
parameter. Lets say:


The web service:
@Post 
@HttpResource(location="/auth")
public String authenticate(@WebParam(name="AuthRequest") AuthRequest
request);       


AuthRequest:
public class AuthRequest extends GenericRequest{
        
        final static long serialVersionUID = 1L;

        public AuthRequest() {  
                super();
        }

        public AuthRequest(Integer applicationId, String password, String 
login) {
                super(applicationId, password, login);
        }


And GenericRequest..
public class GenericRequest implements Serializable {

    public GenericRequest(){
        
    }
        

        public GenericRequest(Integer applicationId, String password, String 
login)
{
                super();
                this.applicationId = applicationId;
                this.password = password;
                this.login = login;
        }
        
    private static final long serialVersionUID = 5037815176301473091L;

    private Integer applicationId;

    private String password;

    private String login;
   
    ... and further setters and getters...


Wasn't this supposed to work?? 
I'm getting the following exception instead:

INFO: Interceptor has thrown exception, unwinding now
java.lang.NullPointerException
        at
org.apache.cxf.binding.http.IriDecoderHelper.interopolateParams(IriDecoderHelper.java:306)
        at
org.apache.cxf.binding.http.interceptor.URIParameterInInterceptor.mergeParams(URIParameterInInterceptor.java:122)
        at
org.apache.cxf.binding.http.interceptor.URIParameterInInterceptor.handleMessage(URIParameterInInterceptor.java:103)
        at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:220)
        at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:78)
        at
org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:92)

(...)


Thanks in advance,
Rui Ramos


-- 
View this message in context: 
http://www.nabble.com/CXF-problem-using-extended-class-as-Web-Param-tp15721500p15721500.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to