AqsszxysscTest.java 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. package com.jtgh.yjpt.test;
  2. import java.net.URL;
  3. import org.junit.Test;
  4. import org.junit.runner.RunWith;
  5. import org.springframework.test.context.ContextConfiguration;
  6. import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
  7. import com.jtgh.yjpt.client.common.AuthHandlerResolver;
  8. import com.jtgh.yjpt.common.Constants;
  9. @RunWith(SpringJUnit4ClassRunner.class)
  10. @ContextConfiguration("/spring/applicationContext*.xml")
  11. public class AqsszxysscTest {
  12. @Test
  13. public void simpleProcessTest() {
  14. try {
  15. URL wsdlLocation = com.jtgh.yjpt.client.aqsszxys.AqsszxysService
  16. .getWsdlLocationByIp(Constants.WEBSERVICE_IP,
  17. Constants.WEBSERVICE_PORT);
  18. com.jtgh.yjpt.client.aqsszxys.AqsszxysService aqsszxysService = new com.jtgh.yjpt.client.aqsszxys.AqsszxysService(
  19. wsdlLocation,
  20. com.jtgh.yjpt.client.aqsszxys.AqsszxysService.AQSSZXYSSERVICE_QNAME);
  21. aqsszxysService
  22. .setHandlerResolver(new AuthHandlerResolver(
  23. com.jtgh.yjpt.client.aqsszxys.AqsszxysService.AQSSZXYSSERVICE_QNAME));
  24. aqsszxysService.getAqsszxysWebServicePort();
  25. } catch (Exception e) {
  26. e.printStackTrace();
  27. }
  28. }
  29. }