powered by simpleCommunicator - 2.0.61     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / Java [игнор отключен] [закрыт для гостей] / Не запускается клиенское приложение с сервлетами
8 сообщений из 8, страница 1 из 1
Не запускается клиенское приложение с сервлетами
    #39062408
arCHi_1887
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Есть проект с сервисом, и клиентом. Клиент написан с использованием технологии сервлетов. Написан в Idea. Пытаюсь его запустить.

Задеплоить пытаюсь так:
http://radikal.ru/fp/471dbc7261f146eb9308791e129c56ad][img] http://i058.radikal.ru/1509/b7/07089978f983t.jpg [/img]

При запуске приложения при обращении к localhost:8080/client - Ошибка 404; при обращении к localhost:8080 тоже:

http://radikal.ru/big/7673ed1da4f94354a96f40f65ea353a8][img] http://i057.radikal.ru/1509/87/b5990b385513.jpg [/img].

При этом в Idea видно, что оба запущены:
http://radikal.ru/big/106831c585e046c2b1baa3fd8c5e1f0c][img] http://s019.radikal.ru/i639/1509/ef/8a3b5804d17c.jpg [/img].

web.xml клиента:
web.xml
Код: xml
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
85.
86.
87.
88.
89.
90.
91.
92.
93.
94.
95.
96.
97.
98.
99.
100.
101.
102.
103.
104.
105.
106.
107.
108.
109.
110.
111.
112.
113.
114.
115.
116.
117.
118.
119.
120.
121.
122.
123.
124.
125.
126.
127.
128.
129.
<?xml version="1.0" encoding="UTF-8" ?>

<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
         version="2.4">

    <display-name>Pizza Client Application</display-name>

    <!-- Admin area-->
    <servlet>
        <servlet-name>LoginController</servlet-name>
        <servlet-class>by.bsuir.web.controller.LoginController</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>LogoutController</servlet-name>
        <servlet-class>by.bsuir.web.controller.LogoutController</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>UserController</servlet-name>
        <servlet-class>by.bsuir.web.controller.admin.UserController</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>UserAddController</servlet-name>
        <servlet-class>by.bsuir.web.controller.admin.UserAddController</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>UserEditController</servlet-name>
        <servlet-class>by.bsuir.web.controller.admin.UserEditController</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>UserDeleteController</servlet-name>
        <servlet-class>by.bsuir.web.controller.admin.UserDeleteController</servlet-class>
    </servlet>

    <!-- User area-->
    <servlet>
        <servlet-name>OrderController</servlet-name>
        <servlet-class>by.bsuir.web.controller.user.OrderController</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>OrderAddController</servlet-name>
        <servlet-class>by.bsuir.web.controller.user.OrderAddController</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>OrderEditController</servlet-name>
        <servlet-class>by.bsuir.web.controller.user.OrderEditController</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>OrderDeleteController</servlet-name>
        <servlet-class>by.bsuir.web.controller.user.OrderDeleteController</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>OrderChangeStatusController</servlet-name>
        <servlet-class>by.bsuir.web.controller.user.OrderChangeStatusController</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>OrderViewController</servlet-name>
        <servlet-class>by.bsuir.web.controller.user.OrderViewController</servlet-class>
    </servlet>

    <!-- Admin area-->
    <servlet-mapping>
        <servlet-name>LoginController</servlet-name>
        <url-pattern>/login</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>LogoutController</servlet-name>
        <url-pattern>/logout</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>UserController</servlet-name>
        <url-pattern>/admin/users</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>UserAddController</servlet-name>
        <url-pattern>/admin/user/add</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>UserEditController</servlet-name>
        <url-pattern>/admin/user/update</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>UserDeleteController</servlet-name>
        <url-pattern>/admin/user/delete</url-pattern>
    </servlet-mapping>

    <!-- User area-->
    <servlet-mapping>
        <servlet-name>OrderController</servlet-name>
        <url-pattern>/user/orders</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>OrderAddController</servlet-name>
        <url-pattern>/user/order/add</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>OrderEditController</servlet-name>
        <url-pattern>/user/order/update</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>OrderDeleteController</servlet-name>
        <url-pattern>/user/order/delete</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>OrderChangeStatusController</servlet-name>
        <url-pattern>/user/order/status</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>OrderViewController</servlet-name>
        <url-pattern>/user/order/view</url-pattern>
    </servlet-mapping>


    <filter>
        <filter-name>CharsetFilter</filter-name>
        <filter-class>by.bsuir.web.filter.CharsetFilter</filter-class>
        <init-param>
            <param-name>requestEncoding</param-name>
            <param-value>UTF-8</param-value>
        </init-param>
    </filter>

    <filter-mapping>
        <filter-name>CharsetFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

</web-app>




ServiceEndpointService.java в клиенте - здесь, я так понимаю, код запуска клиентского приложения:

ServiceEndpointService.java
Код: java
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
package by.bsuir.web.client.service;

import javax.xml.namespace.QName;
import javax.xml.ws.WebEndpoint;
import javax.xml.ws.WebServiceClient;
import javax.xml.ws.WebServiceException;
import javax.xml.ws.WebServiceFeature;
import java.net.MalformedURLException;
import java.net.URL;


/**
 * This class was generated by the JAX-WS RI.
 * JAX-WS RI 2.2.4-b01
 * Generated source version: 2.2
 */
@WebServiceClient(name = "ServiceEndpointService", targetNamespace = "http://service.web.pizza.bguir.by/", wsdlLocation = "http://localhost:8080/server/api/service?wsdl")
public class ServiceEndpointService extends javax.xml.ws.Service {

    private final static URL SERVICEENDPOINTSERVICE_WSDL_LOCATION;
    private final static WebServiceException SERVICEENDPOINTSERVICE_EXCEPTION;
    private final static QName SERVICEENDPOINTSERVICE_QNAME = new QName("http://service.web.pizza.bguir.by/", "ServiceEndpointService");

    static {
        URL url = null;
        WebServiceException e = null;
        try {
            url = new URL("http://localhost:8080/server/api/service?wsdl");
        } catch (MalformedURLException ex) {
            e = new WebServiceException(ex);
        }
        SERVICEENDPOINTSERVICE_WSDL_LOCATION = url;
        SERVICEENDPOINTSERVICE_EXCEPTION = e;
    }

    public ServiceEndpointService() {
        super(__getWsdlLocation(), SERVICEENDPOINTSERVICE_QNAME);
    }

    public ServiceEndpointService(WebServiceFeature... features) {
        super(__getWsdlLocation(), SERVICEENDPOINTSERVICE_QNAME, features);
    }

    public ServiceEndpointService(URL wsdlLocation) {
        super(wsdlLocation, SERVICEENDPOINTSERVICE_QNAME);
    }

    public ServiceEndpointService(URL wsdlLocation, WebServiceFeature... features) {
        super(wsdlLocation, SERVICEENDPOINTSERVICE_QNAME, features);
    }

    public ServiceEndpointService(URL wsdlLocation, QName serviceName) {
        super(wsdlLocation, serviceName);
    }

    public ServiceEndpointService(URL wsdlLocation, QName serviceName, WebServiceFeature... features) {
        super(wsdlLocation, serviceName, features);
    }

    private static URL __getWsdlLocation() {
        if (SERVICEENDPOINTSERVICE_EXCEPTION != null) {
            throw SERVICEENDPOINTSERVICE_EXCEPTION;
        }
        return SERVICEENDPOINTSERVICE_WSDL_LOCATION;
    }

    /**
     * @return returns Service
     */
    @WebEndpoint(name = "servicePort")
    public Service getServicePort() {
        return super.getPort(new QName("http://service.web.pizza.bguir.by/", "servicePort"), Service.class);
    }

    /**
     * @param features A list of {@link WebServiceFeature} to configure on the proxy.  Supported features not in the <code>features</code> parameter will have their default values.
     * @return returns Service
     */
    @WebEndpoint(name = "servicePort")
    public Service getServicePort(WebServiceFeature... features) {
        return super.getPort(new QName("http://service.web.pizza.bguir.by/", "servicePort"), Service.class, features);
    }

}





Что я делаю не так? Проект не мой
...
Рейтинг: 0 / 0
Не запускается клиенское приложение с сервлетами
    #39062455
Basil A. Sidorov
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
При изготовлении скриншотов возьмите за правило использовать формат сжатия без потерь. Практически это PNG.
При изготовлении скриншотов используйте какой-нибудь простенький редактор, который позволяет обрезать лишнее и уменьшить цвет.
И самое главное - научитесь выкладывать текст ошибки и пользоваться предварительным просмотром сообщений/изображений.
...
Рейтинг: 0 / 0
Не запускается клиенское приложение с сервлетами
    #39062477
arCHi_1887
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Basil A. Sidorov,

Теста ошибки нет, есть только 404 - на скрине. HTTP Status 404 - description: The requested resource is not available.
...
Рейтинг: 0 / 0
Не запускается клиенское приложение с сервлетами
    #39065468
Basil A. Sidorov
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
А для таких ошибок есть логи котяры.
"Очень часто они сеют разумное, доброе, вечное".
...
Рейтинг: 0 / 0
Не запускается клиенское приложение с сервлетами
    #39065602
arCHi_1887
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Basil A. Sidorov,


catalina.log
30-Sep-2015 00:33:20.657 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.0.14
30-Sep-2015 00:33:20.657 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Sep 24 2014 09:01:51
30-Sep-2015 00:33:20.657 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.0.14.0
30-Sep-2015 00:33:20.657 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows 7
30-Sep-2015 00:33:20.657 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 6.1
30-Sep-2015 00:33:20.657 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
30-Sep-2015 00:33:20.657 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_60-b27
30-Sep-2015 00:33:20.657 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
30-Sep-2015 00:33:21.101 INFO [main] org.apache.catalina.core.AprLifecycleListener.init Loaded APR based Apache Tomcat Native library 1.1.31 using APR version 1.4.8.
30-Sep-2015 00:33:21.101 INFO [main] org.apache.catalina.core.AprLifecycleListener.init APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
30-Sep-2015 00:33:22.315 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized (OpenSSL 1.0.1h 5 Jun 2014)
30-Sep-2015 00:33:22.643 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-apr-8091"]
30-Sep-2015 00:33:22.675 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-apr-8009"]
30-Sep-2015 00:33:22.675 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 2156 ms
30-Sep-2015 00:33:22.721 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
30-Sep-2015 00:33:22.737 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.14
30-Sep-2015 00:33:22.793 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive C:\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14\webapps\client.war
30-Sep-2015 00:33:24.698 INFO [localhost-startStop-1] org.apache.catalina.util.SessionIdGeneratorBase.createSecureRandom Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [109] milliseconds.
30-Sep-2015 00:33:24.729 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive C:\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14\webapps\client.war has finished in 1,937 ms
30-Sep-2015 00:33:24.760 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive C:\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14\webapps\server.war
30-Sep-2015 00:33:29.526 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
30-Sep-2015 00:33:29.604 INFO [localhost-startStop-1] org.springframework.web.context.ContextLoader.initWebApplicationContext Root WebApplicationContext: initialization started
30-Sep-2015 00:33:29.900 INFO [localhost-startStop-1] org.springframework.web.context.support.XmlWebApplicationContext.prepareRefresh Refreshing Root WebApplicationContext: startup date [Wed Sep 30 00:33:29 GMT+03:00 2015]; root of context hierarchy
30-Sep-2015 00:33:30.212 INFO [localhost-startStop-1] org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions Loading XML bean definitions from file [C:\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14\webapps\server\WEB-INF\classes\applicationContext.xml]
30-Sep-2015 00:33:33.233 INFO [localhost-startStop-1] org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean.buildSessionFactory Building new Hibernate SessionFactory
30-Sep-2015 00:33:55.385 INFO [localhost-startStop-1] org.springframework.orm.hibernate3.HibernateTransactionManager.afterPropertiesSet Using DataSource [org.apache.commons.dbcp.BasicDataSource@513bf75f] of Hibernate SessionFactory for HibernateTransactionManager
30-Sep-2015 00:33:57.741 INFO [localhost-startStop-1] org.springframework.web.context.ContextLoader.initWebApplicationContext Root WebApplicationContext: initialization completed in 28137 ms
30-Sep-2015 00:33:57.741 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive C:\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14\webapps\server.war has finished in 32,981 ms
30-Sep-2015 00:33:57.741 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14\webapps\docs
30-Sep-2015 00:33:57.881 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14\webapps\docs has finished in 140 ms
30-Sep-2015 00:33:57.881 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14\webapps\examples
30-Sep-2015 00:33:59.613 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14\webapps\examples has finished in 1,732 ms
30-Sep-2015 00:33:59.613 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14\webapps\host-manager
30-Sep-2015 00:33:59.722 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14\webapps\host-manager has finished in 109 ms
30-Sep-2015 00:33:59.722 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14\webapps\manager
30-Sep-2015 00:33:59.816 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14\webapps\manager has finished in 94 ms
30-Sep-2015 00:33:59.816 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14\webapps\ROOT
30-Sep-2015 00:33:59.894 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\apache-tomcat-8.0.14-windows-x64\apache-tomcat-8.0.14\webapps\ROOT has finished in 78 ms
30-Sep-2015 00:33:59.909 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-apr-8091"]
30-Sep-2015 00:33:59.925 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-apr-8009"]
30-Sep-2015 00:33:59.925 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 37245 ms
30-Sep-2015 00:40:14.669 INFO [Thread-5] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-apr-8091"]
30-Sep-2015 00:40:14.724 INFO [Thread-5] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["ajp-apr-8009"]
30-Sep-2015 00:40:14.775 INFO [Thread-5] org.apache.catalina.core.StandardService.stopInternal Stopping service Catalina
30-Sep-2015 00:40:14.846 INFO [localhost-startStop-2] org.springframework.web.context.support.XmlWebApplicationContext.doClose Closing Root WebApplicationContext: startup date [Wed Sep 30 00:33:29 GMT+03:00 2015]; root of context hierarchy
30-Sep-2015 00:40:14.869 INFO [localhost-startStop-2] org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean.destroy Closing Hibernate SessionFactory
30-Sep-2015 19:12:07.858 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.0.14
30-Sep-2015 19:12:07.861 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Sep 24 2014 09:01:51
30-Sep-2015 19:12:07.863 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.0.14.0
30-Sep-2015 19:12:07.863 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows 7
30-Sep-2015 19:12:07.867 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 6.1
30-Sep-2015 19:12:07.867 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
30-Sep-2015 19:12:07.868 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_60-b27
30-Sep-2015 19:12:07.868 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
30-Sep-2015 19:12:08.622 INFO [main] org.apache.catalina.core.AprLifecycleListener.init Loaded APR based Apache Tomcat Native library 1.1.31 using APR version 1.4.8.
30-Sep-2015 19:12:08.623 INFO [main] org.apache.catalina.core.AprLifecycleListener.init APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
30-Sep-2015 19:12:09.948 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized (OpenSSL 1.0.1h 5 Jun 2014)
30-Sep-2015 19:12:10.529 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-apr-8091"]
30-Sep-2015 19:12:10.554 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-apr-8009"]
30-Sep-2015 19:12:10.558 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 2913 ms
30-Sep-2015 19:12:10.651 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
30-Sep-2015 19:12:10.653 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.14
30-Sep-2015 19:12:10.708 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive C:\tomcat\webapps\client.war
30-Sep-2015 19:12:12.987 INFO [localhost-startStop-1] org.apache.catalina.util.SessionIdGeneratorBase.createSecureRandom Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [308] milliseconds.
30-Sep-2015 19:12:13.058 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive C:\tomcat\webapps\client.war has finished in 2,351 ms
30-Sep-2015 19:12:13.064 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\tomcat\webapps\docs
30-Sep-2015 19:12:13.148 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\tomcat\webapps\docs has finished in 84 ms
30-Sep-2015 19:12:13.150 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\tomcat\webapps\examples
30-Sep-2015 19:12:14.199 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\tomcat\webapps\examples has finished in 1,049 ms
30-Sep-2015 19:12:14.200 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\tomcat\webapps\host-manager
30-Sep-2015 19:12:14.278 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\tomcat\webapps\host-manager has finished in 78 ms
30-Sep-2015 19:12:14.280 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\tomcat\webapps\manager
30-Sep-2015 19:12:14.379 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\tomcat\webapps\manager has finished in 98 ms
30-Sep-2015 19:12:14.380 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\tomcat\webapps\ROOT
30-Sep-2015 19:12:14.499 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Error listenerStart
30-Sep-2015 19:12:14.503 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors
30-Sep-2015 19:12:14.568 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\tomcat\webapps\ROOT has finished in 187 ms
30-Sep-2015 19:12:14.578 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-apr-8091"]
30-Sep-2015 19:12:14.594 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-apr-8009"]
30-Sep-2015 19:12:14.609 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 4048 ms
30-Sep-2015 19:16:14.801 INFO [localhost-startStop-2] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive C:\tomcat\webapps\server.war
30-Sep-2015 19:16:19.647 INFO [localhost-startStop-2] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
30-Sep-2015 19:16:19.799 INFO [localhost-startStop-2] org.springframework.web.context.ContextLoader.initWebApplicationContext Root WebApplicationContext: initialization started
30-Sep-2015 19:16:20.294 INFO [localhost-startStop-2] org.springframework.web.context.support.XmlWebApplicationContext.prepareRefresh Refreshing Root WebApplicationContext: startup date [Wed Sep 30 19:16:20 GMT+03:00 2015]; root of context hierarchy
30-Sep-2015 19:16:21.438 INFO [localhost-startStop-2] org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions Loading XML bean definitions from file [C:\tomcat\webapps\server\WEB-INF\classes\applicationContext.xml]
30-Sep-2015 19:16:25.922 INFO [localhost-startStop-2] org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean.buildSessionFactory Building new Hibernate SessionFactory
30-Sep-2015 19:16:36.539 INFO [localhost-startStop-2] org.springframework.orm.hibernate3.HibernateTransactionManager.afterPropertiesSet Using DataSource [org.apache.commons.dbcp.BasicDataSource@2087df11] of Hibernate SessionFactory for HibernateTransactionManager
30-Sep-2015 19:16:42.028 INFO [localhost-startStop-2] org.springframework.web.context.ContextLoader.initWebApplicationContext Root WebApplicationContext: initialization completed in 22226 ms
30-Sep-2015 19:16:42.034 INFO [localhost-startStop-2] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive C:\tomcat\webapps\server.war has finished in 27,233 ms
30-Sep-2015 19:17:00.239 INFO [http-apr-8091-exec-3] null.null WSSERVLET14: JAX-WS servlet initializing
30-Sep-2015 19:27:47.814 SEVERE [main] org.apache.catalina.startup.Catalina.stopServer Could not contact localhost:8005. Tomcat may not be running.
30-Sep-2015 19:27:47.817 SEVERE [main] org.apache.catalina.startup.Catalina.stopServer Catalina.stop:
java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at java.net.Socket.connect(Socket.java:538)
at java.net.Socket.<init>(Socket.java:434)
at java.net.Socket.<init>(Socket.java:211)
at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:450)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:400)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:487)

30-Sep-2015 19:27:55.154 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.0.14
30-Sep-2015 19:27:55.158 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Sep 24 2014 09:01:51
30-Sep-2015 19:27:55.158 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.0.14.0
30-Sep-2015 19:27:55.159 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows 7
30-Sep-2015 19:27:55.159 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 6.1
30-Sep-2015 19:27:55.159 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
30-Sep-2015 19:27:55.160 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_60-b27
30-Sep-2015 19:27:55.161 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
30-Sep-2015 19:27:55.688 INFO [main] org.apache.catalina.core.AprLifecycleListener.init Loaded APR based Apache Tomcat Native library 1.1.31 using APR version 1.4.8.
30-Sep-2015 19:27:55.689 INFO [main] org.apache.catalina.core.AprLifecycleListener.init APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
30-Sep-2015 19:27:57.046 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized (OpenSSL 1.0.1h 5 Jun 2014)
30-Sep-2015 19:27:57.339 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-apr-8091"]
30-Sep-2015 19:27:57.362 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-apr-8009"]
30-Sep-2015 19:27:57.366 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 2377 ms
30-Sep-2015 19:27:57.432 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
30-Sep-2015 19:27:57.433 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.14
30-Sep-2015 19:27:57.485 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive C:\tomcat\webapps\client.war
30-Sep-2015 19:27:59.273 INFO [localhost-startStop-1] org.apache.catalina.util.SessionIdGeneratorBase.createSecureRandom Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [121] milliseconds.
30-Sep-2015 19:27:59.320 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive C:\tomcat\webapps\client.war has finished in 1,835 ms
30-Sep-2015 19:27:59.323 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive C:\tomcat\webapps\server.war
30-Sep-2015 19:28:02.760 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
30-Sep-2015 19:28:02.828 INFO [localhost-startStop-1] org.springframework.web.context.ContextLoader.initWebApplicationContext Root WebApplicationContext: initialization started
30-Sep-2015 19:28:03.123 INFO [localhost-startStop-1] org.springframework.web.context.support.XmlWebApplicationContext.prepareRefresh Refreshing Root WebApplicationContext: startup date [Wed Sep 30 19:28:03 GMT+03:00 2015]; root of context hierarchy
30-Sep-2015 19:28:03.387 INFO [localhost-startStop-1] org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions Loading XML bean definitions from file [C:\tomcat\webapps\server\WEB-INF\classes\applicationContext.xml]
30-Sep-2015 19:28:06.599 INFO [localhost-startStop-1] org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean.buildSessionFactory Building new Hibernate SessionFactory
30-Sep-2015 19:28:16.760 INFO [localhost-startStop-1] org.springframework.orm.hibernate3.HibernateTransactionManager.afterPropertiesSet Using DataSource [org.apache.commons.dbcp.BasicDataSource@27dcb322] of Hibernate SessionFactory for HibernateTransactionManager
30-Sep-2015 19:28:19.519 INFO [localhost-startStop-1] org.springframework.web.context.ContextLoader.initWebApplicationContext Root WebApplicationContext: initialization completed in 16690 ms
30-Sep-2015 19:28:19.531 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive C:\tomcat\webapps\server.war has finished in 20,208 ms
30-Sep-2015 19:28:19.535 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\tomcat\webapps\docs
30-Sep-2015 19:28:19.578 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\tomcat\webapps\docs has finished in 43 ms
30-Sep-2015 19:28:19.578 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\tomcat\webapps\examples
30-Sep-2015 19:28:20.295 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\tomcat\webapps\examples has finished in 717 ms
30-Sep-2015 19:28:20.296 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\tomcat\webapps\host-manager
30-Sep-2015 19:28:20.354 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\tomcat\webapps\host-manager has finished in 57 ms
30-Sep-2015 19:28:20.354 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\tomcat\webapps\manager
30-Sep-2015 19:28:20.786 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\tomcat\webapps\manager has finished in 432 ms
30-Sep-2015 19:28:20.790 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\tomcat\webapps\ROOT
30-Sep-2015 19:28:20.891 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Error listenerStart
30-Sep-2015 19:28:20.892 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors
30-Sep-2015 19:28:20.906 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\tomcat\webapps\ROOT has finished in 116 ms
30-Sep-2015 19:28:20.914 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-apr-8091"]
30-Sep-2015 19:28:20.930 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-apr-8009"]
30-Sep-2015 19:28:20.933 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 23565 ms
30-Sep-2015 19:44:51.582 INFO [http-apr-8091-exec-3] org.apache.catalina.util.LifecycleBase.stop The stop() method was called on component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]] after stop() had already been called. The second call will be ignored.
30-Sep-2015 19:44:52.183 INFO [http-apr-8091-exec-3] org.apache.catalina.startup.HostConfig.undeploy Undeploying context []
...
Рейтинг: 0 / 0
Не запускается клиенское приложение с сервлетами
    #39065621
