[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[swordfish-dev] Apache CXF

Title: Apache CXF

Hello!

I have a question about CXF and JAX-WS in Swordfish. I am not so experienced in CXF ;-)

Have generated a Service Provider with the swordfish tool- wizard (works perfect!!). 

In my ServiceImpl class I want to inject an object at service invokation. Find attached the Impl and the bean-config.xml


1) ServiceImpl

public class LocationUpdaterImpl implements LocationUpdater {

    private static final Logger LOG = Logger.getLogger(LocationUpdaterImpl.class.getName());
    private IConnection connection;

    public IConnection getConnection() {
                return connection;
        }
   
    public void setConnection(IConnection connection) {
                this.connection = connection;
        }

    public java.lang.String update(com.mm_karton.locationupdater.LocationPojo in) {
        connection.do_something();
        ...
    }

2) bean-config.xml

        <bean id="conenctionService"
                class="com.mm_karton.locationupdater.LocationUpdaterImpl"
                p:connection-ref="connectionServiceHelper">
        </bean>
       
        <osgi:reference id="connectionServiceHelper"
                      interface="com.mmkarton.mui.dbconnection.IConnection"/>


However, this works fine when starting the swordfish runtime, but when invoking the update methode from WebService, connection is not set and is null?

Is my spring cfg file incorrect? Is there an other parameter I can use?

Thanks a lot for every help!
Chris