[Resolvido] Erro em Web Service

Olá!

Eu uso o NetBeans IDE 7.0.1 e estava seguindo um tutorial de Web Service, quando me deparei com o seguinte erro:

Impossível abrir a página de testes do serviço Web.
Verifique se o serviço foi implantado corretamente, e se o servidor está em execução.

Alguem sabe solucionar? Obrigada.

Application Server? Framework de Web Services? Código do web service?

Sou iniciante, utilizei esse tutorial: http://www.theserverside.com/tip/Building-Java-Web-services-with-NetBeans-7
Server: GlassFish Server 3.1

@WebMethod(operationName = "playTheGame") public String playTheGame(@WebParam(name = "clientChoice") String clientChoice) { String result = "failure"; String serverChoice = "rock"; try { if (clientChoice.equalsIgnoreCase("scissors")) { result = "loss"; } if (clientChoice.equalsIgnoreCase("paper")) { result = "win"; } if (clientChoice.equalsIgnoreCase("rock")) { result = "draw"; } } catch (RuntimeException e) { System.out.println("Excetion"); } return result; }

Humn… o Glassfish foi inicializado? Pode postar a saída do console?

Seria isso?

Launching GlassFish on Felix platform 22/11/2011 11:49:18 com.sun.enterprise.server.logging.LogManagerService postConstruct WARNING: Record begin marker is not a proper value so using default. 22/11/2011 11:49:18 com.sun.enterprise.server.logging.LogManagerService postConstruct WARNING: Record end marker is not a proper value so using default. 22/11/2011 11:49:18 com.sun.enterprise.server.logging.LogManagerService postConstruct WARNING: Log Format field separator is not a character so using default. INFO: Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry INFO: Grizzly Framework 1.9.36 started in: 62ms - bound to [0.0.0.0:8181] INFO: Grizzly Framework 1.9.36 started in: 62ms - bound to [0.0.0.0:4848] INFO: Grizzly Framework 1.9.36 started in: 31ms - bound to [0.0.0.0:3700] INFO: Grizzly Framework 1.9.36 started in: 15ms - bound to [0.0.0.0:7676] INFO: Grizzly Framework 1.9.36 started in: 187ms - bound to [0.0.0.0:8080] INFO: GlassFish Server Open Source Edition 3.1.1 (12) hora de inicialização : Felix (1.344ms), serviços de inicialização(688ms), total(2.032ms) INFO: JMXStartupService: Started JMXConnector, JMXService URL = service:jmx:rmi://taisfg:8686/jndi/rmi://taisfg:8686/jmxrmi INFO: Hibernate Validator 4.1.0.Final INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver. INFO: Grizzly Framework 1.9.36 started in: 16ms - bound to [0.0.0.0:8080] INFO: Grizzly Framework 1.9.36 started in: 16ms - bound to [0.0.0.0:8181] INFO: SEC1002: Security Manager is OFF. INFO: SEC1010: Entering Security Startup Service INFO: SEC1143: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper. INFO: SEC1115: Realm [admin-realm] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created. INFO: SEC1115: Realm [file] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created. INFO: SEC1115: Realm [certificate] of classtype [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm] successfully created. INFO: SEC1011: Security Service(s) Started Successfully INFO: WS10010: Web service endpoint deployment events listener registered successfully. INFO: WS10001: Loading WS-TX Services. Please wait. INFO: WEB0169: Created HTTP listener [http-listener-1] on host/port [0.0.0.0:8080] INFO: WEB0169: Created HTTP listener [http-listener-2] on host/port [0.0.0.0:8181] INFO: WEB0169: Created HTTP listener [admin-listener] on host/port [0.0.0.0:4848] INFO: WEB0171: Created virtual server [server] INFO: WEB0171: Created virtual server [__asadmin] INFO: WEB0172: Virtual server [server] loaded default web module [] INFO: WS00018: Webservice Endpoint deployed RegistrationRequesterPortTypeImpl listening at address at http://taisfg:8080/__wstx-services/RegistrationRequesterPortType INFO: WS00018: Webservice Endpoint deployed CoordinatorPortTypePortImpl listening at address at http://taisfg:8080/__wstx-services/CoordinatorPortType11 INFO: WS00018: Webservice Endpoint deployed ParticipantPortTypePortImpl listening at address at http://taisfg:8080/__wstx-services/ParticipantPortType11 INFO: WS00018: Webservice Endpoint deployed CoordinatorPortTypeImpl listening at address at http://taisfg:8080/__wstx-services/CoordinatorPortType INFO: WS00018: Webservice Endpoint deployed RegistrationPortTypeRPCPortImpl listening at address at http://taisfg:8080/__wstx-services/RegistrationPortTypeRPC11 INFO: WS00018: Webservice Endpoint deployed RegistrationPortTypeImpl listening at address at http://taisfg:8080/__wstx-services/RegistrationPortTypeRPC INFO: WS00018: Webservice Endpoint deployed ParticipantPortTypeImpl listening at address at http://taisfg:8080/__wstx-services/ParticipantPortType INFO: WS00018: Webservice Endpoint deployed RegistrationRequesterPortTypePortImpl listening at address at http://taisfg:8080/__wstx-services/RegistrationRequesterPortType11 INFO: Metro monitoring rootname successfully set to: amx:pp=/mon/server-mon[server],type=WSEndpoint,name=/__wstx-services-Coordinator-RegistrationRequester INFO: Metro monitoring rootname successfully set to: amx:pp=/mon/server-mon[server],type=WSEndpoint,name=/__wstx-services-WSAT11Service-CoordinatorPort INFO: Metro monitoring rootname successfully set to: amx:pp=/mon/server-mon[server],type=WSEndpoint,name=/__wstx-services-WSAT11Service-ParticipantPort INFO: Metro monitoring rootname successfully set to: amx:pp=/mon/server-mon[server],type=WSEndpoint,name=/__wstx-services-WSATCoordinator-Coordinator INFO: Metro monitoring rootname successfully set to: amx:pp=/mon/server-mon[server],type=WSEndpoint,name=/__wstx-services-RegistrationService_V11-RegistrationPort INFO: Metro monitoring rootname successfully set to: amx:pp=/mon/server-mon[server],type=WSEndpoint,name=/__wstx-services-Coordinator-Registration INFO: Metro monitoring rootname successfully set to: amx:pp=/mon/server-mon[server],type=WSEndpoint,name=/__wstx-services-WSATCoordinator-Participant INFO: Metro monitoring rootname successfully set to: amx:pp=/mon/server-mon[server],type=WSEndpoint,name=/__wstx-services-RegistrationService_V11-RegistrationRequesterPort INFO: WEB0671: Loading application [wstx-services] at [/__wstx-services] INFO: WS10002: WS-TX Services successfully started. INFO: Metro monitoring rootname successfully set to: amx:pp=/mon/server-mon[server],type=WSEndpoint,name=RPSService-RPSServicePort WARNING: Container org.glassfish.webservices.JAXWSContainer@57c459 doesn't support class com.sun.xml.ws.api.server.Module INFO: WS00019: EJB Endpoint deployed MyEnterpriseApp listening at address at http://taisfg:8080/RPSService/RPSService INFO: WEB0671: Loading application [MyEnterpriseApp#MyEnterpriseApp-war.war] at [MyEnterpriseApp-war] INFO: MyEnterpriseApp foi implementado com êxito em 7.515 milisegundos.

