I have tried the example
http://cwiki.apache.org/CXF20DOC/writing-a-service-with-spring.html for
setting up a service. My service has a DAO going against my database. This
service works just fine external using SoapUI when deployed into tomcat.

But I want to deploy to embeded tomcat, and execute via testNG. When I use
the following test client:

    *<bean id="userClient"
class="com.baselogic.service.impl.UserManagerImpl"
          factory-bean="userClientFactory" factory-method="create"/>

    <!-- Factory to create the dynamic proxy -->
    <bean id="userClientFactory"
class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
        <property name="serviceClass"
value="com.baselogic.service.UserManager"/>
        <property name="address" value="
http://localhost:8080/webapp-2.2/cxf/UserService"/>
    </bean>


**From my UserManagerImpl:
**
**    public User getUser(String userId) throws UserNotFoundException {*
*
log.debug("======================================================");*
*        log.debug("getUser(String userId) " + userId);*
*
log.debug("======================================================");*

*        User user = userDao.read(Long.valueOf(userId));*
*        if(user == null){*
*            throw new UserNotFoundException("user " + userId + " Not
Found");*
*        }*
*        return user;*
*    }*
*
*
I seem to get a version of com.baselogic.service.UserManager that was
proxied that does not have any of my debug statements or the doa. Thus I get
back a null object, and nothing is printed.

So what is the proper usage for me to start a cxf client to access a
deployed webservice to my embeded container so that is uses the deployed
service, and does not re-create a new one?



-- 
Thanks,
Mick Knutson

http://www.baselogic.com
http://www.blincmagazine.com
http://www.linkedin.com/in/mickknutson
http://www.djmick.com
http://www.myspace.com/mickknutson
http://www.myspace.com/BLiNCMagazine
http://tahoe.baselogic.com
---

Reply via email to