The following comment has been added to this issue:
Author: Michael Bauer
Created: Sun, 20 Mar 2005 10:21 PM
Body:
Is this issue still open? I know everyone is busy. I just wanted to know if
this is still on someone's "radar" or had it slipped off? If there is any more
information I can provide, please let me know.
---------------------------------------------------------------------
View this comment:
http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1296?page=comments#action_16130
---------------------------------------------------------------------
View the issue:
http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1296
Here is an overview of the issue:
---------------------------------------------------------------------
Key: XDT-1296
Summary: Axis Service Name is empty...
Type: Bug
Status: Open
Priority: Major
Original Estimate: Unknown
Time Spent: Unknown
Remaining: Unknown
Project: XDoclet
Components:
Apache Module
Versions:
1.2.1
Assignee: xdoclet-devel (Use for new issues)
Reporter: Michael Bauer
Created: Mon, 14 Mar 2005 5:57 AM
Updated: Sun, 20 Mar 2005 10:21 PM
Environment: Gentoo Linux, kernel 2.6.10-r6
Ant version 1.6.2
JVM version 1.4.2_07-b05
Description:
When trying to use XDoclet to create the web-service.xml file for Axis WSR
files, the corresponding service name is empty. This should be populated using
the @axis.service name="" directive, but it is not. Files are appended below:
build.xml
----------------
<project name="Tax Liens" default="package">
<target name="init">
<property name="basedir" value="./" />
<loadproperties srcFile="custom.properties"/>
<property name="src.dir" value="${basedir}/src" />
<property name="bin.dir" value="${basedir}/bin" />
<property name="lib.dir" value="${basedir}/lib" />
<property name="dist.dir" value="${basedir}/dist" />
<property name="meta.dir" value="${basedir}/META-INF" />
<property name="web-inf.dir" value="${basedir}/WEB-INF" />
<property name="jsp.dir" value="${basedir}/jsp" />
<property name="jarfile.name" value="TaxLiens.jar" />
<property name="warfile.name" value="TaxLiens.war" />
<property name="wsrfile.name" value="TaxLiens.wsr" />
<tstamp>
<format property="TODAY" pattern="d-MM-yy"/>
</tstamp>
<path id="jar.files">
<fileset dir="${lib.dir}">
<include name="**/*.jar"/>
<include name="**/*.zip"/>
</fileset>
<fileset dir="${xdoclet.lib.dir}">
<include name="**/*.jar"/>
<include name="**/*.zip"/>
</fileset>
<fileset dir="${struts.lib.dir}">
<include name="**/*.jar"/>
<include name="**/*.zip"/>
</fileset>
<fileset dir="${struts_legacy.lib.dir}">
<include name="**/*.jar"/>
<include name="**/*.zip"/>
</fileset>
<fileset dir="${j2ee.lib.dir}">
<include name="**/*.jar"/>
<include name="**/*.zip"/>
</fileset>
</path>
<pathconvert pathsep=":" property="jar.file.prop"
refid="jar.files"/>
<echo>Path: ${jar.file.prop}</echo>
</target>
<target name="clean">
<delete failonerror="false">
<fileset dir="${bin.dir}" >
<include name="**"/>
</fileset>
<fileset dir="${dist.dir}" >
<include name="**"/>
</fileset>
<fileset dir="${meta.dir}" >
<include name="**"/>
</fileset>
<fileset dir="${web-inf.dir}" >
<include name="**"/>
</fileset>
</delete>
</target>
<target name="prepare" depends="init,clean">
<mkdir dir="${bin.dir}"/>
<mkdir dir="${dist.dir}"/>
<mkdir dir="${meta.dir}"/>
<mkdir dir="${web-inf.dir}"/>
<mkdir dir="${web-inf.dir}/lib"/>
<mkdir dir="${web-inf.dir}/classes"/>
<copy file="${struts.lib.dir}/struts.jar"
todir="${web-inf.dir}/lib"></copy>
</target>
<target name="xdoclet" depends="prepare">
<taskdef
name="ejbdoclet"
classname="xdoclet.modules.ejb.EjbDocletTask"
classpathref="jar.files"
/>
<taskdef
name="webdoclet"
classname="xdoclet.modules.web.WebDocletTask"
classpathref="jar.files"
/>
<ejbdoclet
destdir="${src.dir}"
excludedtags="@version,@author"
addedtags="@xdoclet-generated at ${TODAY}"
ejbspec="2.0">
<fileset dir="${src.dir}">
<include name="**/*Bean.java"/>
</fileset>
<dataobject/>
<packageSubstitution packages="persistence"
substituteWith="interfaces"/>
<remoteinterface pattern="{0}Remote"/>
<localinterface pattern="{0}"/>
<homeinterface />
<localhomeinterface/>
<entitypk/>
<entitycmp/>
<deploymentdescriptor destdir="${meta.dir}"/>
<jboss version="3.2"
preferredRelationMapping="relation-table"
datasource="java:/LocalDS"
datasourcemapping="mySQL"
destdir="${meta.dir}" />
<axisdeploy
destdir="${meta.dir}"
prefixWithPackageStructure="false" />
</ejbdoclet>
<webdoclet destdir="${web-inf.dir}"
excludedtags="@version,@author" verbose="true">
<fileset dir="${src.dir}">
<include name="**/*Form.java" />
<include name="**/*Action.java" />
<include name="**/*Servlet.java" />
</fileset>
<deploymentdescriptor validatexml="true"
servletspec="2.3" sessiontimeout="60"
destdir="${web-inf.dir}" distributable="false">
</deploymentdescriptor>
<strutsconfigxml validatexml="true" version="1.1"/>
<strutsvalidationxml/>
</webdoclet>
<move
file="${meta.dir}/deploy-JaxDelinquentFileImporterBean.xml"
tofile="${meta.dir}/web-service.xml"/>
</target>
<target name="compile" depends="xdoclet">
<javac
classpathref="jar.files"
debug="true"
srcdir="${src.dir}"
destdir="${bin.dir}" />
</target>
<target name="package" depends="compile">
<jar destfile="${dist.dir}/${jarfile.name}">
<fileset dir="${bin.dir}">
<include name="**"/>
<exclude name="**/view/*.class"/>
</fileset>
<metainf dir="${meta.dir}">
<include name="**"/>
<exclude name="**/web-service.xml" />
</metainf>
</jar>
<jar jarfile="${dist.dir}/${wsrfile.name}" update="no">
<metainf dir="${meta.dir}" includes="web-service.xml" />
<fileset dir="${bin.dir}">
<include name="**/*.class"/>
</fileset>
</jar>
<!--<war destfile="${dist.dir}/${warfile.name}"
webxml="${web-inf.dir}/web.xml">
<fileset dir="${bin.dir}">
<include name="**/view/*.class"/>
</fileset>
<fileset dir="${jsp.dir}">
<include name="**/*.jsp"/>
</fileset>
<webinf dir="${web-inf.dir}">
<include name="**"/>
</webinf>
</war>-->
</target>
</project>
JaxDelinquentFileImporterBean.java
-----------------------------------
/*
* Created on Feb 16, 2005
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
package com.codechimp.taxliens;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.rmi.RemoteException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.zip.ZipInputStream;
import javax.ejb.CreateException;
import javax.ejb.EJBException;
import javax.ejb.SessionBean;
import javax.ejb.SessionContext;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.naming.event.NamingExceptionEvent;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
/**
* @author Michael Bauer
*
* @ejb.bean
* name="JaxDelinquentFileImporter"
* description="Downloads and imports the Jacksonville Delinquent
Tax file"
* type="Stateless"
* jndi-name="ejb/JaxDelinquentFileImporterRemoteHome"
* local-jndi-name="ejb/JaxDelinquentFileImporterLocalHome"
* view-type="both"
* transaction-type="Bean"
*
* @ejb.interface
*
remote-class="com.codechimp.taxliens.JaxDelinquentFileImporterRemote"
*
local-class="com.codechimp.taxliens.JaxDelinquentFileImporterLocal"
*
* @ejb.home
*
remote-class="com.codechimp.taxliens.JaxDelinquentFileImporterRemoteHome"
*
local-class="com.codechimp.taxliens.JaxDelinquentFileImporterLocalHome"
*
* @ejb.transaction
* type="Supports"
*
* @ejb.env-entry
* name="delinquentTaxURL
* type="java.lang.String"
* value="http://apps1.coj.net/tc/data/dqdata.Zip"
*
* @axis.service
* name="JaxDelinquentFileImporterService"
* provider="java:EJB"
* scope="Request"
*/
public class JaxDelinquentFileImporterBean implements SessionBean {
private SessionContext _ctx;
private InitialContext jndiContext;
private String delTaxURL;
private Logger _log = LogManager.getLogger(this.getClass().getName());
public void setSessionContext(SessionContext ctx) throws EJBException,
RemoteException {
_ctx=ctx;
try {
jndiContext = new InitialContext();
delTaxURL =
(String)jndiContext.lookup("java:/comp/env/delinquentTaxURL");
if(delTaxURL==null) {
throw new NullPointerException("delinquentTaxURL could not be
determined!");
}
} catch(Exception e) {
_log.error("An error occured setting the context for
JaxDelinquentFileImporterBean.",e);
throw new EJBException(e);
}
}
public void ejbCreate() throws CreateException {}
public void ejbRemove() throws EJBException, RemoteException {
try {
jndiContext.close();
} catch(NamingException ne) {}
}
public void ejbActivate() throws EJBException, RemoteException {}
public void ejbPassivate() throws EJBException, RemoteException {}
/**
*
* @ejb.interface-method view-type="both"
* @axis.method
*/
public void importDelinquentTaxFile() throws EJBException {
try {
JaxPropertyLocalHome propHome =
(JaxPropertyLocalHome)jndiContext.lookup("ejb/JaxPropertyLocalHome");
JaxTaxLienLocalHome certHome =
(JaxTaxLienLocalHome)jndiContext.lookup("ejb/JaxTaxLienLocalHome");
// Remove all properties
Collection c=propHome.findAll();
Iterator it=c.iterator();
while(it.hasNext()) {
JaxPropertyLocal propBean = (JaxPropertyLocal)it.next();
propBean.remove();
}
c=certHome.findAll();
it=c.iterator();
while(it.hasNext()) {
JaxTaxLienLocal certBean = (JaxTaxLienLocal)it.next();
certBean.remove();
}
// Ok, now we can proceed to read the file in
URL url = new URL(delTaxURL);
BufferedReader buff = new BufferedReader(new InputStreamReader(new
ZipInputStream(url.openStream())));
for(String line=buff.readLine(); line!=null; line=buff.readLine()) {
List lLine = parseLine(line);
Long reNum = new Long((String)lLine.get(0));
if(propHome.findByPrimaryKey(reNum)==null) {
propHome.create(lLine);
}
certHome.create(lLine);
}
} catch(Exception e) {
_log.error("Could not import the Delinquent Tax File.",e);
throw new EJBException(e);
}
}
/**
*
* @param line
*/
private List parseLine(String line) {
ArrayList list = new ArrayList();
list.add(line.substring(0,10));
list.add(line.substring(10,1));
list.add(line.substring(11,4));
list.add(line.substring(15,8));
list.add(line.substring(23,1));
list.add(line.substring(24,1));
list.add(line.substring(25,10));
list.add(line.substring(35,1));
list.add(line.substring(36,3));
list.add(line.substring(39,7)); // 10
list.add(line.substring(46,7));
list.add(line.substring(53,1));
list.add(line.substring(54,1)); // 13
list.add(line.substring(55,1));
list.add(line.substring(56,30));
list.add(line.substring(86,30));
list.add(line.substring(116,30));
list.add(line.substring(146,30));
list.add(line.substring(176,30));
list.add(line.substring(206,30)); // 20
list.add(line.substring(236,36));
list.add(line.substring(272,36));
list.add(line.substring(308,36));
list.add(line.substring(344,36));
list.add(line.substring(380,36));
list.add(line.substring(416,36));
list.add(line.substring(452,36));
list.add(line.substring(488,36));
list.add(line.substring(524,40));
list.add(line.substring(564,40)); // 30
list.add(line.substring(604,40));
list.add(line.substring(644,29));
list.add(line.substring(673,2));
list.add(line.substring(675,5));
list.add(line.substring(680,4));
list.add(line.substring(694,5));
list.add(line.substring(689,3));
list.add(line.substring(692,1));
list.add(line.substring(693,8));
list.add(line.substring(701,9)); // 40
list.add(line.substring(710,1));
list.add(line.substring(711,1));
list.add(line.substring(712,1));
list.add(line.substring(713,10));
list.add(line.substring(723,10));
list.add(line.substring(733,10));
list.add(line.substring(743,10));
list.add(line.substring(753,10));
list.add(line.substring(763,10));
list.add(line.substring(773,10)); // 50
list.add(line.substring(783,10));
list.add(line.substring(793,10));
list.add(line.substring(803,7));
list.add(line.substring(810,5));
list.add(line.substring(815,10));
list.add(line.substring(825,10));
list.add(line.substring(835,10));
list.add(line.substring(845,10));
list.add(line.substring(855,8));
list.add(line.substring(863,2)); // 60
list.add(line.substring(865,2));
list.add(line.substring(867,10));
list.add(line.substring(877,8));
list.add(line.substring(885,3));
list.add(line.substring(888,4));
list.add(line.substring(892,4));
list.add(line.substring(896,10));
list.add(line.substring(906,8));
list.add(line.substring(914,5));
list.add(line.substring(919,8)); // 70
list.add(line.substring(927,10));
list.add(line.substring(937,6));
list.add(line.substring(943,9));
list.add(line.substring(952,9));
list.add(line.substring(961,6));
list.add(line.substring(967,6));
list.add(line.substring(973,10));
list.add(line.substring(983,10));
list.add(line.substring(993,8));
list.add(line.substring(1001,8)); // 80
list.add(line.substring(1009,3));
list.add(line.substring(1012,2));
list.add(line.substring(1014,4));
list.add(line.substring(1018,4));
list.add(line.substring(1022,8)); // 85
return list;
}
}
resulting web-service.xml
-------------------------
<?xml version="1.0" encoding="UTF-8"?>
<deployment
xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"
xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance">
<service name=""
provider="java:EJB"
>
<parameter name="beanJndiName"
value="ejb/JaxDelinquentFileImporterRemoteHome"/>
<parameter name="homeInterfaceName"
value="com.codechimp.taxliens.JaxDelinquentFileImporterRemoteHome"/>
<parameter name="jndiURL"
value=""/>
<parameter name="jndiContextClass"
value=""/>
<parameter name="allowedMethods"
value="importDelinquentTaxFile "
/>
<parameter name="scope"
value="Request"/>
</service>
<!--
To add type mappings to the deployment descriptor, add a file to your
XDoclet merge directory called axis-mappings-{0}.xml that contains the
<beanMapping/> and <typeMapping/> markup.
-->
</deployment>
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/xdoclet/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
xdoclet-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel