ws-ews-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ven...@apache.org
Subject svn commit: r154830 - webservices/ews/trunk/src/org/apache/geronimo/ews/ws4j2ee/toWs/ejb/EJBDDWriter.java
Date Tue, 22 Feb 2005 10:58:01 GMT
Author: venkat
Date: Tue Feb 22 02:57:58 2005
New Revision: 154830

URL: http://svn.apache.org/viewcvs?view=rev&rev=154830
Log:
Fixed the following issues in ejb-jar.xml generation.
1. ejbname is now read from WSCFContext instead of WSDLContext to keep it in synch with webservices.xml
2. ejb display-name is read directly read from WSCFContext instead of WscfdWsDesxription (it
was null).

Also did some cleanup in javadoc comments and other commented code.

Modified:
    webservices/ews/trunk/src/org/apache/geronimo/ews/ws4j2ee/toWs/ejb/EJBDDWriter.java

Modified: webservices/ews/trunk/src/org/apache/geronimo/ews/ws4j2ee/toWs/ejb/EJBDDWriter.java
URL: http://svn.apache.org/viewcvs/webservices/ews/trunk/src/org/apache/geronimo/ews/ws4j2ee/toWs/ejb/EJBDDWriter.java?view=diff&r1=154829&r2=154830
==============================================================================
--- webservices/ews/trunk/src/org/apache/geronimo/ews/ws4j2ee/toWs/ejb/EJBDDWriter.java (original)
+++ webservices/ews/trunk/src/org/apache/geronimo/ews/ws4j2ee/toWs/ejb/EJBDDWriter.java Tue
Feb 22 02:57:58 2005
@@ -29,8 +29,8 @@
 import org.apache.geronimo.ews.ws4j2ee.toWs.GenerationFault;
 
 /**
- * We are plan to use the JAXB to genarate and parse the
- * ejb-jar.xml file. this code is just for the get very simple
+ * We plan to use the JAXB to genarate and parse the
+ * ejb-jar.xml file. This code is here just to get a simple
  * DD created
  *
  * @author Srinath Perera(hemapani@opensource.lk)
@@ -54,29 +54,21 @@
     }
 
     public void writeSessionDD() throws GenerationFault {
-        String ejbname = j2eewscontext.getWSDLContext().getTargetPortType().getName().toLowerCase();
-        int index = ejbname.lastIndexOf(".");
-        if (index > 0) {
-            ejbname = ejbname.substring(index + 1);
+        String ejbname = j2eewscontext.getWSCFContext().getWscfport().getServiceImplBean().getEjblink();
+        if (ejbname == null || ejbname.equals("")) {
+        	throw new GenerationFault("Error reading ejbname from webservices.xml.");
         }
         String version = GenerationConstants.J2EE_VERSION_1_4;
         out.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
-//let us stack to the J2EE 1.4 and by the wy 1.3 has nothing to do with web services :) 
-//		if(version == GenerationConstants.J2EE_VERSION_1_3){
-//			out.write("<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans
2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>\n");
-//			out.write("<ejb-jar>\n");
-//		}else{
-//		}
         out.write("<ejb-jar xmlns=\"http://java.sun.com/xml/ns/j2ee\"\n");
         out.write("		 xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n");
         out.write("		 xsi:schemaLocation=\"http://java.sun.com/xml/ns/j2ee\n");
         out.write("		 http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd\"\n");
         out.write("		 version=\"2.1\">\n");
 
-        //out.write("<display-name>" + j2eewscontext.getWSCFContext().getWscfdWsDesxription().getDisplayName()
+ "</display-name>\n");
         out.write("\t<enterprise-beans>\n");
         out.write("\t\t<session>\n");
-        out.write("\t\t\t<display-name>" + j2eewscontext.getWSCFContext().getWscfdWsDesxription().getDisplayName()
+ "</display-name>\n");
+        out.write("\t\t\t<display-name>" + j2eewscontext.getWSCFContext().getDisplayName()
+ "</display-name>\n");
         out.write("\t\t\t<ejb-name>" + ejbname + "</ejb-name>\n");
         String implStyle = j2eewscontext.getMiscInfo().getImplStyle();
         if (GenerationConstants.USE_LOCAL_AND_REMOTE.equals(implStyle)



---------------------------------------------------------------------
To unsubscribe, e-mail: ews-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: ews-dev-help@ws.apache.org


Mime
View raw message