<!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;"> </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;"> </p><p><span style="text-decoration: underline;">The Service Endpoint Interface implementation:</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>@WebService(endpointInterface = "com.masp.webservice.modLsdImport.server.ModificationLsdImport")<br/>@EndpointConfig(configName = "Standard WSSecurity Endpoint")<br/>public class ModificationLsdImportImpl implements ModificationLsdImport {</p><p>    <br/>    @Override<br/>    public void doImport(List<ModCanLsdPair> data) {<br/>        // todo<br/>    }</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>}</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="text-decoration: underline;">The Service Endpoint Interface:</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>@WebService<br/>@BindingType(SOAPBinding.SOAP11HTTP_BINDING)<br/>public interface ModificationLsdImport {</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>    public void doImport(List<ModCanLsdPair> data);<br/> <br/>}</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="text-decoration: underline;">The jboss-wsse-server.xml:</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><?xml version="1.0" encoding="UTF-8"?><br/><span><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>                   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>                   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>                   </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>"></span><br/>    <key-store-file>WEB-INF/keystore.jks</key-store-file><br/>     <key-store-password>password</key-store-password><br/>    <key-store-type>jks</key-store-type><br/>    <trust-store-file>WEB-INF/cacerts.jks</trust-store-file><br/>    <trust-store-password>password</trust-store-password><br/>    <trust-store-type>jks</trust-store-type><br/>    <key-passwords><br/>        <key-password alias="alias" password="password" /><br/>    </key-passwords><br/>    <config><br/>         <encrypt type="x509v3" alias="alias" /><br/>           <requires><br/>               <encryption/>      <br/>          </requires><br/>     </config><br/></jboss-ws-security></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </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;"> </p><p><span style="text-decoration: underline;">The WSDL looks like this:</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><pre id="line1"><?xml version='1.0' encoding='UTF-8'?><br/><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'><br/> <types><br/>  <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'><br/>   <xs:element name='doImport' type='tns:doImport'/><br/>   <xs:element name='doImportResponse' type='tns:doImportResponse'/><br/>   <xs:complexType name='doImport'><br/>    <xs:sequence><br/>     <xs:element maxOccurs='unbounded' minOccurs='0' name='arg0' type='tns:modCanLsdPair'/><br/>    </xs:sequence><br/></pre><pre id="line11">   </xs:complexType><br/>   <xs:complexType name='modCanLsdPair'><br/>    <xs:sequence><br/>     <xs:element minOccurs='0' name='lsd' type='xs:string'/><br/>     <xs:element minOccurs='0' name='modCan' type='xs:string'/><br/>    </xs:sequence><br/>   </xs:complexType><br/>   <xs:complexType name='doImportResponse'><br/>    <xs:sequence/><br/></pre><pre id="line20">   </xs:complexType><br/>  </xs:schema><br/> </types><br/> <message name='ModificationLsdImport_doImport'><br/>  <part element='tns:doImport' name='doImport'></part><br/> </message><br/> <message name='ModificationLsdImport_doImportResponse'><br/>  <part element='tns:doImportResponse' name='doImportResponse'></part><br/> </message><br/></pre><pre id="line29"> <portType name='ModificationLsdImport'><br/>  <operation name='doImport' parameterOrder='doImport'><br/>   <input message='tns:ModificationLsdImport_doImport'></input><br/>   <output message='tns:ModificationLsdImport_doImportResponse'></output><br/>  </operation><br/> </portType><br/> <binding name='ModificationLsdImportBinding' type='tns:ModificationLsdImport'><br/>  <soap:binding style='document' transport='http://schemas.xmlsoap.org/soap/http'/><br/>  <operation name='doImport'><br/></pre><pre id="line38">   <soap:operation soapAction=''/><br/>   <input><br/>    <soap:body use='literal'/><br/>   </input><br/>   <output><br/>    <soap:body use='literal'/><br/>   </output><br/>  </operation><br/> </binding><br/></pre><pre id="line47"> <service name='ModificationLsdImportService'><br/>  <port binding='tns:ModificationLsdImportBinding' name='ModificationLsdImportPort'><br/>   <soap:address location='http://127.0.0.1:1977/EADS-SMP/modificationLsdImportService/invoke'/><br/>  </port><br/> </service><br/></definitions></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </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>