TIPTOPServiceGateWay.java 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. package beans.uploaderpdata.erpservice;
  2. import org.apache.cxf.frontend.ClientProxy;
  3. import org.apache.cxf.transport.http.HTTPConduit;
  4. import org.apache.cxf.transports.http.configuration.HTTPClientPolicy;
  5. import java.net.MalformedURLException;
  6. import java.net.URL;
  7. import javax.xml.namespace.QName;
  8. import javax.xml.ws.Service;
  9. import javax.xml.ws.WebEndpoint;
  10. import javax.xml.ws.WebServiceClient;
  11. import javax.xml.ws.WebServiceException;
  12. import javax.xml.ws.WebServiceFeature;
  13. /**
  14. * This class was generated by the JAX-WS RI.
  15. * JAX-WS RI 2.2.9-b130926.1035
  16. * Generated source version: 2.2
  17. *
  18. */
  19. @WebServiceClient(name = "TIPTOPServiceGateWay", targetNamespace = "http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay", wsdlLocation = "file:C://Users//Administrator//Desktop//aws_ttsrv2.xml")
  20. public class TIPTOPServiceGateWay
  21. extends Service
  22. {
  23. private final static URL TIPTOPSERVICEGATEWAY_WSDL_LOCATION;
  24. private final static WebServiceException TIPTOPSERVICEGATEWAY_EXCEPTION;
  25. private final static QName TIPTOPSERVICEGATEWAY_QNAME = new QName("http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay", "TIPTOPServiceGateWay");
  26. static {
  27. URL url = null;
  28. WebServiceException e = null;
  29. try {
  30. //url = new URL("http://192.168.10.115/web/ws/r/aws_ttsrv2_toptest?WSDL");
  31. //url = new URL("file:C://Users//Administrator//Desktop//aws_ttsrv2_toptest.xml");
  32. url = new URL("file:C://Users//Administrator//Desktop//aws_ttsrv2.xml");
  33. } catch (MalformedURLException ex) {
  34. e = new WebServiceException(ex);
  35. }
  36. TIPTOPSERVICEGATEWAY_WSDL_LOCATION = url;
  37. TIPTOPSERVICEGATEWAY_EXCEPTION = e;
  38. }
  39. public TIPTOPServiceGateWay() {
  40. super(__getWsdlLocation(), TIPTOPSERVICEGATEWAY_QNAME);
  41. }
  42. public TIPTOPServiceGateWay(WebServiceFeature... features) {
  43. super(__getWsdlLocation(), TIPTOPSERVICEGATEWAY_QNAME, features);
  44. }
  45. public TIPTOPServiceGateWay(URL wsdlLocation) {
  46. super(wsdlLocation, TIPTOPSERVICEGATEWAY_QNAME);
  47. }
  48. public TIPTOPServiceGateWay(URL wsdlLocation, WebServiceFeature... features) {
  49. super(wsdlLocation, TIPTOPSERVICEGATEWAY_QNAME, features);
  50. }
  51. public TIPTOPServiceGateWay(URL wsdlLocation, QName serviceName) {
  52. super(wsdlLocation, serviceName);
  53. }
  54. public TIPTOPServiceGateWay(URL wsdlLocation, QName serviceName, WebServiceFeature... features) {
  55. super(wsdlLocation, serviceName, features);
  56. }
  57. /**
  58. *
  59. * @return
  60. * returns TIPTOPServiceGateWayPortType
  61. */
  62. @WebEndpoint(name = "TIPTOPServiceGateWayPortType")
  63. public TIPTOPServiceGateWayPortType getTIPTOPServiceGateWayPortType() {
  64. TIPTOPServiceGateWayPortType portType=super.getPort(new QName("http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay", "TIPTOPServiceGateWayPortType"), TIPTOPServiceGateWayPortType.class);
  65. //���service ��������TIPTOPServiceGateWayPortType
  66. org.apache.cxf.endpoint.Client client = ClientProxy.getClient(portType);
  67. HTTPConduit http = (HTTPConduit) client.getConduit();
  68. HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
  69. httpClientPolicy.setConnectionTimeout(36000);
  70. httpClientPolicy.setAllowChunking(false);
  71. http.setClient(httpClientPolicy);
  72. return portType;
  73. }
  74. /**
  75. *
  76. * @param features
  77. * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values.
  78. * @return
  79. * returns TIPTOPServiceGateWayPortType
  80. */
  81. @WebEndpoint(name = "TIPTOPServiceGateWayPortType")
  82. public TIPTOPServiceGateWayPortType getTIPTOPServiceGateWayPortType(WebServiceFeature... features) {
  83. return super.getPort(new QName("http://www.dsc.com.tw/tiptop/TIPTOPServiceGateWay", "TIPTOPServiceGateWayPortType"), TIPTOPServiceGateWayPortType.class, features);
  84. }
  85. private static URL __getWsdlLocation() {
  86. if (TIPTOPSERVICEGATEWAY_EXCEPTION!= null) {
  87. throw TIPTOPSERVICEGATEWAY_EXCEPTION;
  88. }
  89. return TIPTOPSERVICEGATEWAY_WSDL_LOCATION;
  90. }
  91. }