创建可执行Jar时程序卡住

时间:2019-03-08 09:33:01

标签: java api web-services executable-jar

我已经使用https://api.n11.com/ws/OrderService.wsdl Api编写了一个程序。从netBeans编译时,程序按预期运行,但是在创建exe时卡住。 jar文件。我追踪到它并卡住了 这里。 “端口=新的OrderServicePortService()。getOrderServicePortSoap11();”不抛出错误。它永远不会回来。 jar文件是否有权限要求?

 private void formWindowOpened(java.awt.event.WindowEvent evt) {                                  

    try{
    authentication = new Authentication();
    authentication.setAppKey(strAppKey);
    authentication.setAppSecret(strAppSecret);

    OrderSearchPeriod orderSearchPeriod = new OrderSearchPeriod();
    orderSearchPeriod.setStartDate(strStartDate);
    orderSearchPeriod.setEndDate(strEndDate);

    OrderDataListRequest orderDataListRequest = new OrderDataListRequest();
    orderDataListRequest.setProductSellerCode(strProductSellerCode);
    orderDataListRequest.setRecipient(strRecipient);
    orderDataListRequest.setPeriod(orderSearchPeriod);
    orderDataListRequest.setBuyerName(strBuyerName);
    orderDataListRequest.setProductId(productIdValue);
    orderDataListRequest.setOrderNumber(strOrderNumber);
    orderDataListRequest.setStatus(strOrderStatus);

    RequestPagingData pagingData = new RequestPagingData();
    pagingData.setCurrentPage(currentPageValue);
    pagingData.setPageSize(pageSizeValue);

    OrderListRequest request = new OrderListRequest();
    request.setAuth(authentication);
    request.setPagingData(pagingData);
    request.setSearchData(orderDataListRequest);
    port = new OrderServicePortService().getOrderServicePortSoap11();
    OrderListResponse response = port.orderList(request);
    orderList = response.getOrderList().getOrder();
    for (OrderData sample : orderList) {
        list1.add("" + sample.getId());
    }
    if (!orderList.isEmpty()) list1.select(0);
    try {
        dirPath =new File(".").getCanonicalPath();
    } catch (IOException ex) {
        Logger.getLogger(NewJFrame.class.getName()).log(Level.SEVERE, null, ex);
    }
    PrintService[] printServices = PrintServiceLookup.lookupPrintServices(null, null);
    for (PrintService printer : printServices)
    {
       jComboBox2.addItem(printer.getName()); 
    }

    }
    catch(Exception e){
     JOptionPane.showMessageDialog(null, e.fillInStackTrace());
    }

0 个答案:

没有答案