Guest User

Untitled

a guest
Jan 23rd, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.04 KB | None | 0 0
  1. package co.com.tennis.Main;
  2.  
  3. import co.com.tennis.DAO.daoDatosServicio;
  4. import co.com.tennis.DAO.daoDatosServicioImpl;
  5. import co.com.tennis.DAO.datosServicio;
  6. import co.com.tennis.Proxy.IEnvioDatosWs;
  7. import co.com.tennis.Proxy.envioDatosWsImpl;
  8. import java.math.BigDecimal;
  9. import java.util.ArrayList;
  10. import java.util.Date;
  11. import java.util.GregorianCalendar;
  12. import javax.xml.datatype.DatatypeConfigurationException;
  13. import javax.xml.datatype.DatatypeFactory;
  14. import javax.xml.datatype.XMLGregorianCalendar;
  15.  
  16. public class Main {
  17.  
  18. private static String Valor;
  19.  
  20. public static void main(String[] args) throws DatatypeConfigurationException, Exception {
  21.  
  22.  
  23. // daoDatosServicio objDao = new daoDatosServicioImpl();
  24. // String returnVal = null;
  25. // ArrayList<datosServicio> arrDatos = objDao.consultar();
  26. //
  27. // for (int i = 0; i < arrDatos.size(); i++) {
  28. // datosServicio obj_datos = arrDatos.get(i);
  29. //
  30. // try {
  31. //
  32. // obj_datos.getcNroOrden();
  33. // obj_datos.getdFechaEmision();
  34. // obj_datos.getdFechaEstimadaEntrega();
  35. // obj_datos.getNitImportador();
  36. // obj_datos.getNombreImportador();
  37. // obj_datos.getDireccionImportador();
  38. // obj_datos.getDepartamentoImportador();
  39. // obj_datos.getCiudadImportador();
  40. // obj_datos.getTelefonoImportador();
  41. // obj_datos.getFaxImportador();
  42. // obj_datos.getNombreRepresentanteLegal();
  43. // obj_datos.getCedulaRepresentanteLegal();
  44. // obj_datos.getNombreProveedor();
  45. // obj_datos.getDireccionProveedor();
  46. // obj_datos.getTelefonoProveedor();
  47. // obj_datos.getMonedaProveedor();
  48. // obj_datos.getPaisProveedor();
  49. // obj_datos.getCiudadProveedor();
  50. // obj_datos.getCorreoProveedor();
  51. // obj_datos.getContactoProveedor();
  52. // obj_datos.getCodigoMonedaOrdenCompra();
  53. // obj_datos.getDescripcionMonedaOrdenCompra();
  54. // obj_datos.getObservaciones();
  55. // obj_datos.getEstado();
  56. // obj_datos.getReferencia();
  57. // obj_datos.getCodigoInternoInsumo();
  58. // obj_datos.getNombreInsumo();
  59. // obj_datos.getPosicionAranlariaInsumo();
  60. // obj_datos.getUnidadInsumo();
  61. // obj_datos.getPaisOrigenItem();
  62. // obj_datos.getCantidadItem();
  63. // obj_datos.getUnidadItem();
  64. // obj_datos.getValorUnitarioItem();
  65. // obj_datos.getValorUnitarioItemOtraMoneda();
  66. //
  67. // } catch (java.lang.IndexOutOfBoundsException ex) {
  68. // } catch (Exception ex) {
  69. // } catch (Throwable t) {
  70. // }
  71. //****
  72.  
  73.  
  74. /*
  75. -Dhttp.proxyHost=10.10.5.4
  76. -Dhttp.proxyPort=3128
  77. -Dhttp.proxyUser=oalopez
  78. -Dhttp.proxyPassword=oaco20
  79. */
  80.  
  81. IEnvioDatosWs objWso = new envioDatosWsImpl();
  82.  
  83. GregorianCalendar gcal = new GregorianCalendar();
  84. XMLGregorianCalendar fec = DatatypeFactory.newInstance().newXMLGregorianCalendar(gcal);
  85. XMLGregorianCalendar hor = DatatypeFactory.newInstance().newXMLGregorianCalendar(gcal);
  86.  
  87. String fecha_actual = "2010/04/26";
  88. String hora_actual = "17:45:20";
  89.  
  90.  
  91. String[] fec_part = fecha_actual.split("/");
  92. String[] hor_part = hora_actual.split(":");
  93.  
  94.  
  95.  
  96. hor.setHour(Integer.parseInt(hor_part[0]));
  97. hor.setMinute(Integer.parseInt(hor_part[1]));
  98. hor.setSecond(Integer.parseInt(hor_part[2]));
  99. fec.setYear(Integer.parseInt(fec_part[0]));
  100. fec.setMonth(Integer.parseInt(fec_part[1]));
  101. fec.setDay(Integer.parseInt(fec_part[2]));
  102.  
  103. BigDecimal Value = new BigDecimal(1);
  104.  
  105. System.out.print(objWso.trasladar("1",
  106. null,
  107. null,
  108. "1",
  109. "nombreim",
  110. "direccionim",
  111. "departamentoim",
  112. "ciudadimportador",
  113. "telefonoImportador",
  114. "Faximportador",
  115. "nombreRepresentante",
  116. "CedulaRepresentante",
  117. "nombreProveedor",
  118. "direccionProveedor",
  119. "telefonoProvedor",
  120. "monedaProvedor",
  121. "paisProvedor",
  122. "ciudadProvedor",
  123. "correoProvedor",
  124. "contactoProvedor",
  125. "codigMonedaPo",
  126. "DescripcionMonedaPo",
  127. "Observaciones",
  128. "Estado",
  129. "1",
  130. "1",
  131. "nombreInsumo",
  132. "posicionArancelaria",
  133. "UnidadInsumo",
  134. "PaisOrigen",
  135. Value,
  136. "UnidadItem",
  137. Value,
  138. Value));
  139. // }
  140. //
  141.  
  142.  
  143. }
  144. }
Add Comment
Please, Sign In to add comment