users@glassfish.java.net

Re: Problem with wsdls on secure http-listener

From: <glassfish_at_javadesktop.org>
Date: Mon, 03 Dec 2007 12:38:38 PST

Hi,

You may have forgotten to define a "sun-ejb-jar.xml" / "sun-web.xml" file descriptor to configure your webservice endpoint with CONFIDENTIAL transport-guarantee and the new desired "wsdl-publish-location".

For example, supose you have a WEB service implemented as an EJB3 session bean like this:

import javax.ejb.Stateless;
import javax.jws.WebService;
import javax.jws.WebMethod;

@WebService
@Stateless
public class YourBean implements YourInterface
{
    @WebMethod
    public String sayHello(String name) { return "Hello " + name; }
}


Then, you should have to define a "sun-ejb-jar.xml" file descriptor like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Application Serve
r 9.0 EJB 3.0//EN" "http://www.sun.com/software/appserver/dtds/sun-ejb-jar_3_0-0
.dtd">
<sun-ejb-jar>
  <enterprise-beans>
    <ejb>
      <ejb-name>YourBean</ejb-name>
      <webservice-endpoint>
        <port-component-name>YourBean</port-component-name>
        <transport-guarantee>CONFIDENTIAL</transport-guarantee>
      </webservice-endpoint>
    </ejb>
    <webservice-description>
      <webservice-description-name>YourBeanService</webservice-description-name>
       <wsdl-publish-location>https://yourMachine:8181/YourBeanService/YourBean?WSDL</wsdl-publish-location>
    </webservice-description>
  </enterprise-beans>

</sun-ejb-jar>


I hope it works for your web service.
[Message sent by forum member 'jmarine' (jmarine)]

http://forums.java.net/jive/thread.jspa?messageID=248331