0 Replies Latest reply on Apr 8, 2009 9:11 AM by Jonathan Muniz

    Help with JbossWs and WS-Security!

    Jonathan Muniz Newbie

      My webservice is working without the configuration wssecurity,
      when I put the settings an error occurs
      - put a annotation in webservices
      -----@EndpointConfig(configName="Standard WSSecurity Endpoint")
      - put the files in the web-inf
      ------jboss-wsse-server.xml and the jboss-wsse-client.xml in the client side together with the other files
      ------wsse.cer
      ------wsse.csr
      ------wsse.jks

      my client is in the servlet

      QName qName = new QName("http://coreo.com.br/teste", "Teste");
      String serviceURL = "http://jon.ctbc.com.br:8080/jbossWebServiceSecurity-1.0.0/Teste?wsdl";
      Service service = null;
      URL url;
      try {
      url = new URL(serviceURL);
      service = Service.create(url,qName);
      ITeste s = service.getPort(ITeste.class);
      System.out.println(s.localizacao("jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj"));
      } catch (MalformedURLException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      }


      09:09:30,343 ERROR [[MyServlet]] Servlet.service() for servlet MyServlet threw exception
      javax.xml.ws.soap.SOAPFaultException: This service requires <wsse:Security>, which is missing.
      at org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS.getSOAPFaultException(SOAPFaultHelperJAXWS.java:84)
      at org.jboss.ws.core.jaxws.binding.SOAP11BindingJAXWS.throwFaultException(SOAP11BindingJAXWS.java:107)
      at org.jboss.ws.core.CommonSOAPBinding.unbindResponseMessage(CommonSOAPBinding.java:579)
      at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:381)
      at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:290)
      at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:170)
      at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:150)
      at $Proxy82.localizacao(Unknown Source)
      at br.teste.client.MyServlet.executa(MyServlet.java:54)
      at br.teste.client.MyServlet.doGet(MyServlet.java:33)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
      at java.lang.Thread.run(Thread.java:595)