Re: POSTing customer using REST

2007-07-24 Thread Mansour Raad
Good pointer...had to introduce to the classpath the compiled file  
package-info.java with the following content


@javax.xml.bind.annotation.XmlSchema(
namespace = http://customer.acme.com;,
elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED
) package com.acme.customer;

and all is fine.  Thanks.


On Jul 24, 2007, at 2:38 AM, Liu, Jervis wrote:

Hi Mansour, do you have targetNamespace attribute defined in your  
WebService annotation, such as @WebService(targetNamespace =  
http://book.acme.com;)? This targetNamespace is needed for marshal/ 
unmarshal between input and your Customer object. There were  
similar problem reported in the mailing list when targetNamespace  
is missing. If this does not help, you may want to post out your  
service interface/impl code.


Thanks,
Jervis

-Original Message-
From: Mansour Raad [mailto:[EMAIL PROTECTED]
Sent: 2007?7?24? 9:49
To: cxf-user@incubator.apache.org
Subject: POSTing customer using REST


Given the customer http rest sample, I defined a spring config with
the following endpoint:

jaxws:endpoint
 id=customerServiceXML
 implementor=com.esri.aws.CustomerService
 address=/xml
 bindingUri=http://apache.org/cxf/binding/http;
 jaxws:serviceFactory
 bean
class=org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean
 property name=wrapped value=false/
 /bean
 /jaxws:serviceFactory
 /jaxws:endpoint

I'm bootstrapping CXF from tomcat using the following web.xml

 context-param
 param-namecontextConfigLocation/param-name
 param-valueclasspath:applicationContext.xml/param-value
 /context-param

 listener
 display-nameSpring Context Loader/display-name
 listener-
classorg.springframework.web.context.ContextLoaderListener/listener-
class
 /listener

 servlet
 servlet-nameCXFServlet/servlet-name
 servlet-classorg.apache.cxf.transport.servlet.CXFServlet/
servlet-class
 load-on-startup1/load-on-startup
 /servlet

 servlet-mapping
 servlet-nameCXFServlet/servlet-name
 url-pattern/cxf/*/url-pattern
 /servlet-mapping

When I post a request using

wget --post-file add.xml http://localhost:8080/cxf/xml/customers

I can see the function being called, however the name is null in the
customer argument  any clues 

Thanks.
Mansour
:-)




IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4,  
Ireland




Mansour
:-)





POSTing customer using REST

2007-07-23 Thread Mansour Raad
Given the customer http rest sample, I defined a spring config with  
the following endpoint:


jaxws:endpoint
id=customerServiceXML
implementor=com.esri.aws.CustomerService
address=/xml
bindingUri=http://apache.org/cxf/binding/http;
jaxws:serviceFactory
bean  
class=org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean

property name=wrapped value=false/
/bean
/jaxws:serviceFactory
/jaxws:endpoint

I'm bootstrapping CXF from tomcat using the following web.xml

context-param
param-namecontextConfigLocation/param-name
param-valueclasspath:applicationContext.xml/param-value
/context-param

listener
display-nameSpring Context Loader/display-name
listener- 
classorg.springframework.web.context.ContextLoaderListener/listener- 
class

/listener

servlet
servlet-nameCXFServlet/servlet-name
servlet-classorg.apache.cxf.transport.servlet.CXFServlet/ 
servlet-class

load-on-startup1/load-on-startup
/servlet

servlet-mapping
servlet-nameCXFServlet/servlet-name
url-pattern/cxf/*/url-pattern
/servlet-mapping

When I post a request using

wget --post-file add.xml http://localhost:8080/cxf/xml/customers

I can see the function being called, however the name is null in the  
customer argument  any clues 


Thanks.
Mansour
:-)