Re: Rest GET params coming in null...

2007-08-01 Thread Brad Harper
I've debugged this down far enough to see that the GetModel object is being
interpreted correctly, but the id param is never bound to this object.  Any
thoughts?

On 7/31/07, Brad Harper [EMAIL PROTECTED] wrote:

 My get (all) requests (/services/rest/productTypes) are working.  They
 return xml like this...

 ns1:getProductTypesResponse
 ProductTypes
  descriptionPaper/description
  id10/id
 /ProductTypes
 ProductTypes
  descriptionCanvas/description
  id11/id
 /ProductTypes
 /ns1:getProductTypesResponse

 My get individual requests (/services/rest/productTypes/1) are failing
 because the id property of the GetModel object is null.

 Any ideas?   Code/config below

 config:
 bean id=RestServiceImpl class=
 com.gdservices.service.thirdparty.RestServiceImpl
 property name=daoFactory
 ref bean=hibernateDAOFactory/
 /property
 /bean
 !-- REST --
 jaxws:endpoint
   id=restRest
   implementor=#RestServiceImpl
   address=/rest
   bindingUri= http://apache.org/cxf/binding/http;
 jaxws:serviceFactory
 bean class=
 org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean
   property name=wrapped value=true /
 /bean
 /jaxws:serviceFactory
 /jaxws:endpoint

 Service:

 @WebService(
 targetNamespace =  http://restService.service.gdservices.com/;
 )
 public interface RestService {

 @Get
 @HttpResource(location=/productTypes)
 @WebResult(name = ProductTypes)
 public ListTpMetaData getProductTypes() throws ServiceException;

 @Get
 @HttpResource(location=/productTypes/{id})
 public TpMetaData getProductType(@WebParam(name = GetModel)GetModel
 getModel) throws ServiceException ;
 }


 Param Object:
 @XmlRootElement(name = GetModel)
 public class GetModel {
 private long id;


 public long getId() {
 return id;
 }

 public void setId(long id) {
 this.id = id;
 }
 }



Re: Rest GET params coming in null...

2007-08-01 Thread Mansour Raad

Just a shot in the dark herecould setting wrapped to false help ?
Mansour
:-)

On Aug 1, 2007, at 11:49 AM, Brad Harper wrote:

I've debugged this down far enough to see that the GetModel object  
is being
interpreted correctly, but the id param is never bound to this  
object.  Any

thoughts?

On 7/31/07, Brad Harper [EMAIL PROTECTED] wrote:


My get (all) requests (/services/rest/productTypes) are working.   
They

return xml like this...

ns1:getProductTypesResponse
ProductTypes
 descriptionPaper/description
 id10/id
/ProductTypes
ProductTypes
 descriptionCanvas/description
 id11/id
/ProductTypes
/ns1:getProductTypesResponse

My get individual requests (/services/rest/productTypes/1) are  
failing

because the id property of the GetModel object is null.

Any ideas?   Code/config below

config:
bean id=RestServiceImpl class=
com.gdservices.service.thirdparty.RestServiceImpl
property name=daoFactory
ref bean=hibernateDAOFactory/
/property
/bean
!-- REST --
jaxws:endpoint
  id=restRest
  implementor=#RestServiceImpl
  address=/rest
  bindingUri= http://apache.org/cxf/binding/http;
jaxws:serviceFactory
bean class=
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean
  property name=wrapped value=true /
/bean
/jaxws:serviceFactory
/jaxws:endpoint

Service:

@WebService(
targetNamespace =  http:// 
restService.service.gdservices.com/

)
public interface RestService {

@Get
@HttpResource(location=/productTypes)
@WebResult(name = ProductTypes)
public ListTpMetaData getProductTypes() throws  
ServiceException;


@Get
@HttpResource(location=/productTypes/{id})
public TpMetaData getProductType(@WebParam(name = GetModel) 
GetModel

getModel) throws ServiceException ;
}


Param Object:
@XmlRootElement(name = GetModel)
public class GetModel {
private long id;


public long getId() {
return id;
}

public void setId(long id) {
this.id = id;
}
}



Mansour
:-)





Re: Rest GET params coming in null...

2007-08-01 Thread Mansour Raad
BTW.there might be an issue with itI did try it using the  
restful_http_binding sample and no go.  Raised a JIRA


On Aug 1, 2007, at 2:01 PM, Brad Harper wrote:


Is that done with an annotation?

On 8/1/07, Mansour Raad [EMAIL PROTECTED] wrote:


Just a shot in the dark herecould setting wrapped to false help ?
Mansour
:-)

On Aug 1, 2007, at 11:49 AM, Brad Harper wrote:


I've debugged this down far enough to see that the GetModel object
is being
interpreted correctly, but the id param is never bound to this
object.  Any
thoughts?

On 7/31/07, Brad Harper [EMAIL PROTECTED] wrote:


My get (all) requests (/services/rest/productTypes) are working.
They
return xml like this...

ns1:getProductTypesResponse
ProductTypes
 descriptionPaper/description
 id10/id
/ProductTypes
ProductTypes
 descriptionCanvas/description
 id11/id
/ProductTypes
/ns1:getProductTypesResponse

My get individual requests (/services/rest/productTypes/1) are
failing
because the id property of the GetModel object is null.

Any ideas?   Code/config below

config:
bean id=RestServiceImpl class=
com.gdservices.service.thirdparty.RestServiceImpl
property name=daoFactory
ref bean=hibernateDAOFactory/
/property
/bean
!-- REST --
jaxws:endpoint
  id=restRest
  implementor=#RestServiceImpl
  address=/rest
  bindingUri= http://apache.org/cxf/binding/http;
jaxws:serviceFactory
bean class=
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean
  property name=wrapped value=true /
/bean
/jaxws:serviceFactory
/jaxws:endpoint

Service:

@WebService(
targetNamespace =  http://
restService.service.gdservices.com/
)
public interface RestService {

@Get
@HttpResource(location=/productTypes)
@WebResult(name = ProductTypes)
public ListTpMetaData getProductTypes() throws
ServiceException;

@Get
@HttpResource(location=/productTypes/{id})
public TpMetaData getProductType(@WebParam(name = GetModel)
GetModel
getModel) throws ServiceException ;
}


Param Object:
@XmlRootElement(name = GetModel)
public class GetModel {
private long id;


public long getId() {
return id;
}

public void setId(long id) {
this.id = id;
}
}



Mansour
:-)






Mansour
:-)





Re: Rest GET params coming in null...

2007-08-01 Thread Brad Harper
That worked actually.  Unfortunately, I don't understand technically why

-bh

On 8/1/07, Mansour Raad [EMAIL PROTECTED] wrote:

 BTW.there might be an issue with itI did try it using the
 restful_http_binding sample and no go.  Raised a JIRA

 On Aug 1, 2007, at 2:01 PM, Brad Harper wrote:

  Is that done with an annotation?
 
  On 8/1/07, Mansour Raad [EMAIL PROTECTED] wrote:
 
  Just a shot in the dark herecould setting wrapped to false help ?
  Mansour
  :-)
 
  On Aug 1, 2007, at 11:49 AM, Brad Harper wrote:
 
  I've debugged this down far enough to see that the GetModel object
  is being
  interpreted correctly, but the id param is never bound to this
  object.  Any
  thoughts?
 
  On 7/31/07, Brad Harper [EMAIL PROTECTED] wrote:
 
  My get (all) requests (/services/rest/productTypes) are working.
  They
  return xml like this...
 
  ns1:getProductTypesResponse
  ProductTypes
   descriptionPaper/description
   id10/id
  /ProductTypes
  ProductTypes
   descriptionCanvas/description
   id11/id
  /ProductTypes
  /ns1:getProductTypesResponse
 
  My get individual requests (/services/rest/productTypes/1) are
  failing
  because the id property of the GetModel object is null.
 
  Any ideas?   Code/config below
 
  config:
  bean id=RestServiceImpl class=
  com.gdservices.service.thirdparty.RestServiceImpl
  property name=daoFactory
  ref bean=hibernateDAOFactory/
  /property
  /bean
  !-- REST --
  jaxws:endpoint
id=restRest
implementor=#RestServiceImpl
address=/rest
bindingUri= http://apache.org/cxf/binding/http;
  jaxws:serviceFactory
  bean class=
  org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean
property name=wrapped value=true /
  /bean
  /jaxws:serviceFactory
  /jaxws:endpoint
 
  Service:
 
  @WebService(
  targetNamespace =  http://
  restService.service.gdservices.com/
  )
  public interface RestService {
 
  @Get
  @HttpResource(location=/productTypes)
  @WebResult(name = ProductTypes)
  public ListTpMetaData getProductTypes() throws
  ServiceException;
 
  @Get
  @HttpResource(location=/productTypes/{id})
  public TpMetaData getProductType(@WebParam(name = GetModel)
  GetModel
  getModel) throws ServiceException ;
  }
 
 
  Param Object:
  @XmlRootElement(name = GetModel)
  public class GetModel {
  private long id;
 
 
  public long getId() {
  return id;
  }
 
  public void setId(long id) {
  this.id = id;
  }
  }
 
 
  Mansour
  :-)
 
 
 
 

 Mansour
 :-)






Re: Rest GET params coming in null...

2007-08-01 Thread Brad Harper
Is that done with an annotation?

