JBoss Community

Re: missing tag in WS-Security

created by NOE GUTIERREZ in JBoss Web Services - View the full discussion

Hi:

I have found the solution to this mistake missing <wsse:Security> tag in WS-Security

 

the configuration client

 

jdk6 an jboss 5.1.0

I used this VM options  -Dsun.lang.ClassLoader.allowArraySyntax=true "-Djava.endorsed.dirs=D:\jboss-5.1.0.GA\lib\endorsed"


 

and added this jars to my classpath

 

  • jaxb-impl.jar
  • xmlsec-1.4.1.jar
  • jboss-logging-spi.jar
  • jbossws-spi.jar
  • jbossws-spi.jar
  • jbossws-native-jarxrpc.jar
  • mail.jar
  • jbossws-client.jar
  • jboss-common-core.jar
  • jbossws-common.jar
  • wsdl4j.jar
  • jboss-xml-binding.jar
  • jaxb-xjc.jar
  • xercesImpl.jar
  • policy.jar
  • commos-logging.jar
  • javassist.jar
  • concurrent.jar
  • jboss-remoting.jar

 

 

my main Class Client

 

import org.jboss.logging.Logger;

import org.jboss.ws.core.StubExt;

 

 

import misservicios.insys.ws.*;

 

 

public class ClientSample {

          private static Logger log = Logger.getLogger(ClientSample.class);

 

 

          public static void main(String[] args) {

                  System.out.println("***********************");

                  System.out.println("Create Web Service Client...");

                 

                  try {

           log.info("Create Web Service Client...");

                                                  log.info("***********************");

                                                  OperacionService service1 = new OperacionService();

                                                  log.info("El Servicio consumido "+service1.getServiceName().getNamespaceURI());

                                                  log.info("El host:"+service1.getWSDLDocumentLocation().getHost());

                                                  log.info("El path:"+service1.getWSDLDocumentLocation().getPath());

                                                  log.info("El Protocolo:"+service1.getWSDLDocumentLocation().getProtocol());

 

                                 Operacion port1 = service1.getOperacionPort();

                          

                           

                          

                            ((StubExt) port1).setConfigName("Standard WSSecurity Client");// add this line

                            System.setProperty("org.jboss.ws.wsse.keyStore", "D:\\MY_WEBSERVICES\\WEB_SERVICE_CLIENT\\src\\META-INF\\client-keystore.jks");

                            System.setProperty("org.jboss.ws.wsse.keyStorePassword", "changeit");

                            System.setProperty("org.jboss.ws.wsse.keyStoreType", "jks");

                           

                            System.setProperty("org.jboss.ws.wsse.trustStore", "D:\\MY_WEBSERVICES\\WEB_SERVICE_CLIENT\\src\\META-INF\\client-truststore.jks");

                            System.setProperty("org.jboss.ws.wsse.trustStorePassword", "changeit");

                            System.setProperty("org.jboss.ws.wsse.trustStoreType", "jks");

                          

                          

                           

                                     

                           

                          

                           

                            log.info("Call Web Service Operation...");

                            log.info("Server said: " + port1.multiplica(Integer.parseInt(args[0]),Integer.parseInt(args[1])));

                            log.info("***********************");

                            log.info("Call Over!");

                              } catch (Exception e) {

 

                                        log.error("ocurrio un Error ",e);

                              }

                  

              

                 

          }

}


 

 




Reply to this message by going to Community

Start a new discussion in JBoss Web Services at Community