1 2 Previous Next 20 Replies Latest reply on Aug 12, 2014 5:40 AM by asoldano Go to original post
      • 15. Re: How can I resolve "General web Service security error"?
        kzivkovic

        Have you been able to solve this? I am trying to use wssecurity with ejb3.1 annotated class on JBoss 7.1.1.Final, and have no success? Should I manually create wsdl for this? If yes this seems quite impractical.

         

        Annotations used on implementation class:

        @Stateless
        @WebService
        @EndpointConfig(configFile = "jaxws-endpoint-config.xml", configName = "Custom WS-Security Endpoint")
        
        

        having jaxws-endpoint-config.xml with following content:

        <?xml version="1.0" encoding="UTF-8"?>
        <jaxws-config xmlns="urn:jboss:jbossws-jaxws-config:4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:javaee="http://java.sun.com/xml/ns/javaee"
          xsi:schemaLocation="urn:jboss:jbossws-jaxws-config:4.0 schema/jbossws-jaxws-config_4_0.xsd"
        >
        <!-- https://docs.jboss.org/author/display/JBWS/WS-Security -->
          <endpoint-config>
          <config-name>Custom WS-Security Endpoint</config-name>
          <property>
          <property-name>ws-security.username</property-name>
          <property-value>myuser</property-value>
          </property>
          <property>
          <property-name>ws-security.password</property-name>
          <property-value>mypassword</property-value>
          </property>
          <property>
          <property-name>ws-security.callback-handler</property-name>
          <property-value>org.mycompany.my.package.role.security.ServerPasswordCallback</property-value>
          </property>
          </endpoint-config>
        </jaxws-config>
        
        

        Is there some basic sample of this? Also for automatically generated WSDL from annotated class?

        • 16. Re: How can I resolve "General web Service security error"?
          asoldano

          @kzivkovic, there're testcases in the jbossws-cxf distribution and you can have a look at the doc at WS-Security - JBoss Web Services - Project Documentation Editor / WS-Security - JBoss AS 7.1 - Project Documentation Editor (the latter is actually for AS 7.1.x).

           

          @Fernando, I actually forgot about this thread, sorry. Hope you were able to get past your issue. Regarding the JAXWS RI being used on client side, you don't need to have other servers configured in Eclipse for it to pop up, it's a matter of how you client classpath is configured. Try setting the java.endorsed.dirs sys prop to the dir containing the jaxws api jar of your JBoss AS server.

          • 17. Re: How can I resolve "General web Service security error"?
            chuck14

            Hi Alessio,

            I have create a simple username token webservice from the example above and it works fine. I've been able to call it using Web Services Explorer as well as an existing WebLogic client.

            When I write my new client using jboss as described above, the headers are put in the http header instead of the SOAP header. The headers are correct, just not in the SOAP header.

            It is such a simple example, don't understand what I'm missing.

            Any help would be appreciated.

             

            Thanks,

            Chuck

            • 18. Re: How can I resolve "General web Service security error"?
              chuck14

              Allesio,

              One thing I should mention is that the client example works as a servlet but does not work as a standalone java process.

              Thanks,

              Chuck

              • 19. Re: How can I resolve "General web Service security error"?
                chuck14

                Sorry, when I wrote "the example above", I was referring to this article: https://docs.jboss.org/author/display/JBWS/WS-Security and was referring to the client example of the simple username token.

                • 20. Re: How can I resolve "General web Service security error"?
                  asoldano

                  The fact your client is working from a servlet and not from a standalone java process makes me think you're not using the JBossWS / Apache CXF implementation of JAX-WS in your standalone application, but the reference implementation (basically Metro) that ships within the JDK. Be sure to set your classpath properly and/or read this: Quick Start - JBoss Web Services - Project Documentation Editor

                  1 2 Previous Next