CxfConfig.java 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. //package com.malk.hangshi.config;
  2. //
  3. //import com.malk.hangshi.service.IH3yunWebService;
  4. //import com.malk.hangshi.service.impl.H3yunWebServiceImpl;
  5. //import org.apache.cxf.Bus;
  6. //import org.apache.cxf.bus.spring.SpringBus;
  7. //import org.apache.cxf.jaxws.EndpointImpl;
  8. //import org.apache.cxf.phase.Phase;
  9. //import org.apache.cxf.transport.servlet.CXFServlet;
  10. //import org.springframework.boot.web.servlet.ServletRegistrationBean;
  11. //import org.springframework.context.annotation.Bean;
  12. //import org.springframework.context.annotation.Configuration;
  13. //
  14. //import javax.xml.ws.Endpoint;
  15. //
  16. //
  17. //@Configuration
  18. //public class CxfConfig {
  19. //
  20. // /**
  21. // * 访问路径: http://localhost:9001/api/webService/api?wsdl
  22. // * -
  23. // * invoke: mc可自定义, test为方法名称, arg0第一次参数
  24. // * -
  25. // * <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mc="http://service.hangshi.malk.com">
  26. // *   <soap:Body>
  27. // *     <mc:test>
  28. // *       <arg0>[{"assetNo":"1","barCode":"1","belongDept":"1","boxBarCode":"1","cap":"1","chkDate"madeDate":158688000000}]</arg0>
  29. // *     </mc:test>
  30. // *   </soap:Body>
  31. // * </soap:Envelope>
  32. // * -
  33. // *
  34. // * @WebParam 自定义参数名称, 否则就是 arg0, arg1, ...
  35. // */
  36. //
  37. // @Bean
  38. // public ServletRegistrationBean disServlet() {
  39. // return new ServletRegistrationBean(new CXFServlet(), "/hangshi/ws/*");
  40. // }
  41. //
  42. // @Bean(name = Bus.DEFAULT_BUS_ID)
  43. // public SpringBus springBus() {
  44. // return new SpringBus();
  45. // }
  46. //
  47. //// @Bean
  48. //// public InvoiceWebService demoService() {
  49. //// return new InvoiceWebServiceImpl();
  50. //// }
  51. //
  52. // @Bean
  53. // public IH3yunWebService demoService() {
  54. // return new H3yunWebServiceImpl();
  55. // }
  56. //
  57. // @Bean
  58. // public Endpoint endpoint() {
  59. // EndpointImpl endpoint = new EndpointImpl(springBus(), demoService());
  60. // // 请求拦截器
  61. // endpoint.getInInterceptors().add(new WsInInterceptor(Phase.RECEIVE));
  62. // // 响应拦截器
  63. //// endpoint.getOutInterceptors().add(new WsOutInterceptor(Phase.PRE_STREAM));
  64. // endpoint.publish("/invoke.asmx");
  65. // return endpoint;
  66. // }
  67. //
  68. //}