2 Replies Latest reply on Mar 26, 2010 4:44 AM by Matthias Kahlau

    JBossWS Native + WS-Security - missing WS-SecurityPolicy info in WSDL

    Matthias Kahlau Newbie

      Hi all,


      I wonder why the generated WSDL of my JBossWS Native Web Service does not contain any WS-SecurityPolicy information?! I configured WS-Security (without using any JAAS security) with the following server-side configuration:


      The Service Endpoint Interface implementation:




      @EndpointConfig(configName = "Standard WSSecurity Endpoint")
      public class ModificationLsdImport {

          public void doImport(List<ModCanLsdPair> data) {
              // todo





      The jboss-wsse-server.xml:


      <?xml version="1.0" encoding="UTF-8"?>
      <jboss-ws-security xmlns="http://www.jboss.com/ws-security/config"
              <key-password alias="alias" password="password" />
               <encrypt type="x509v3" alias="alias" />


      My endpoint is a servlet endpoint, so the jboss-wsse-server.xml is contained in the WEB-INF directory - besides keystore.jks, cacerts.jks and the web.xml. The WAR is deployed into a JBoss 5.1.0.GA with default JBossWS Native 3.1.2.GA (I also tested it with JBossWS Native 3.2.2.GA). The JDK (SUN) is 1.6.0_12 (Windows Vista 32 Bit). The WAR is contained in an EAR and seems to by deployed correctly. I can get the WSDL by using Firefox pointed to


      The WSDL looks like this:


      <?xml version='1.0' encoding='UTF-8'?>
      <definitions name='ModificationLsdImportService' targetNamespace='http://server.modLsdImport.webservice.masp.com/' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://server.modLsdImport.webservice.masp.com/' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
        <xs:schema targetNamespace='http://server.modLsdImport.webservice.masp.com/' version='1.0' xmlns:tns='http://server.modLsdImport.webservice.masp.com/' xmlns:xs='http://www.w3.org/2001/XMLSchema'>
         <xs:element name='doImport' type='tns:doImport'/>
         <xs:element name='doImportResponse' type='tns:doImportResponse'/>
         <xs:complexType name='doImport'>
           <xs:element maxOccurs='unbounded' minOccurs='0' name='arg0' type='tns:modCanLsdPair'/>
         <xs:complexType name='modCanLsdPair'>
           <xs:element minOccurs='0' name='lsd' type='xs:string'/>
           <xs:element minOccurs='0' name='modCan' type='xs:string'/>
         <xs:complexType name='doImportResponse'>
      <message name='ModificationLsdImport_doImport'>
        <part element='tns:doImport' name='doImport'></part>
      <message name='ModificationLsdImport_doImportResponse'>
        <part element='tns:doImportResponse' name='doImportResponse'></part>
       <portType name='ModificationLsdImport'>
        <operation name='doImport' parameterOrder='doImport'>
         <input message='tns:ModificationLsdImport_doImport'></input>
         <output message='tns:ModificationLsdImport_doImportResponse'></output>
      <binding name='ModificationLsdImportBinding' type='tns:ModificationLsdImport'>
        <soap:binding style='document' transport='http://schemas.xmlsoap.org/soap/http'/>
        <operation name='doImport'>
         <soap:operation soapAction=''/>
          <soap:body use='literal'/>
          <soap:body use='literal'/>
       <service name='ModificationLsdImportService'>
        <port binding='tns:ModificationLsdImportBinding' name='ModificationLsdImportPort'>
         <soap:address location=''/>



      My question is - why doesn't the generated WSDL contain any security related information? How should the Web Service client know that it has to encrypt the message? The WSDL I generated explicitely with wsprovide looks the same.


      I already used the JBossWS Metro stack and WS-Security configured (WSIT). The generated WSDL did contain security requirements in this case.


      Thanking you in anticipation.

        • 1. Re: JBossWS Native + WS-Security - missing WS-SecurityPolicy info in WSDL
          Keshav Savant Newbie

          The security informations and configurations are majorly on the server side. On the server we have the XML files (jboss-wsse-server.xml & $JBOSS_HOME\server\xxx\deploy\jbossws.sar\META-INF\standard-jaxws-endpoint-config.xml) along with the certificates. And then we have annotations to make the web service encrypted.


          On the client side we have our xmls (jboss-wsse-client.xml & standard-jaxws-client-config.xml) along with certificates (fPublic Key) so that our client has encryptaion details also.

          1 of 1 people found this helpful
          • 2. Re: JBossWS Native + WS-Security - missing WS-SecurityPolicy info in WSDL
            Matthias Kahlau Newbie

            Thanks for your response. Which security related annotations do you refer to? I only know the @EndpointConfig on the SEI. I use this annotation like this:

            @EndpointConfig(configName = "Standard WSSecurity Endpoint")


            The "Standard WSSecurity Endpoint" is defined in:



            I did not change this configuration in any way:


                <config-name>Standard WSSecurity Endpoint</config-name>
                    <javaee:protocol-bindings>##SOAP11_HTTP ##SOAP11_HTTP_MTOM</javaee:protocol-bindings>
                      <javaee:handler-name>WSSecurity Handler</javaee:handler-name>
                      <javaee:handler-name>Recording Handler</javaee:handler-name>


            So I don't know what is missing to get the encryption started.


            Does it only work in combination with a JAAS configuration?


            Does JBoss 5.1.0.GA including JBossWS Native 3.1.2.GA or 3.2.2.GA (JDK 6) support rendering WS-SecurityPolicy in the WSDL at all, when WS-Security is configured on the server side? (I do only want to figure out this issue at the moment. Did not try a client side security configuration (jboss-wsse-client.xml etc.) yet!)

            If this should work, could you please post me the relevant snippets or point to wrong or missing aspects of my setup described so far in this thread?


            Any help highly appreciated.