legsem / legstar

Automatically exported from code.google.com/p/legstar
0 stars 2 forks source link

generation of binding classes and transformer classes #171

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.changes is done in build-coxb.xml file
xsdFile         
jaxbPackageName 
jaxbRootClass    
2.run the command in terminal (ant -f build-coxb.xml)

What is the expected output? What do you see instead?

genrate the transformer classes and binding classes. this is done by using ant.

i want to implement this on java like cob2xsd.

What version of the product are you using? On what operating system?
we are using legstar-coxbgen-1.5.8 api on fedora version of linux

Please provide any additional information below.
we are generating xsd schema by using legstar-cob2xsd0.3.5.
we are able to genrate transformer classes and binding classes by using ant 
script in java.
now we are trying java code that generate transformer and binding classes.
sample code:
import java.io.File;
import java.util.ArrayList;
import java.util.List;

import com.legstar.coxb.gen.CoxbBindingGenerator;
import com.legstar.coxb.gen.CoxbGenModel;
import com.legstar.jaxb.gen.CobolJAXBGenerator;
import com.legstar.jaxb.gen.JaxbGenModel;

public class CoxbgenParameters
{   
    private boolean generateIsSetMethod = true;
    private long serializableUid = 1 ;
    private boolean xmlTransformers = true ;
public void getCoxbgenParameters(List<String> objectName)
    {
    try
    {
        JaxbGenModel cobj = new JaxbGenModel();
        //File cobol=new File(XsdFileName);
        //cobj.setXsdFile(cobol);
        //cobj.setTargetDir(new File("src"));
        cobj.setXsdLocation("schema/cobo.xsd");
        cobj.setJaxbPackageName("com.legstar.test.coxb");
        cobj.setGenerateIsSetMethod(generateIsSetMethod);
        cobj.setSerializableUid(serializableUid);
        CobolJAXBGenerator cob = new CobolJAXBGenerator();
        cob.setTargetDir(new File("src"));
        cob.execute();
        //CoxbBindingGenerator cobB = new CoxbBindingGenerator();
        CoxbGenModel cobB = new CoxbGenModel();
        cobB.setJaxbPackageName("com.legstar.test.coxb");
        cobB.setCoxbPackageName("com.legstar.test.coxb.bind");
        cobB.setXmlTransformers(xmlTransformers);
        cobB.setJaxbRootClassNames(objectName);
        cobB.setJaxbGenModel(cobj);
        CoxbBindingGenerator cobBj = new CoxbBindingGenerator();
        cobBj.setTargetDir(new File("src"));
        cobBj.execute();
    }
    catch(Exception e)
    {
         e.printStackTrace();
    }

    }
    public static void main(String arg[])
    {   ArrayList <String> li = new ArrayList<String>(); 
        li.add("CustomerData");
        CoxbgenParameters coj = new CoxbgenParameters();
        coj.getCoxbgenParameters(li);
    }

}

Original issue reported on code.google.com by nitin.dh...@gmail.com on 18 Feb 2013 at 9:41

Attachments:

GoogleCodeExporter commented 9 years ago
If this is an issue, what is the issue? If this is not an issue, please use 
https://groups.google.com/forum/?fromgroups#!forum/legstar-user for open topics.

Original comment by fady.mou...@gmail.com on 18 Feb 2013 at 5:19

GoogleCodeExporter commented 9 years ago
Hi fady,
this is not an issue.
we want to suggestion from your site. are we following right direction ?
or there is any sample code for doing this.

Original comment by nitin.dh...@gmail.com on 19 Feb 2013 at 5:17

GoogleCodeExporter commented 9 years ago
Please move this to 
https://groups.google.com/forum/?fromgroups#!forum/legstar-user

Original comment by fady.mou...@gmail.com on 19 Feb 2013 at 6:22