cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "juan.velez" <juan.ve...@areva-td.com>
Subject Unsatisfied dependency expressed through constructor argument with index 2
Date Thu, 04 Sep 2008 16:38:45 GMT

I am getting a bunch of these messages. I am using CXF 2.1 and Spring 2.5. I
read about some issues with these kind of errors but it is claimed they have
been fixed in CXF 2.1.

I have placed my import statements at the top of the CXF-servlet.xml file.

<?xml version="1.0" encoding="UTF-8"?>

<!-- Configuration File for CXF -->
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:jaxws="http://cxf.apache.org/jaxws"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
       
    <import resource="classpath:META-INF/cxf/cxf.xml" />
    <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
    <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
    
    <bean id="exportService"
class="com.arevatd.tmg.mmi.business.services.support.CmiModelDataExportWsImpl"
scope="prototype" />
    
    <bean id="xmlBeansBean"
class="org.apache.cxf.xmlbeans.XmlBeansDataBinding" scope="prototype" />

    <bean id="exportServiceFactory"
class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean"
scope="singleton">
      <property name="dataBinding" ref="xmlBeansBean" />
    </bean>

    <jaxws:endpoint id="exportServiceEndPoint"
                   
implementor="com.arevatd.tmg.mmi.business.services.support.CmiModelDataExportWsImpl"
                    address="/export" >
        <jaxws:serviceFactory>
            <ref bean="exportServiceFactory" />
        </jaxws:serviceFactory>
    </jaxws:endpoint>

</beans>

This is my service and service implementation classes

package com.arevatd.tmg.mmi.business.services;

import javax.jws.Oneway;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;

import com.arevatd.tmg.mmi.shared.utils.ExportRequestFault;

import mmi.tmg.arevatd.com.xml.ExportRequestMessageType;


/**
 * Interface for the Import Service
 * 
 * @author jvelez
 *
 */
@WebService(name="MMIExportRequestPortType",
            targetNamespace="http://com.arevatd.tmg.mmi/xml/wsdl")
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
public interface CmiModelDataExportWs {
    /**
     * The actual operation for this web service: perform an export of CMI
Model Data
     * 
     * @param request The Request to export a e-terrasource export project 
     */
    @WebMethod(operationName = "performExportRequest", action =
"performExportRequest")
    @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
    @Oneway()
    public void exportCmiModelData(
        @WebParam(targetNamespace = "http://com.arevatd.tmg.mmi/xml",
                  partName="request",
                  name = "ExportRequestMessage")
        ExportRequestMessageType request) throws ExportRequestFault;
}




package com.arevatd.tmg.mmi.business.services.support;

import java.util.logging.Logger;

import javax.jws.WebService;
import javax.xml.ws.BindingType;

import com.arevatd.tmg.mmi.business.services.CmiModelDataExportWs;
import com.arevatd.tmg.mmi.shared.utils.ExportRequestFault;

import mmi.tmg.arevatd.com.xml.ExportRequestFaultType;
import mmi.tmg.arevatd.com.xml.ExportRequestMessageType;


/**
 * Implementation for the CmiModelDataExportWs Web Service
 * 
 * @author jvelez
 *
 */
@WebService(endpointInterface="com.arevatd.tmg.mmi.business.services.CmiModelDataExportWs",
            targetNamespace="http://com.arevatd.tmg.mmi/xml/wsdl",
            portName="MMIExportRequestPort",
            serviceName="MMIExportRequestService",
            name="MMIExportRequestPortType")
@BindingType(value=javax.xml.ws.soap.SOAPBinding.SOAP11HTTP_BINDING)
public class CmiModelDataExportWsImpl implements CmiModelDataExportWs {
    private final Logger logger =
Logger.getLogger(this.getClass().getName());

    public void exportCmiModelData(ExportRequestMessageType request)
    throws ExportRequestFault {
        logger.info("Application=" + request.getApplication());
        logger.info("Environment=" + request.getEnvironment());
        logger.info("Directory=" + request.getDirectoryName());
        logger.info("File=" + request.getFilename());
        logger.info("Export Request Id=" + request.getRequestId());
        
        ExportRequestFaultType faultInfo =
ExportRequestFaultType.Factory.newInstance();
        faultInfo.setMessage("Testing");
        faultInfo.setDetails("Faults");

        throw new ExportRequestFault("A problem occurred", faultInfo);
    }
}

Any advice will be gladly appreciated

Juan
-- 
View this message in context: http://www.nabble.com/Unsatisfied-dependency-expressed-through-constructor-argument-with-index-2-tp19314678p19314678.html
Sent from the cxf-user mailing list archive at Nabble.com.


Mime
View raw message