title: How to pass null value in RESTful web service for a GET Method?
body: <p>I Currently have a <strong>RESTFul</strong> web Service exposed using <strong>CXF</strong>. The Method looks like this.</p>
  
  <pre><code>@GET
  @Path("/getProfile/{memberno}/{userid}/{channelid}")
  @Consumes("application/xml")
  public MaintainCustomerProductResponse getUserDetails(
          @PathParam("memberno") String membernumber,
          @PathParam("userid") String userid,
          @PathParam("channelid") String channelid){
  //DO Some Logic here.
  }
  </code></pre>
  
  <p>This can be accessed via following URL &amp; on submitting valid data I get response.</p>
  
  <pre><code>http://server.com:8080/UserService/getProfile/{memberno}/{userid}/{channelid}
  </code></pre>
  
  <p>Question: How can I pass null value for <code>userid</code> ?</p>
  
  <p>If I simple ignore the <code>{userId}</code> the request is'nt hitting on the server side web service.</p>
  
  <p>Example</p>
  
  <pre><code>http://server.com:8080/UserService/getProfile/1001//1
  </code></pre>
  
  <p>Note: I'm using <code>SOAPUi</code> for Testing and without giving <code>userId</code> value I see following response on <code>SOAPUI</code> and Request doesn't hit the server.</p>
  
  <p>SOAPUI Response</p>
  
  <pre><code>&lt;data contentType="null" contentLength="0"&gt;&lt;![CDATA[]]&gt;&lt;/data&gt;
  </code></pre>