arCHi_1887
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Basil A. Sidorov,

лог с idea
C:\tomcat\bin\catalina.bat run
[2015-09-30 08:16:41,930] Artifact unnamed: Server is not connected. Deploy is not available.
Using CATALINA_BASE: "C:\Users\NotePad\.IntelliJIdea14\system\tomcat\Unnamed_EXE_5"
Using CATALINA_HOME: "C:\tomcat"
Using CATALINA_TMPDIR: "C:\tomcat\temp"
Using JRE_HOME: "C:\Program Files\Java\jdk1.8.0_60"
Using CLASSPATH: "C:\tomcat\bin\bootstrap.jar;C:\tomcat\bin\tomcat-juli.jar"
30-Sep-2015 20:16:42.920 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.0.14
30-Sep-2015 20:16:42.924 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Sep 24 2014 09:01:51
30-Sep-2015 20:16:42.926 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.0.14.0
30-Sep-2015 20:16:42.926 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows 7
30-Sep-2015 20:16:42.928 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 6.1
30-Sep-2015 20:16:42.928 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
30-Sep-2015 20:16:42.929 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_60-b27
30-Sep-2015 20:16:42.929 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
30-Sep-2015 20:16:43.713 INFO [main] org.apache.catalina.core.AprLifecycleListener.init Loaded APR based Apache Tomcat Native library 1.1.31 using APR version 1.4.8.
30-Sep-2015 20:16:43.713 INFO [main] org.apache.catalina.core.AprLifecycleListener.init APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
30-Sep-2015 20:16:45.030 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized (OpenSSL 1.0.1h 5 Jun 2014)
30-Sep-2015 20:16:45.256 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-apr-8091"]
30-Sep-2015 20:16:45.296 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-apr-8009"]
30-Sep-2015 20:16:45.300 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 2532 ms
30-Sep-2015 20:16:45.383 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
30-Sep-2015 20:16:45.384 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.14
30-Sep-2015 20:16:45.419 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-apr-8091"]
30-Sep-2015 20:16:45.432 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-apr-8009"]
30-Sep-2015 20:16:45.433 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 130 ms
Connected to server
[2015-09-30 08:16:45,938] Artifact unnamed: Artifact is being deployed, please wait...
30-Sep-2015 20:16:46.976 INFO [RMI TCP Connection(3)-127.0.0.1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
[2015-09-30 08:16:47,107] Artifact unnamed: Artifact is deployed successfully
[2015-09-30 08:16:47,107] Artifact unnamed: Deploy took 1 169 milliseconds
30-Sep-2015 20:16:55.443 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive C:\tomcat\webapps\client.war
30-Sep-2015 20:16:56.429 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive C:\tomcat\webapps\client.war has finished in 985 ms
30-Sep-2015 20:16:56.430 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive C:\tomcat\webapps\server.war
30-Sep-2015 20:17:00.030 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
30-Sep-2015 20:17:00.107 INFO [localhost-startStop-1] org.springframework.web.context.ContextLoader.initWebApplicationContext Root WebApplicationContext: initialization started
30-Sep-2015 20:17:00.439 INFO [localhost-startStop-1] org.springframework.web.context.support.XmlWebApplicationContext.prepareRefresh Refreshing Root WebApplicationContext: startup date [Wed Sep 30 20:17:00 GMT+03:00 2015]; root of context hierarchy
30-Sep-2015 20:17:00.733 INFO [localhost-startStop-1] org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions Loading XML bean definitions from file [C:\tomcat\webapps\server\WEB-INF\classes\applicationContext.xml]
...
Рейтинг: 0 / 0
Не запускается клиенское приложение с сервлетами
    #39065627
arCHi_1887
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
arCHi_1887,

Я заметил, что в web.xml не видит мой путь к пакетам:

Код: xml
1.
2.
3.
4.
 <servlet>
        <servlet-name>LoginController</servlet-name>
        <servlet-class>by.bsuir.web.controller.LoginController</servlet-class>
    </servlet>



Строка "by.bsuir.web.controller.LoginController" символы красным цветом
...
Рейтинг: 0 / 0
Не запускается клиенское приложение с сервлетами
    #39065730
arCHi_1887
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
arCHi_1887,

Сервер работает(можно получить wsdl-описание по ссылке в браузере). Клиента удалось запустить, но при запуске в браузере пустые страницы:



ServiceEndpoint.java сервера:

Код: java
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
85.
86.
87.
88.
89.
90.
91.
92.
93.
94.
95.
package by.bguir.pizza.web.service;

import by.bguir.pizza.repository.OrderDao;
import by.bguir.pizza.repository.UserDao;
import by.bguir.pizza.repository.model.Order;
import by.bguir.pizza.repository.model.Pizza;
import by.bguir.pizza.repository.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import java.util.List;

@Service
@WebService(name = "service")
@SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL)
public class ServiceEndpoint {

