Advertisement
Guest User

Untitled

a guest
Feb 9th, 2017
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. **
  2. *
  3. */
  4. package com.xxxxx.www.testprocess;
  5. import javax.jws.*;
  6.  
  7. import java.sql.*;
  8. import java.util.*;
  9. /**
  10. * @author Suryasol6
  11. *
  12. */
  13. @WebService(name="TestProcess",targetNamespace ="http://www.example.org/TestProcess")
  14. public class TestProcess {
  15. private Connection connect = null;
  16. private Statement statement = null;
  17. private PreparedStatement ps = null;
  18. private ResultSet rs = null;
  19. private static final String CONNECTION_URL = "jdbc:mysql://localhost:3306/java_test?user=root&;password=";
  20.  
  21. @WebMethod(action="http://www.example.org/TestProcess/TestLogin")
  22. @WebResult(name="TestLoginresponse")
  23. public String TestLogin(@WebParam(name="name")
  24. String name,@WebParam(name="password")
  25. String password)
  26. {
  27. try
  28. {
  29. Class.forName("com.mysql.jdbc.Driver").newInstance();
  30. }
  31. catch(Exception e)
  32. {
  33. return "fail here";
  34. }
  35. return "pass";
  36. }
  37.  
  38. }
  39.  
  40. <JBoss_home>/server/default/lib
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement