package com.yeejoin.amos.avic.config;

import javax.xml.ws.Endpoint;

import org.apache.cxf.Bus;
import org.apache.cxf.jaxws.EndpointImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.yeejoin.amos.avic.face.webservice.FileFransferService;

@Configuration
public class CxfConfig {
	
	@Autowired
	FileFransferService fileFransferService;
	@Autowired
    private Bus bus;
	
	@Bean
	public Endpoint endpoint() {
		EndpointImpl endpoint = new EndpointImpl(bus, fileFransferService);
		endpoint.publish("/fileFransfer");
		return endpoint;
	}
}
