You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
879 B
32 lines
879 B
2 years ago
|
package com.jianshui.api.config;
|
||
|
|
||
|
import com.jianshui.api.controller.webservice.income.v1.InvoiceCheckWebService;
|
||
|
import org.apache.cxf.Bus;
|
||
|
import org.apache.cxf.bus.spring.SpringBus;
|
||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||
|
import org.springframework.context.annotation.Bean;
|
||
|
import org.springframework.context.annotation.Configuration;
|
||
|
import org.apache.cxf.jaxws.EndpointImpl;
|
||
|
|
||
|
import javax.xml.ws.Endpoint;
|
||
|
|
||
|
@Configuration
|
||
|
public class WebServiceConfig {
|
||
|
|
||
|
@Autowired
|
||
|
private InvoiceCheckWebService invoiceCheckWebService;
|
||
|
|
||
|
@Bean(name = Bus.DEFAULT_BUS_ID)
|
||
|
public SpringBus springBus() {
|
||
|
return new SpringBus();
|
||
|
}
|
||
|
|
||
|
@Bean
|
||
|
public Endpoint endpoint() {
|
||
|
EndpointImpl endpoint = new EndpointImpl(springBus(), invoiceCheckWebService);
|
||
|
endpoint.publish("/income/v1/check");
|
||
|
return endpoint;
|
||
|
}
|
||
|
|
||
|
}
|