    @Autowired
    private UserDao userDao;
    @Autowired
    private OrderDao orderDao;  

    @WebMethod
    public User getUserById(Long id) {
        return userDao.getUserById(id);
    }

    @WebMethod
    public User getUserByUsername(String username) {
        return userDao.getUserByUsername(username);
    }

    @WebMethod
    public List<User> getUsers(String username, String order) {
        return userDao.getUsers(username, order);
    }

    @WebMethod
    public void saveUser(User user) {
        userDao.save(user);
    }

    @WebMethod
    public void updateUser(User user) {
        userDao.update(user);
    }

    @WebMethod
    public void deleteUser(User user) {
        userDao.delete(user);
    }

    @WebMethod
    public List<Order> getOrders(String orderNumber, String order) {
        return orderDao.getOrders(orderNumber, order);
    }

    @WebMethod
    public Order getOrder(Long id) {
        return orderDao.getOrder(id);
    }

    @WebMethod
    public List<Pizza> getPizzaList() {
        return orderDao.getPizzaList();
    }

    @WebMethod
    public Pizza getPizza(Long pizzaId) {
        return orderDao.getPizza(pizzaId);
    }

    @WebMethod
    public void saveOrder(Order order) {
        orderDao.save(order);
    }

    @WebMethod
    public void updateOrder(Order order) {
        orderDao.update(order);
    }

    @WebMethod
    public void deleteOrder(Order order) {
        orderDao.delete(order);
    }

    @WebMethod
    public void changeStatus(Long id) {
        orderDao.changeStatus(id);
    }
}




ServiceEndpointService.java клиента:
Код: java
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
package by.bsuir.web.client.service;

import javax.xml.namespace.QName;
import javax.xml.ws.WebEndpoint;
import javax.xml.ws.WebServiceClient;
import javax.xml.ws.WebServiceException;
import javax.xml.ws.WebServiceFeature;
import java.net.MalformedURLException;
import java.net.URL;


/**
 * This class was generated by the JAX-WS RI.
 * JAX-WS RI 2.2.4-b01
 * Generated source version: 2.2
 */
@WebServiceClient(name = "ServiceEndpointService", targetNamespace = "http://service.web.pizza.bguir.by/", wsdlLocation = "http://localhost:8091/server/api/service?wsdl")
public class ServiceEndpointService extends javax.xml.ws.Service {

    private final static URL SERVICEENDPOINTSERVICE_WSDL_LOCATION;
    private final static WebServiceException SERVICEENDPOINTSERVICE_EXCEPTION;
    private final static QName SERVICEENDPOINTSERVICE_QNAME = new QName("http://service.web.pizza.bguir.by/", "ServiceEndpointService");

    static {
        URL url = null;
        WebServiceException e = null;
        try {
            url = new URL("http://localhost:8091/server/api/service?wsdl");
        } catch (MalformedURLException ex) {
            e = new WebServiceException(ex);
        }
        SERVICEENDPOINTSERVICE_WSDL_LOCATION = url;
        SERVICEENDPOINTSERVICE_EXCEPTION = e;
    }

    public ServiceEndpointService() {
        super(__getWsdlLocation(), SERVICEENDPOINTSERVICE_QNAME);
    }

    public ServiceEndpointService(WebServiceFeature... features) {
        super(__getWsdlLocation(), SERVICEENDPOINTSERVICE_QNAME, features);
    }

    public ServiceEndpointService(URL wsdlLocation) {
        super(wsdlLocation, SERVICEENDPOINTSERVICE_QNAME);
    }

    public ServiceEndpointService(URL wsdlLocation, WebServiceFeature... features) {
        super(wsdlLocation, SERVICEENDPOINTSERVICE_QNAME, features);
    }

    public ServiceEndpointService(URL wsdlLocation, QName serviceName) {
        super(wsdlLocation, serviceName);
    }

    public ServiceEndpointService(URL wsdlLocation, QName serviceName, WebServiceFeature... features) {
        super(wsdlLocation, serviceName, features);
    }

    private static URL __getWsdlLocation() {
        if (SERVICEENDPOINTSERVICE_EXCEPTION != null) {
            throw SERVICEENDPOINTSERVICE_EXCEPTION;
        }
        return SERVICEENDPOINTSERVICE_WSDL_LOCATION;
    }

    /**
     * @return returns Service
     */
    @WebEndpoint(name = "servicePort")
    public Service getServicePort() {
        return super.getPort(new QName("http://service.web.pizza.bguir.by/", "servicePort"), Service.class);
    }

    /**
     * @param features A list of {@link WebServiceFeature} to configure on the proxy.  Supported features not in the <code>features</code> parameter will have their default values.
     * @return returns Service
     */
    @WebEndpoint(name = "servicePort")
    public Service getServicePort(WebServiceFeature... features) {
        return super.getPort(new QName("http://service.web.pizza.bguir.by/", "servicePort"), Service.class, features);
    }

}


Service.java клиента:
Код: java
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
85.
86.
87.
88.
89.
90.
91.
92.
93.
94.
95.
96.
97.
98.
99.
100.
101.
102.
103.
104.
105.
106.
107.
108.
109.
110.
111.
112.
113.
114.
115.
116.
117.
118.
119.
120.
121.
122.
123.
124.
125.
126.
127.
128.
129.
130.
131.
132.
133.
134.
135.
136.
137.
138.
139.
140.
141.
142.
143.
144.
145.
146.
147.
148.
149.
150.
151.
152.
153.
154.
155.
156.
157.
158.
159.
160.
161.
162.
163.
164.
165.
166.
167.
168.
169.
170.
171.
172.
173.
174.
175.
176.
177.
178.
179.
180.
181.
182.
183.
184.
185.
186.
187.
188.
189.
190.
191.
192.
193.
194.
195.
196.
197.
198.
199.
200.
201.
202.
package by.bsuir.web.client.service;