On 8/1/07, Mansour Raad [EMAIL PROTECTED] wrote:

 Just a shot in the dark herecould setting wrapped to false help ?
 Mansour
 :-)

 On Aug 1, 2007, at 11:49 AM, Brad Harper wrote:

  I've debugged this down far enough to see that the GetModel object
  is being
  interpreted correctly, but the id param is never bound to this
  object.  Any
  thoughts?
 
  On 7/31/07, Brad Harper [EMAIL PROTECTED] wrote:
 
  My get (all) requests (/services/rest/productTypes) are working.
  They
  return xml like this...
 
  ns1:getProductTypesResponse
  ProductTypes
   descriptionPaper/description
   id10/id
  /ProductTypes
  ProductTypes
   descriptionCanvas/description
   id11/id
  /ProductTypes
  /ns1:getProductTypesResponse
 
  My get individual requests (/services/rest/productTypes/1) are
  failing
  because the id property of the GetModel object is null.
 
  Any ideas?   Code/config below
 
  config:
  bean id=RestServiceImpl class=
  com.gdservices.service.thirdparty.RestServiceImpl
  property name=daoFactory
  ref bean=hibernateDAOFactory/
  /property
  /bean
  !-- REST --
  jaxws:endpoint
id=restRest
implementor=#RestServiceImpl
address=/rest
bindingUri= http://apache.org/cxf/binding/http;
  jaxws:serviceFactory
  bean class=
  org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean
property name=wrapped value=true /
  /bean
  /jaxws:serviceFactory
  /jaxws:endpoint
 
  Service:
 
  @WebService(
  targetNamespace =  http://
  restService.service.gdservices.com/
  )
  public interface RestService {
 
  @Get
  @HttpResource(location=/productTypes)
  @WebResult(name = ProductTypes)
  public ListTpMetaData getProductTypes() throws
  ServiceException;
 
  @Get
  @HttpResource(location=/productTypes/{id})
  public TpMetaData getProductType(@WebParam(name = GetModel)
  GetModel
  getModel) throws ServiceException ;
  }
 
 
  Param Object:
  @XmlRootElement(name = GetModel)
  public class GetModel {
  private long id;
 
 
  public long getId() {
  return id;
  }
 
  public void setId(long id) {
  this.id = id;
  }
  }
 

 Mansour
 :-)






Re: Rest GET params coming in null...

2007-08-01 Thread Mansour Raad
Check out http://cwiki.apache.org/CXF20DOC/http-binding.html and the  
bottom it explains the difference.

Sure why technically it makes a difference.

Mansour
:-)

On Aug 1, 2007, at 2:26 PM, Brad Harper wrote:

That worked actually.  Unfortunately, I don't understand  
technically why


-bh

On 8/1/07, Mansour Raad [EMAIL PROTECTED] wrote:


BTW.there might be an issue with itI did try it using the
restful_http_binding sample and no go.  Raised a JIRA

On Aug 1, 2007, at 2:01 PM, Brad Harper wrote:


Is that done with an annotation?

On 8/1/07, Mansour Raad [EMAIL PROTECTED] wrote:


Just a shot in the dark herecould setting wrapped to false  
help ?

Mansour
:-)

On Aug 1, 2007, at 11:49 AM, Brad Harper wrote:


I've debugged this down far enough to see that the GetModel object
is being
interpreted correctly, but the id param is never bound to this
object.  Any
thoughts?

On 7/31/07, Brad Harper [EMAIL PROTECTED] wrote:


My get (all) requests (/services/rest/productTypes) are working.
They
return xml like this...

ns1:getProductTypesResponse
ProductTypes
 descriptionPaper/description
 id10/id
/ProductTypes
ProductTypes
 descriptionCanvas/description
 id11/id
/ProductTypes
/ns1:getProductTypesResponse

My get individual requests (/services/rest/productTypes/1) are
failing
because the id property of the GetModel object is null.

Any ideas?   Code/config below

config:
bean id=RestServiceImpl class=
com.gdservices.service.thirdparty.RestServiceImpl
property name=daoFactory
ref bean=hibernateDAOFactory/
/property
/bean
!-- REST --
jaxws:endpoint
  id=restRest
  implementor=#RestServiceImpl
  address=/rest
  bindingUri= http://apache.org/cxf/binding/http;
jaxws:serviceFactory
bean class=
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean
  property name=wrapped value=true /
/bean
/jaxws:serviceFactory
/jaxws:endpoint

Service:

@WebService(
targetNamespace =  http://
restService.service.gdservices.com/
)
public interface RestService {

@Get
@HttpResource(location=/productTypes)
@WebResult(name = ProductTypes)
public ListTpMetaData getProductTypes() throws
ServiceException;

@Get
@HttpResource(location=/productTypes/{id})
public TpMetaData getProductType(@WebParam(name = GetModel)
GetModel
getModel) throws ServiceException ;
}


Param Object:
@XmlRootElement(name = GetModel)
public class GetModel {
private long id;


public long getId() {
return id;
}

public void setId(long id) {
this.id = id;
}
}



Mansour
:-)






Mansour
:-)






Mansour
:-)