Hi.

Let me explain the problem I have. First of all, I have one CXF-SE component
without BC. In the xbean I define a bean 
<bean id="commandParserFactory"
class="hr.hrvoje.example.CommandParserFactory">
                <property name="stationManager">
                        <cxfse:proxy service="station:StationManagerService"
type="hr.hrvoje.example.StationManager" />
                </property>
</bean>
(note that this is not a CXF component)

For the other CXF I have an SE and BC. The following interface is defined:
@WebService(name = "StationManagerPortType", targetNamespace =
"http://example.hrvoje.hr/station";)
public interface StationManager {
        /**
         * Return the complete list of the stations
         * @return the list of the stations as it is in the database
         */
        public List<Station> getStations();
        
}
and the implementation of that interface:

@WebService(endpointInterface = "hr.hrvoje.example.StationManager",
serviceName = "StationManagerService", targetNamespace =
"http://example.hrvoje.hr/station";)
public class StationManagerService implements StationManager{
        
        @Override
        public List<Station> getStations() {
                List<Station> stations=stationManagerBusiness.getStations();
                return stations;
        }
}

In the second xbean I have:
<cxfse:endpoint>
                <cxfse:pojo>
                        <bean class="hr.hrvoje.example.StationManagerService">
                        </bean>
                </cxfse:pojo>
</cxfse:endpoint>

BC is defined as follows:

<cxfbc:consumer 
                wsdl="classpath:StationManager.wsdl" 
                targetService="station:StationManagerService" 
                targetInterface="station:StationmanagerPortType" />

The getStations method reads a list of parameters from the database.

The CommandParserFactory is an SSH command prompt tool and that works fine.
I see the proxy and can invoke a method on the proxy (getStations). Also,
using the SoapUI I can invoke the service and I get the list of stations
from the database. But when I invoke the method through the proxy from the
CommandParserFactory I get an empty list although the return list has three
elements. 

What I did, and that worked is I've created @RequestWrapper and
@ResponseWrapper for getStations method but I don't like that solution and
I'm looking for a more elegant one.

Thank you.

--
View this message in context: 
http://servicemix.396122.n5.nabble.com/CXF-proxy-problem-tp4506596p4509959.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to