import by.bsuir.web.client.ObjectFactory;
import by.bsuir.web.model.Order;
import by.bsuir.web.model.Pizza;
import by.bsuir.web.model.User;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.ws.Action;
import javax.xml.ws.RequestWrapper;
import javax.xml.ws.ResponseWrapper;
import java.util.List;


/**
 * This class was generated by the JAX-WS RI.
 * JAX-WS RI 2.2.4-b01
 * Generated source version: 2.2
 */
@WebService(name = "service", targetNamespace = "http://service.web.pizza.bguir.by/")
@XmlSeeAlso({
        ObjectFactory.class
})
public interface Service {


    /**
     * @param arg1
     * @param arg0
     * @return returns java.util.List<by.bguir.pizza.web.service.User>
     */
    @WebMethod
    @WebResult(targetNamespace = "")
    @RequestWrapper(localName = "getUsers", targetNamespace = "http://service.web.pizza.bguir.by/", className = "by.bguir.pizza.web.service.GetUsers")
    @ResponseWrapper(localName = "getUsersResponse", targetNamespace = "http://service.web.pizza.bguir.by/", className = "by.bguir.pizza.web.service.GetUsersResponse")
    @Action(input = "http://service.web.pizza.bguir.by/service/getUsersRequest", output = "http://service.web.pizza.bguir.by/service/getUsersResponse")
    public List<User> getUsers(
            @WebParam(name = "arg0", targetNamespace = "")
            String arg0,
            @WebParam(name = "arg1", targetNamespace = "")
            String arg1);

    /**
     * @param arg0
     * @return returns by.bguir.pizza.web.service.User
     */
    @WebMethod
    @WebResult(targetNamespace = "")
    @RequestWrapper(localName = "getUserByUsername", targetNamespace = "http://service.web.pizza.bguir.by/", className = "by.bguir.pizza.web.service.GetUserByUsername")
    @ResponseWrapper(localName = "getUserByUsernameResponse", targetNamespace = "http://service.web.pizza.bguir.by/", className = "by.bguir.pizza.web.service.GetUserByUsernameResponse")
    @Action(input = "http://service.web.pizza.bguir.by/service/getUserByUsernameRequest", output = "http://service.web.pizza.bguir.by/service/getUserByUsernameResponse")
    public User getUserByUsername(
            @WebParam(name = "arg0", targetNamespace = "")
            String arg0);

    /**
     * @param arg1
     * @param arg0
     * @return returns java.util.List<by.bguir.pizza.web.service.Order>
     */
    @WebMethod
    @WebResult(targetNamespace = "")
    @RequestWrapper(localName = "getOrders", targetNamespace = "http://service.web.pizza.bguir.by/", className = "by.bguir.pizza.web.service.GetOrders")
    @ResponseWrapper(localName = "getOrdersResponse", targetNamespace = "http://service.web.pizza.bguir.by/", className = "by.bguir.pizza.web.service.GetOrdersResponse")
    @Action(input = "http://service.web.pizza.bguir.by/service/getOrdersRequest", output = "http://service.web.pizza.bguir.by/service/getOrdersResponse")
    public List<Order> getOrders(
            @WebParam(name = "arg0", targetNamespace = "")
            String arg0,
            @WebParam(name = "arg1", targetNamespace = "")
            String arg1);

    /**
     * @param arg0
     */
    @WebMethod
    @RequestWrapper(localName = "deleteUser", targetNamespace = "http://service.web.pizza.bguir.by/", className = "by.bguir.pizza.web.service.DeleteUser")
    @ResponseWrapper(localName = "deleteUserResponse", targetNamespace = "http://service.web.pizza.bguir.by/", className = "by.bguir.pizza.web.service.DeleteUserResponse")
    @Action(input = "http://service.web.pizza.bguir.by/service/deleteUserRequest", output = "http://service.web.pizza.bguir.by/service/deleteUserResponse")
    public void deleteUser(
            @WebParam(name = "arg0", targetNamespace = "")
            User arg0);

    /**
     * @param arg0
     */
    @WebMethod
    @RequestWrapper(localName = "updateUser", targetNamespace = "http://service.web.pizza.bguir.by/", className = "by.bguir.pizza.web.service.UpdateUser")
    @ResponseWrapper(localName = "updateUserResponse", targetNamespace = "http://service.web.pizza.bguir.by/", className = "by.bguir.pizza.web.service.UpdateUserResponse")
    @Action(input = "http://service.web.pizza.bguir.by/service/updateUserRequest", output = "http://service.web.pizza.bguir.by/service/updateUserResponse")
    public void updateUser(
            @WebParam(name = "arg0", targetNamespace = "")
            User arg0);

    /**
     * @param arg0
     * @return returns by.bguir.pizza.web.service.User
     */
    @WebMethod
    @WebResult(targetNamespace = "")
    @RequestWrapper(localName = "getUserById", targetNamespace = "http://service.web.pizza.bguir.by/", className = "by.bguir.pizza.web.service.GetUserById")
    @ResponseWrapper(localName = "getUserByIdResponse", targetNamespace = "http://service.web.pizza.bguir.by/", className = "by.bguir.pizza.web.service.GetUserByIdResponse")
    @Action(input = "http://service.web.pizza.bguir.by/service/getUserByIdRequest", output = "http://service.web.pizza.bguir.by/service/getUserByIdResponse")
    public User getUserById(
            @WebParam(name = "arg0", targetNamespace = "")
            Long arg0);

    /**
     * @param arg0
     */
    @WebMethod
    @RequestWrapper(localName = "saveUser", targetNamespace = "http://service.web.pizza.bguir.by/", className = "by.bguir.pizza.web.service.SaveUser")
    @ResponseWrapper(localName = "saveUserResponse", targetNamespace = "http://service.web.pizza.bguir.by/", className = "by.bguir.pizza.web.service.SaveUserResponse")
    @Action(input = "http://service.web.pizza.bguir.by/service/saveUserRequest", output = "http://service.web.pizza.bguir.by/service/saveUserResponse")
    public void saveUser(
            @WebParam(name = "arg0", targetNamespace = "")
            User arg0);

    /**
     * @param arg0
     * @return returns by.bguir.pizza.web.service.Order
     */
    @WebMethod
    @WebResult(targetNamespace = "")
    @RequestWrapper(localName = "getOrder", targetNamespace = "http://service.web.pizza.bguir.by/", className = "by.bguir.pizza.web.service.GetOrder")
    @ResponseWrapper(localName = "getOrderResponse", targetNamespace = "http://service.web.pizza.bguir.by/", className = "by.bguir.pizza.web.service.GetOrderResponse")
    @Action(input = "http://service.web.pizza.bguir.by/service/getOrderRequest", output = "http://service.web.pizza.bguir.by/service/getOrderResponse")
    public Order getOrder(
            @WebParam(name = "arg0", targetNamespace = "")
            Long arg0);

    /**
     * @return returns java.util.List<by.bguir.pizza.web.service.Pizza>
     */
    @WebMethod
    @WebResult(targetNamespace = "")
    @RequestWrapper(localName = "getPizzaList", targetNamespace = "http://service.web.pizza.bguir.by/", className = "by.bguir.pizza.web.service.GetPizzaList")
    @ResponseWrapper(localName = "getPizzaListResponse", targetNamespace = "http://service.web.pizza.bguir.by/", className = "by.bguir.pizza.web.service.GetPizzaListResponse")
    @Action(input = "http://service.web.pizza.bguir.by/service/getPizzaListRequest", output = "http://service.web.pizza.bguir.by/service/getPizzaListResponse")
    public List<Pizza> getPizzaList();

    /**
     * @param arg0
     * @return returns by.bguir.pizza.web.service.Pizza
     */
    @WebMethod
    @WebResult(targetNamespace = "")
    @RequestWrapper(localName = "getPizza", targetNamespace = "http://service.web.pizza.bguir.by/", className = "by.bguir.pizza.web.service.GetPizza")
    @ResponseWrapper(localName = "getPizzaResponse", targetNamespace = "http://service.web.pizza.bguir.by/", className = "by.bguir.pizza.web.service.GetPizzaResponse")
    @Action(input = "http://service.web.pizza.bguir.by/service/getPizzaRequest", output = "http://service.web.pizza.bguir.by/service/getPizzaResponse")
    public Pizza getPizza(
            @WebParam(name = "arg0", targetNamespace = "")
            Long arg0);

    /**
     * @param arg0
     */
    @WebMethod
    @RequestWrapper(localName = "saveOrder", targetNamespace = "http://service.web.pizza.bguir.by/", className = "by.bguir.pizza.web.service.SaveOrder")
    @ResponseWrapper(localName = "saveOrderResponse", targetNamespace = "http://service.web.pizza.bguir.by/", className = "by.bguir.pizza.web.service.SaveOrderResponse")
    @Action(input = "http://service.web.pizza.bguir.by/service/saveOrderRequest", output = "http://service.web.pizza.bguir.by/service/saveOrderResponse")
    public void saveOrder(
            @WebParam(name = "arg0", targetNamespace = "")
            Order arg0);

    /**
     * @param arg0
     */
    @WebMethod
    @RequestWrapper(localName = "updateOrder", targetNamespace = "http://service.web.pizza.bguir.by/", className = "by.bguir.pizza.web.service.UpdateOrder")
    @ResponseWrapper(localName = "updateOrderResponse", targetNamespace = "http://service.web.pizza.bguir.by/", className = "by.bguir.pizza.web.service.UpdateOrderResponse")
    @Action(input = "http://service.web.pizza.bguir.by/service/updateOrderRequest", output = "http://service.web.pizza.bguir.by/service/updateOrderResponse")
    public void updateOrder(
            @WebParam(name = "arg0", targetNamespace = "")
            Order arg0);

    /**
     * @param arg0
     */
    @WebMethod
    @RequestWrapper(localName = "deleteOrder", targetNamespace = "http://service.web.pizza.bguir.by/", className = "by.bguir.pizza.web.service.DeleteOrder")
    @ResponseWrapper(localName = "deleteOrderResponse", targetNamespace = "http://service.web.pizza.bguir.by/", className = "by.bguir.pizza.web.service.DeleteOrderResponse")
    @Action(input = "http://service.web.pizza.bguir.by/service/deleteOrderRequest", output = "http://service.web.pizza.bguir.by/service/deleteOrderResponse")
    public void deleteOrder(
            @WebParam(name = "arg0", targetNamespace = "")
            Order arg0);

    /**
     * @param arg0
     */
    @WebMethod
    @RequestWrapper(localName = "changeStatus", targetNamespace = "http://service.web.pizza.bguir.by/", className = "by.bguir.pizza.web.service.ChangeStatus")
    @ResponseWrapper(localName = "changeStatusResponse", targetNamespace = "http://service.web.pizza.bguir.by/", className = "by.bguir.pizza.web.service.ChangeStatusResponse")
    @Action(input = "http://service.web.pizza.bguir.by/service/changeStatusRequest", output = "http://service.web.pizza.bguir.by/service/changeStatusResponse")
    public void changeStatus(
            @WebParam(name = "arg0", targetNamespace = "")
            Long arg0);

}


Web.xml клиента кидал выше
...
Рейтинг: 0 / 0
8 сообщений из 8, страница 1 из 1
Форумы / Java [игнор отключен] [закрыт для гостей] / Не запускается клиенское приложение с сервлетами
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]