Estranho, o output do console diz que o serviço foi implantado, sem problemas. Qual a URL que você está tentando acessar?

Impossível abrir a página de testes do serviço Web:
http://localhost:9090/RPSService/RPSService?Tester
Verifique se o serviço foi implantado corretamente, e se o servidor está em execução.

acabei de testar aqui e funcionou 100%, vc não deve ter feito alguma etapa, depois de construir playTheGame vc implantou MyenterpriseApp-EJB ?

[quote=tguerra]Impossível abrir a página de testes do serviço Web:
http://localhost:9090/RPSService/RPSService?Tester
Verifique se o serviço foi implantado corretamente, e se o servidor está em execução.
[/quote]

vc usa na porta 9090 ? aqui ficou assim:

http://localhost:8080/RPSService/RPSService?Tester

Pois é, de fato, a URL que o console aponta é http://taisfg:8080/RPSService/RPSService

asaudate e aix, obrigada pelas respostas!

Acima eu digitei errado, é 8080, digitei com pressa e acabei errado, desculpe!
Eu fiz todas as etapas, aix, eu realmente não entendi esse erro. E inclusive, implantei a MyenterpriseApp-EJB. Será que é alguma coisa na IDE? Tu usaste a 7.0.1?

sim Netbeans 7.01, quer que eu envie a vc por email o project ? ai vc abre ai e compara com o seu, abraços.

[quote=tguerra]asaudate e aix, obrigada pelas respostas!

Acima eu digitei errado, é 8080, digitei com pressa e acabei errado, desculpe!
Eu fiz todas as etapas, aix, eu realmente não entendi esse erro. E inclusive, implantei a MyenterpriseApp-EJB. Será que é alguma coisa na IDE? Tu usaste a 7.0.1?[/quote]

Tente acessar http://taisfg:8080/RPSService/RPSService?wsdl e veja o que acontece…

aix, pode ser, te passo o e-mail em MP.

asaudate, não deu em nada.

Muito obrigada pelas respostas,asaudate e aix.

Cheguei hoje no trabalho, abri o NetBeans, refiz e funcionou haha, não tenho idéia do que seja o erro, mas todo caso, obrigada pela ajuda!