<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    JBossWS Native + WS-Security - missing WS-SecurityPolicy info in WSDL
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/kamaze">Matthias Kahlau</a> in <i>JBoss Web Services</i> - <a href="http://community.jboss.org/message/532980#532980">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Hi all,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I wonder why my generated WSDL does not contain any WS-SecurityPolicy information. I configured WS-Security with the following server-side configuration:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="text-decoration: underline;">The Service Endpoint Interface implementation:</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>@WebService(endpointInterface = "com.masp.webservice.modLsdImport.server.ModificationLsdImport")<br/>@EndpointConfig(configName = "Standard WSSecurity Endpoint")<br/>public class ModificationLsdImportImpl implements ModificationLsdImport {</p><p>&#160;&#160;&#160; <br/>&#160;&#160;&#160; @Override<br/>&#160;&#160;&#160; public void doImport(List&lt;ModCanLsdPair&gt; data) {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; // todo<br/>&#160;&#160;&#160; }</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>}</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="text-decoration: underline;">The Service Endpoint Interface:</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>@WebService<br/>@BindingType(SOAPBinding.SOAP11HTTP_BINDING)<br/>public interface ModificationLsdImport {</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160; public void doImport(List&lt;ModCanLsdPair&gt; data);<br/> <br/>}</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="text-decoration: underline;">The jboss-wsse-server.xml:</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&lt;?xml version="1.0" encoding="UTF-8"?&gt;<br/><span>&lt;jboss-ws-security xmlns="</span><a class="jive-link-external-small" href="http://www.jboss.com/ws-security/config" target="_blank">http://www.jboss.com/ws-security/config</a><span>"</span><br/><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; xmlns:xsi="</span><a class="jive-link-external-small" href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a><span>"</span><br/><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; xsi:schemaLocation="</span><a class="jive-link-external-small" href="http://www.jboss.com/ws-security/config" target="_blank">http://www.jboss.com/ws-security/config</a><br/><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span><a class="jive-link-external-small" href="http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd" target="_blank">http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd</a><span>"&gt;</span><br/>&#160;&#160;&#160; &lt;key-store-file&gt;WEB-INF/keystore.jks&lt;/key-store-file&gt;<br/>&#160;&#160;&#160;&#160; &lt;key-store-password&gt;password&lt;/key-store-password&gt;<br/>&#160;&#160;&#160; &lt;key-store-type&gt;jks&lt;/key-store-type&gt;<br/>&#160;&#160;&#160; &lt;trust-store-file&gt;WEB-INF/cacerts.jks&lt;/trust-store-file&gt;<br/>&#160;&#160;&#160; &lt;trust-store-password&gt;password&lt;/trust-store-password&gt;<br/>&#160;&#160;&#160; &lt;trust-store-type&gt;jks&lt;/trust-store-type&gt;<br/>&#160;&#160;&#160; &lt;key-passwords&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;key-password alias="alias" password="password" /&gt;<br/>&#160;&#160;&#160; &lt;/key-passwords&gt;<br/>&#160;&#160;&#160; &lt;config&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;encrypt type="x509v3" alias="alias" /&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;requires&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;encryption/&gt;&#160;&#160;&#160;&#160;&#160; <br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/requires&gt;<br/>&#160;&#160;&#160;&#160; &lt;/config&gt;<br/>&lt;/jboss-ws-security&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span>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 </span><a class="jive-link-external-small" href="http://127.0.0.1:1977/TestApp/modificationLsdImportService/invoke?wsdl" target="_blank">http://127.0.0.1:1977/TestApp/modificationLsdImportService/invoke?wsdl</a><span>.</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="text-decoration: underline;">The WSDL looks like this:</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre id="line1">&lt;?xml version='1.0' encoding='UTF-8'?&gt;<br/>&lt;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'&gt;<br/> &lt;types&gt;<br/>&#160; &lt;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'&gt;<br/>&#160;&#160; &lt;xs:element name='doImport' type='tns:doImport'/&gt;<br/>&#160;&#160; &lt;xs:element name='doImportResponse' type='tns:doImportResponse'/&gt;<br/>&#160;&#160; &lt;xs:complexType name='doImport'&gt;<br/>&#160;&#160;&#160; &lt;xs:sequence&gt;<br/>&#160;&#160;&#160;&#160; &lt;xs:element maxOccurs='unbounded' minOccurs='0' name='arg0' type='tns:modCanLsdPair'/&gt;<br/>&#160;&#160;&#160; &lt;/xs:sequence&gt;<br/></pre><pre id="line11">&#160;&#160; &lt;/xs:complexType&gt;<br/>&#160;&#160; &lt;xs:complexType name='modCanLsdPair'&gt;<br/>&#160;&#160;&#160; &lt;xs:sequence&gt;<br/>&#160;&#160;&#160;&#160; &lt;xs:element minOccurs='0' name='lsd' type='xs:string'/&gt;<br/>&#160;&#160;&#160;&#160; &lt;xs:element minOccurs='0' name='modCan' type='xs:string'/&gt;<br/>&#160;&#160;&#160; &lt;/xs:sequence&gt;<br/>&#160;&#160; &lt;/xs:complexType&gt;<br/>&#160;&#160; &lt;xs:complexType name='doImportResponse'&gt;<br/>&#160;&#160;&#160; &lt;xs:sequence/&gt;<br/></pre><pre id="line20">&#160;&#160; &lt;/xs:complexType&gt;<br/>&#160; &lt;/xs:schema&gt;<br/> &lt;/types&gt;<br/> &lt;message name='ModificationLsdImport_doImport'&gt;<br/>&#160; &lt;part element='tns:doImport' name='doImport'&gt;&lt;/part&gt;<br/> &lt;/message&gt;<br/> &lt;message name='ModificationLsdImport_doImportResponse'&gt;<br/>&#160; &lt;part element='tns:doImportResponse' name='doImportResponse'&gt;&lt;/part&gt;<br/> &lt;/message&gt;<br/></pre><pre id="line29"> &lt;portType name='ModificationLsdImport'&gt;<br/>&#160; &lt;operation name='doImport' parameterOrder='doImport'&gt;<br/>&#160;&#160; &lt;input message='tns:ModificationLsdImport_doImport'&gt;&lt;/input&gt;<br/>&#160;&#160; &lt;output message='tns:ModificationLsdImport_doImportResponse'&gt;&lt;/output&gt;<br/>&#160; &lt;/operation&gt;<br/> &lt;/portType&gt;<br/> &lt;binding name='ModificationLsdImportBinding' type='tns:ModificationLsdImport'&gt;<br/>&#160; &lt;soap:binding style='document' transport='http://schemas.xmlsoap.org/soap/http'/&gt;<br/>&#160; &lt;operation name='doImport'&gt;<br/></pre><pre id="line38">&#160;&#160; &lt;soap:operation soapAction=''/&gt;<br/>&#160;&#160; &lt;input&gt;<br/>&#160;&#160;&#160; &lt;soap:body use='literal'/&gt;<br/>&#160;&#160; &lt;/input&gt;<br/>&#160;&#160; &lt;output&gt;<br/>&#160;&#160;&#160; &lt;soap:body use='literal'/&gt;<br/>&#160;&#160; &lt;/output&gt;<br/>&#160; &lt;/operation&gt;<br/> &lt;/binding&gt;<br/></pre><pre id="line47"> &lt;service name='ModificationLsdImportService'&gt;<br/>&#160; &lt;port binding='tns:ModificationLsdImportBinding' name='ModificationLsdImportPort'&gt;<br/>&#160;&#160; &lt;soap:address location='http://127.0.0.1:1977/EADS-SMP/modificationLsdImportService/invoke'/&gt;<br/>&#160; &lt;/port&gt;<br/> &lt;/service&gt;<br/>&lt;/definitions&gt;</pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>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 WSDL did contain security requirements in this case.</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/532980#532980">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss Web Services at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>