djencks     2005/05/22 18:27:59

  Modified:    modules/openejb-builder/src/java/org/openejb/deployment
                        AxisWebServiceContainerBuilder.java
  Log:

  GERONIMO-651 allow ejb ws to specify their address in the openejb plan
  
  Revision  Changes    Path
  1.7       +11 -7     
openejb/modules/openejb-builder/src/java/org/openejb/deployment/AxisWebServiceContainerBuilder.java
  
  Index: AxisWebServiceContainerBuilder.java
  ===================================================================
  RCS file: 
/home/projects/openejb/scm/openejb/modules/openejb-builder/src/java/org/openejb/deployment/AxisWebServiceContainerBuilder.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- AxisWebServiceContainerBuilder.java       17 May 2005 00:29:27 -0000      
1.6
  +++ AxisWebServiceContainerBuilder.java       22 May 2005 22:27:58 -0000      
1.7
  @@ -81,13 +81,17 @@
           }
   
           serviceEndpointName = serviceEndpointName.trim();
  +        String location = null;
  +        if (openejbSessionBean != null && 
openejbSessionBean.isSetWebServiceAddress()) {
  +            location = openejbSessionBean.getWebServiceAddress().trim();
  +        }
   
  -        GBeanData gBean = buildGBeanData(sessionObjectName, listener, 
ejbName, serviceEndpointName, ejbModule.getModuleFile(), cl, 
webServiceSecurity);
  +        GBeanData gBean = buildGBeanData(sessionObjectName, listener, 
ejbName, serviceEndpointName, location, ejbModule.getModuleFile(), cl, 
webServiceSecurity);
   
           earContext.addGBean(gBean);
       }
   
  -    GBeanData buildGBeanData(ObjectName sessionObjectName, ObjectName 
listener, String ejbName, String serviceEndpointName, JarFile jarFile, 
ClassLoader cl, OpenejbWebServiceSecurityType webServiceSecurity) throws 
DeploymentException {
  +    GBeanData buildGBeanData(ObjectName sessionObjectName, ObjectName 
listener, String ejbName, String serviceEndpointName, String location, JarFile 
jarFile, ClassLoader cl, OpenejbWebServiceSecurityType webServiceSecurity) 
throws DeploymentException {
           ServiceInfo serviceInfo = 
AxisServiceBuilder.createServiceInfo(jarFile, ejbName, cl);
           JavaServiceDesc ejbServiceDesc = serviceInfo.getServiceDesc();
   
  @@ -102,9 +106,9 @@
           catch (URISyntaxException e) {
               throw new DeploymentException("Invalid WSDL URI: "+ wsdlFile, e);
           }
  -        URI location = null;
  +        URI locationURI = null;
           try {
  -            location = new URI(ejbServiceDesc.getEndpointURL());
  +            locationURI = new URI(location != null? location: 
ejbServiceDesc.getEndpointURL());
           } catch (URISyntaxException e) {
               throw new DeploymentException("Invalid address location URI: 
"+ejbServiceDesc.getEndpointURL(), e);
           }
  @@ -118,10 +122,10 @@
               transportGuarantee = 
webServiceSecurity.getTransportGuarantee().toString();
               authMethod = webServiceSecurity.getAuthMethod().toString();
           }
  -        GBeanData gBean = WSContainerGBean.createGBean(ejbName, 
  +        GBeanData gBean = WSContainerGBean.createGBean(ejbName,
                   sessionObjectName,
                   listener,
  -                location,
  +                locationURI,
                   wsdlURI,
                   serviceInfo,
                   securityRealmName,
  
  
  

Reply via email to