GlassFish Server Deployment

I am using GlassFish Server and WS. I just deployed a web application. generated using maven with this web.xml

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd" > <web-app> <display-name>Archetype Created Web Application</display-name> </web-app> 

I click Web Application Links

I have this class in the application:

 import javax.jws.WebMethod; import javax.jws.WebService; import javax.servlet.http.HttpSession; import javax.xml.ws.WebServiceContext; import javax.xml.ws.handler.MessageContext; @WebService(serviceName="IberiaWS") public class IberiaWS { @Resource private WebServiceContext wsContext; public IberiaWS () { } private UserVO getSessionUserVO() { MessageContext mc = wsContext.getMessageContext(); HttpSession session = ((javax.servlet.http.HttpServletRequest)mc.get(MessageContext.SERVLET_REQUEST)).getSession(); return (UserVO)session.getAttribute("uservo"); } private void setSessionUserVO(UserVO uservo) { MessageContext mc = wsContext.getMessageContext(); HttpSession session = ((javax.servlet.http.HttpServletRequest)mc.get(MessageContext.SERVLET_REQUEST)).getSession(); session.setAttribute("uservo", uservo); } @WebMethod public boolean login(String loginName, String loginPwd) throws Exception { this.setSessionUserVO(new UserDAO().findUser("_"+loginName, "__"+loginPwd)); return isConnected(); } @WebMethod public boolean isConnected() { return (this.getSessionUserVO()!=null); } @WebMethod public IberiaPerson getPerson(String id) { return new IberiaPerson(); } @WebMethod public IberiaPerson findPerson(String companyNr) { UserVO uservo = this.getSessionUserVO(); IberiaPerson ret=null; PersonVO p= new PersonDAO().findByCompanyNr(uservo.getAdminCenterId(), uservo.getUserId(), "Iberia", companyNr); if (p!=null) { ret = new IberiaPerson(); ret.setPersonId(p.getPersonId()); ret.setCompanyName(p.getVehicleOwnerName()); ret.setCategoryName(p.getCategoryName()); ret.setCompanyNr(p.getCompanyNr()); ret.setFirstName(p.getFirstName()); ret.setLastName(p.getLastName()); ret.setStatusId(p.getStatusId()); ret.setGroupName(p.getGroupList()); ret.setKeyCode(p.getKeyString()); ret.setComments(p.getLmComment()); } return ret; } } 

WS seems to be deployed ever since I saw it in Engines

I can access spp. http: // localhost: 8080 / iberiafleet /

But I do not understand how to access the WSLD of a deployed WS

I got 404 HTTP status at this URL

http: // localhost: 8080 / iberiafleet / IberiaWSPort? WSDL

and

http: // localhost: 8080 / iberiafleet / IberiaWS? wsdl

But according to this guide, I should see the View Endpoint link

https://blog.idrsolutions.com/2013/08/creating-and-deploying-a-java-web-service/

but I don’t see it.

enter image description here

I see this message in the console:

  [#|2017-11-13T10:50:39.993+0100|INFO|glassfish 5.0|javax.enterprise.webservices.metroglue|_ThreadID=19;_ThreadName=RunLevelControllerThread-1510566633374;_TimeMillis=1510566639993;_LevelValue=800;_MessageID=AS-WSMETROGLUE-10010;| Web service endpoint deployment events listener registered successfully.|#] 
+5
source share
1 answer

I think you have a typo in the WSDL URL,

 http://localhost:8080/iberiafleet/IberiaWS?wsdl 

Job?

0
source

Source: https://habr.com/ru/post/1273265/


All Articles