Know about ant-sca-deploy.xml

Hi All,
Can you please explain me the ant-sca-deploy.xml works, whcih parameters has to be passed ? for deployment

Hi
You can get more information from "ant-sca-deploy.xml" 's deploy target.
<target name="deploy">
<input message="Please enter server URL:" addproperty="serverURL"/>
<input message="Please enter sar location:" addproperty="sarLocation"/>
<deployComposite serverUrl="${serverURL}" sarLocation="${sarLocation}" user="${user}" password="${password}"
overwrite="${overwrite}" forceDefault="${forceDefault}" configPlan="${configplan}"
sysPropFile="${sysPropFile}"/>
</target>
One Example:
ant -f e:\Oracle\Middleware\Oracle_SOA1\bin\ant-sca-deploy.xml -DserverURL=http://DOMAIN:8001 -DsarLocation=D:\SayHelloSCA\deploy\sca_SayHelloSCA_rev1.0.jar -Duser=weblogic -Dpassword=weblogic -Doverwrite=true
You can also get help using "help" target
ant -f D:\Oracle\Middleware\Oracle_SOA1\bin\ant-sca-deploy.xml help
Edited by: Kathir(597386 ) on Sep 1, 2009 12:51 AM

Similar Messages

  • Error at the time of Deployment of Composit ---  ant-sca-compile.xml

    Hi,
    While deploying the composite, it’s throwing given error
    [03:03:42 PM] ---- Deployment started. ----
    [03:03:42 PM] Target platform is (Weblogic 10.3).
    [03:03:42 PM] Running dependency analysis...
    [03:03:42 PM] Building...
    [03:03:49 PM] Deploying profile...
    [03:03:50 PM] Wrote Archive Module to H:\AIASOAProject\AIAFrameworkProject\ReceiptListEBS\deploy\sca_ReceiptListEBS_rev1.0.jar
    [03:03:50 PM] Deploying sca_ReceiptListEBS_rev1.0.jar to soa_server1 [edpsvddb002.baea.com.au:8001]
    [03:03:50 PM] Processing sar=/H:/AIASOAProject/AIAFrameworkProject/ReceiptListEBS/deploy/sca_ReceiptListEBS_rev1.0.jar
    [03:03:50 PM] Adding sar file - H:\AIASOAProject\AIAFrameworkProject\ReceiptListEBS\deploy\sca_ReceiptListEBS_rev1.0.jar
    [03:03:50 PM] Preparing to send HTTP request for deployment
    [03:03:50 PM] Creating HTTP connection to host:edpsvddb002.baea.com.au, port:8001
    [03:03:50 PM] Sending internal deployment descriptor
    [03:03:50 PM] Sending archive - sca_ReceiptListEBS_rev1.0.jar
    [03:03:52 PM] Received HTTP response from the server, response code=401
    [03:03:52 PM] Problem in sending HTTP request to the server. Check standard HTTP response code for 401
    [03:03:52 PM] Error deploying archive sca_ReceiptListEBS_rev1.0.jar to soa_server1 [edpsvddb002.baea.com.au:8001]
    [03:03:52 PM] HTTP error code returned [401]
    [03:03:52 PM] No error message is returned from the server.
    [03:03:52 PM] Error deploying archive sca_ReceiptListEBS_rev1.0.jar to soa_server1 [edpsvddb002.baea.com.au:8001]
    [03:03:52 PM] #### Deployment incomplete. ####
    [03:03:52 PM] Error deploying archive file:/H:/AIASOAProject/AIAFrameworkProject/ReceiptListEBS/deploy/sca_ReceiptListEBS_rev1.0.jar
    (oracle.tip.tools.ide.fabric.deploy.common.SOARemoteDeployer)
    Buildfile: C:\jdeveloper1112\jdeveloper\bin\ant-sca-compile.xml
    scac:
    *[scac] Validating composite : 'H:\AIASOAProject\AIAFrameworkProject\ReceiptListEBS\composite.xml'*
    *[scac] Error occurred during initialization of VM*
    *[scac] Could not reserve enough space for object heap*
    BUILD FAILED
    C:\jdeveloper1112\jdeveloper\bin\ant-sca-compile.xml:264: Java returned: 1 Check log file : H:\AIASOAProject\AIAFrameworkProject\ReceiptListEBS\SCA-INF\classes\scac.log for errorsTotal time: 1 second
    Is this issue occuring due to server ant-sca-compile.xml or C:\jdeveloper1112\jdeveloper\bin\ant-sca-compile.xml in my desktop.
    Kindly Confirm.
    Regards
    Manish

    Same composite we were able to deploy successfully without any error, from Monday onward we are experiencing this issue.
    We checked in Installation Guide provided by oracle. Oracle has suggested few memory related changes in ant-sca-compile.xml file.
    Increasing Memory to avoid Compilation Errors
    To avoid out-of-memory errors during compilation of a SOA composite application, you need to
    increase the following memory settings.
    To increase memory settings:
    1. Open the ant-sca-compile.xml file in the SOA_HOME/bin directory.
    2. Under the scac element, increase the following memory settings.
    <jvmarg value="-Xms2048m"/>
    <jvmarg value="-Xmx2048m"/>
    <jvmarg value="-XX:PermSize=32m"/>
    <jvmarg value="-XX:MaxPermSize=256m"/>
    3. For Windows change the following memory settings to.
    <jvmarg value="-Xms1536m"/>
    <jvmarg value="-Xmx1536m"/>
    <jvmarg value="-XX:PermSize=32m"/>
    <jvmarg value="-XX:MaxPermSize=256m"/>
    We did those changes but still experiencing same error. I checked H:\AIASOAProject\AIAReceiptInterface\ReceiptListEbizProvider\SCA-INF\classes\scac.log ; file its showing Could not create the Java virtual machine.
    Regards
    Manish

  • Error deploying JDeveloper project using ant-sca-compile.xml

    Hi all, I'm having problems on deploying a JDeveloper project using ant-sca-compile.xml. The output in C:\XXXX\YYYYY\SCA-INF\classes\scac.log is:
    java.lang.NoClassDefFoundError: 4\jdeveloper\////oracle_common
    Caused by: java.lang.ClassNotFoundException: 4\jdeveloper\....oracle_common
         at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:305)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:246)
    Could not find the main class: 4\jdeveloper\/../oracle_common. Program will exit.
    Exception in thread "main"
    What's missing in wich classpath?
    Regards
    Efren.

    Same composite we were able to deploy successfully without any error, from Monday onward we are experiencing this issue.
    We checked in Installation Guide provided by oracle. Oracle has suggested few memory related changes in ant-sca-compile.xml file.
    Increasing Memory to avoid Compilation Errors
    To avoid out-of-memory errors during compilation of a SOA composite application, you need to
    increase the following memory settings.
    To increase memory settings:
    1. Open the ant-sca-compile.xml file in the SOA_HOME/bin directory.
    2. Under the scac element, increase the following memory settings.
    <jvmarg value="-Xms2048m"/>
    <jvmarg value="-Xmx2048m"/>
    <jvmarg value="-XX:PermSize=32m"/>
    <jvmarg value="-XX:MaxPermSize=256m"/>
    3. For Windows change the following memory settings to.
    <jvmarg value="-Xms1536m"/>
    <jvmarg value="-Xmx1536m"/>
    <jvmarg value="-XX:PermSize=32m"/>
    <jvmarg value="-XX:MaxPermSize=256m"/>
    We did those changes but still experiencing same error. I checked H:\AIASOAProject\AIAReceiptInterface\ReceiptListEbizProvider\SCA-INF\classes\scac.log ; file its showing Could not create the Java virtual machine.
    Regards
    Manish

  • Issue with ant-sca-compile.xml

    We have installed AIA 11.1.1.3, and using Jdev 11.1.1.3,
    We are facing issue while deploying ABCSImpl Composite(AIA Service Constructor Based composites) through Jdev 11.1.1.3 ,
    SOA-log showing
    Buildfile: C:\Jdev11113\jdeveloper\bin\ant-sca-compile.xml
    scac:
    [scac] Validating composite "H:\AIASOAProject\AIAPOInterface\CreatePurchaseOrderListEbizProvABCSImpl\composite.xml"
    Its not moving forward, Jdeveloper is getting struck during validation step.
    Messages-log showing -
    Compiling...
    Context: MakeProjectAndDependenciesCommand selection=CreatePurchaseOrderListEbizProvABCSImpl.jpr application=AIAPOInterface.jws project=CreatePurchaseOrderListEbizProvABCSImpl.jpr node=CreatePurchaseOrderListEbizProvABCSImpl.jpr
    Its happening with AIA Service Constructor based composites.
    Non Service Constructor based Composites are getting deployed i.e. Provider Service, EBS and Requestor Services are getting deployed.
    Its very urgent kindly provide some suggestions or tips, Its urgent for us.

    Hi Manish,
    Compilation of Requester and Provider ABCS takes longer time than other AIA components.So check the Xms and Xmx values in ant-sca-compile.xml and check whether it is matching with your OS environment or try setting at a higher value and then try deploying again.
    Is it building properly or is getting stuck at build level only?
    If its issue with deployment then check $FM_HOME/user_projects/domains/[domain_name]/servers/soa_server1/logs/soa-server1-diagnostic.log.
    Rgds,
    Mandrita.

  • JDeveloper build vs ant-sca-compile.xml

    Hi everyone,
    I have a composite containing a Spring component. The component can be compiled and deployed in JDeveloper and works fine. However, when I try to compile the composite with ant-sca-compile.xml Ant script (from my JDeveloper - Build JDEVADF_11.1.1.6.0_GENERIC_111205.1733.6192.1) for automated testing the build fails on
    Source port type for "MyTestService" does not match target port type for "MyTestSpring"
    Any idea how to fix it? The Spring component (its inteface) is generated from the published WSDL and seems it is the cause of the problem as composites without Spring can be compiled with that script.
    Thanks,
    Jan

    Hi Manish,
    Compilation of Requester and Provider ABCS takes longer time than other AIA components.So check the Xms and Xmx values in ant-sca-compile.xml and check whether it is matching with your OS environment or try setting at a higher value and then try deploying again.
    Is it building properly or is getting stuck at build level only?
    If its issue with deployment then check $FM_HOME/user_projects/domains/[domain_name]/servers/soa_server1/logs/soa-server1-diagnostic.log.
    Rgds,
    Mandrita.

  • Can't invoke allaire.ejipt.tools.Deploy frm Ant using build.xml

    This is a question to everyone.
    If you know the answer please let us know and the entire community will be grateful. If u have used JRun well and good, if not and u are using any other J2EE server, and u use Ant in conjunction to build ur application, then u must know the answer. I don't as I'm pretty new to Ant.
    I'm trying to build an ant script/ build.xml that might work with Eclipse or simlar ide, the purpose is to compile and deply the Ejbs. The following is what I have got, see attcahed code
    Now, see, I have defined the follwing in my ant script that is included at the bottom.
    <property name="JRUN_HOME" location="C:/JRun"></property>
    <property name="distroot" location="${JRUN_HOME}/servers/default"></property>
    <property name="deploy_dir" location="${distroot}/deploy"></property>
    <property name="deploy_jvm" location="C:/java/jre/1.3.1/bin/java"/>
    <property name="deploy_tool" location="allaire.ejipt.tools.Deploy"/>But then, this is the Deploy task:
    <target name="Deploy" depends="Initialize, Compile, Jar, Dist">
    <echo message="About to deploy ${jarfile} in ${deploy_dir} using ${deploy_jvm}..."/>
    <java fork="true" classpathref="classpath" classname="${deploy_tool}" dir="${deploy_dir}" jvm="${deploy_jvm}">
    <jvmarg value="-Djava.security.policy=${JRUN_HOME}/lib/jrun.policy"/>
    <jvmarg value="-Dejipt.home=${JRUN_HOME}"/>
    </java>
    <echo message="DEPLOY SUCCESSFULY COMPLETED..."/>
    </target>But, when i run the script using ant - all other tasks are successfull apart from the Deploy and this is what I get:
    Deploy:
    [echo] About to deploy H:\lib\mtrack_ant.jar in C:\JRun\servers\default\deploy using C:\java\jre\1.3.1\bin\java...
    [java] java.lang.NoClassDefFoundError: H:\eclipse\workspace\AdvancedLab\allaire/ejipt/tools/Deploy
    [java] Exception in thread "main"
    [java] Java Result: 1
    [echo] DEPLOY SUCCESSFULY COMPLETED...Hence, my problem is java.lang.NoClassDefFoundError: H:\eclipse\workspace\AdvancedLab\allaire/ejipt/tools/Deploy. Some how I cannot find out how to tell the java task to use allaire.ejipt.tools.Deploy to deploy the jar file thats alreday be copied to the deploy directory.
    And off course the message is correct that 'java.lang.NoClassDefFoundError: H:\eclipse\workspace\AdvancedLab\allaire/ejipt/tools/Deploy' - because there isn't any allaire/ejipt/tools/Deploy in my home directory. This class is in the ejipt.jar which is in the ${jrun-jardir} which I have mentioned in the Deploy task, but it still doesnt work
    This is very intersting - looking forward to any response.
    Regards
    Pratim
    Attached is the entire build.xml file:
    <?xml version="1.0" encoding = "UTF-8"?>
    <project name="IAPS" default="Build IAPS with JDK1.4.2" basedir=".">
        <property name="bin" location="H:/classes2"/>
        <property name="src" location="H:/src"/>
        <property name="jardir" location="H:/lib"/>
        <property name="jarfile" location="${jardir}/mtrack.jar"/>
         <property name="JRUN_HOME" location="C:/JRun"></property>
        <property name="jrun-jardir" location="${JRUN_HOME}/lib"/>
         <property name="distroot" location="${JRUN_HOME}/servers/default"></property>
         <property name="deploy_dir" location="${distroot}/deploy"></property>
         <property name="deploy_jvm" location="C:/java/jre/1.3.1/bin/java"/>     
         <property name="deploy_tool" location="allaire.ejipt.tools.Deploy"/>     
        <target name="Build IAPS with JDK1.4.2" depends="Initialize, Jar, Dist, Deploy">
            <echo message="Ant at work for building RSSd library on PD's laptop!"/>
        </target>
         <target name="Initialize">      
             <echo message="Removing classes and logs..."/>
                 <delete>
                   <fileset dir="${bin}">
                       <include name="**/*.class"/>
                        <exclude name="**/*.dll"/>
                   </fileset>
                 </delete>
                 <delete>
                   <fileset dir="H:/">
                       <include name="**/*.log"/>
                   </fileset>
              </delete>
                 <mkdir dir="${bin}"/>
         </target>
         <path id="classpath">
              <pathelement location="${bin}"/>
              <fileset dir="${jardir}">
                   <include name="**/*.jar"/>
              </fileset>
              <fileset dir="${jardir}/ext">
                   <include name="**/*.jar"/>
              </fileset>          
              <fileset dir="${jrun-jardir}">
                   <include name="**/*.jar"/>
              </fileset>     
         </path>
         <target name="Compile" depends="Initialize">
              <echo message="Starting compiling..."/>
              <javac srcdir="${src}"
                   destdir="${bin}"
                    classpathref="classpath"
                   debug="on"
              />          
              <echo message="Compilation complete..."/>
        </target> 
        <target name="Jar" depends="Compile">
              <echo message="Staring jar..."/>
             <jar destfile="${jarfile}" basedir="${bin}"/>
              <echo message="Jar complete..."/>
        </target>
         <target name="Dist" depends="Initialize, Compile, Jar">     
              <echo message="Copying files to the different distributions..."/>
              <copy file="${jarfile}" todir="${deploy_dir}" />          
              <echo message="Copying complete..."/>
              <echo message="BUILD SUCCESSFULY COMPLETED..."/>
         </target>
         <target name="Deploy" depends="Initialize, Compile, Jar, Dist">     
              <echo message="About to deploy ${jarfile} in ${deploy_dir} using ${deploy_jvm}..."/>
              <java fork="true"
                   jvm="${deploy_jvm}"
                   dir="${deploy_dir}"               
                   classpath="${jrun-jardir}/**/*.jar"
                   classname="${deploy_tool}" >
                   <jvmarg value="-Djava.security.policy=${JRUN_HOME}/lib/jrun.policy"/>
                   <jvmarg value="-Dejipt.home=${JRUN_HOME}"/>
              </java>
              <echo message="DEPLOY SUCCESSFULY COMPLETED..."/>
         </target>     
    </project>

    This is a question to everyone.
    If you know the answer please let us know and the entire community will be grateful. If u have used JRun well and good, if not and u are using any other J2EE server, and u use Ant in conjunction to build ur application, then u must know the answer. I don't as I'm pretty new to Ant.
    I'm trying to build an ant script/ build.xml that might work with Eclipse or simlar ide, the purpose is to compile and deply the Ejbs. The following is what I have got, see attcahed code
    Now, see, I have defined the follwing in my ant script that is included at the bottom.
    <property name="JRUN_HOME" location="C:/JRun"></property>
    <property name="distroot" location="${JRUN_HOME}/servers/default"></property>
    <property name="deploy_dir" location="${distroot}/deploy"></property>
    <property name="deploy_jvm" location="C:/java/jre/1.3.1/bin/java"/>
    <property name="deploy_tool" location="allaire.ejipt.tools.Deploy"/>But then, this is the Deploy task:
    <target name="Deploy" depends="Initialize, Compile, Jar, Dist">
    <echo message="About to deploy ${jarfile} in ${deploy_dir} using ${deploy_jvm}..."/>
    <java fork="true" classpathref="classpath" classname="${deploy_tool}" dir="${deploy_dir}" jvm="${deploy_jvm}">
    <jvmarg value="-Djava.security.policy=${JRUN_HOME}/lib/jrun.policy"/>
    <jvmarg value="-Dejipt.home=${JRUN_HOME}"/>
    </java>
    <echo message="DEPLOY SUCCESSFULY COMPLETED..."/>
    </target>But, when i run the script using ant - all other tasks are successfull apart from the Deploy and this is what I get:
    Deploy:
    [echo] About to deploy H:\lib\mtrack_ant.jar in C:\JRun\servers\default\deploy using C:\java\jre\1.3.1\bin\java...
    [java] java.lang.NoClassDefFoundError: H:\eclipse\workspace\AdvancedLab\allaire/ejipt/tools/Deploy
    [java] Exception in thread "main"
    [java] Java Result: 1
    [echo] DEPLOY SUCCESSFULY COMPLETED...Hence, my problem is java.lang.NoClassDefFoundError: H:\eclipse\workspace\AdvancedLab\allaire/ejipt/tools/Deploy. Some how I cannot find out how to tell the java task to use allaire.ejipt.tools.Deploy to deploy the jar file thats alreday be copied to the deploy directory.
    And off course the message is correct that 'java.lang.NoClassDefFoundError: H:\eclipse\workspace\AdvancedLab\allaire/ejipt/tools/Deploy' - because there isn't any allaire/ejipt/tools/Deploy in my home directory. This class is in the ejipt.jar which is in the ${jrun-jardir} which I have mentioned in the Deploy task, but it still doesnt work
    This is very intersting - looking forward to any response.
    Regards
    Pratim
    Attached is the entire build.xml file:
    <?xml version="1.0" encoding = "UTF-8"?>
    <project name="IAPS" default="Build IAPS with JDK1.4.2" basedir=".">
        <property name="bin" location="H:/classes2"/>
        <property name="src" location="H:/src"/>
        <property name="jardir" location="H:/lib"/>
        <property name="jarfile" location="${jardir}/mtrack.jar"/>
         <property name="JRUN_HOME" location="C:/JRun"></property>
        <property name="jrun-jardir" location="${JRUN_HOME}/lib"/>
         <property name="distroot" location="${JRUN_HOME}/servers/default"></property>
         <property name="deploy_dir" location="${distroot}/deploy"></property>
         <property name="deploy_jvm" location="C:/java/jre/1.3.1/bin/java"/>     
         <property name="deploy_tool" location="allaire.ejipt.tools.Deploy"/>     
        <target name="Build IAPS with JDK1.4.2" depends="Initialize, Jar, Dist, Deploy">
            <echo message="Ant at work for building RSSd library on PD's laptop!"/>
        </target>
         <target name="Initialize">      
             <echo message="Removing classes and logs..."/>
                 <delete>
                   <fileset dir="${bin}">
                       <include name="**/*.class"/>
                        <exclude name="**/*.dll"/>
                   </fileset>
                 </delete>
                 <delete>
                   <fileset dir="H:/">
                       <include name="**/*.log"/>
                   </fileset>
              </delete>
                 <mkdir dir="${bin}"/>
         </target>
         <path id="classpath">
              <pathelement location="${bin}"/>
              <fileset dir="${jardir}">
                   <include name="**/*.jar"/>
              </fileset>
              <fileset dir="${jardir}/ext">
                   <include name="**/*.jar"/>
              </fileset>          
              <fileset dir="${jrun-jardir}">
                   <include name="**/*.jar"/>
              </fileset>     
         </path>
         <target name="Compile" depends="Initialize">
              <echo message="Starting compiling..."/>
              <javac srcdir="${src}"
                   destdir="${bin}"
                    classpathref="classpath"
                   debug="on"
              />          
              <echo message="Compilation complete..."/>
        </target> 
        <target name="Jar" depends="Compile">
              <echo message="Staring jar..."/>
             <jar destfile="${jarfile}" basedir="${bin}"/>
              <echo message="Jar complete..."/>
        </target>
         <target name="Dist" depends="Initialize, Compile, Jar">     
              <echo message="Copying files to the different distributions..."/>
              <copy file="${jarfile}" todir="${deploy_dir}" />          
              <echo message="Copying complete..."/>
              <echo message="BUILD SUCCESSFULY COMPLETED..."/>
         </target>
         <target name="Deploy" depends="Initialize, Compile, Jar, Dist">     
              <echo message="About to deploy ${jarfile} in ${deploy_dir} using ${deploy_jvm}..."/>
              <java fork="true"
                   jvm="${deploy_jvm}"
                   dir="${deploy_dir}"               
                   classpath="${jrun-jardir}/**/*.jar"
                   classname="${deploy_tool}" >
                   <jvmarg value="-Djava.security.policy=${JRUN_HOME}/lib/jrun.policy"/>
                   <jvmarg value="-Dejipt.home=${JRUN_HOME}"/>
              </java>
              <echo message="DEPLOY SUCCESSFULY COMPLETED..."/>
         </target>     
    </project>

  • Generate Deployment XML with Ant or Build

    I'm looking for a way to generate the deployment xml through a build script rather than through the mapping workbench.
    Anyone know if there are command-line type options available?

    Not that I'm aware of, but why would you want to not use the MW, it's a huge productivity gain as far as development is concerned. It saves you from writing out all that XML.
    Remember that typically in a development team, this XML is generated just 1 time for a given release (unless you're continually changing the object model or data model - which is a bad idea anyway)
    my 2 cents,
    Darren

  • How to let Ant know about junit using Eclipe on MAC OS X

    As you know, by defaukt, ant does not know about <junit>.
    When you download "Eclipse" on Windows, you can go to Windows ----> Preferences ..... In order to add "External JARs" to the Classpath.
    But, since I'm using an iMac, I couldn't find this option when I downloaded "Eclipse" on MAC OS X.
    Any ideas?
    Thanks.

    I got an answer on JavaRanch.
    It is under the "Eclipse" menu.
    Thanks.

  • About Ant

    I know, this is not the right forum to talk about Ant. But they don't have an own one.
    My first impression of Ant is: good idea, but no good design.
    Ant's XML files effectively imitate an own programming syntax. Thats not what XML is suited for. I think no future programming language or script language will ever use XML as their main source files like Ant does. Nor will any other Library or Framework do that.
    Being an Ant beginner, I have to learn to to program Ant scripts with XML. I cannot "reuse" my Java knowledge for that purpose. All the very basic things I must learn again when learning Ant: like calling a "method", passing "parameters", controlling program flow and so on. They are expressed different in XML syntax than in Java syntax.
    So what is the alternative? The alternative would if the Ant creator would not have used XML as Ant's source files but Java source files instead. This would have resulted in a Library or a Framework.
    Imagine all the Java Libraries and Java Frameworks being designed like Ant. How many different XML syntaxes would we have to learn!
    I think its sad that Ant used the XML files. It wold be okay to use them as property files, but not as the main source files.
    I could say more against the Ant design, but this is the main design blunder in my eyes.
    What do you think?

    I know, this is not the right forum to talk about Ant. But they don't have an own one.There is an Ant mailing list. Perhaps you should send this to the list and see what kind of response you get.
    My first impression of Ant is: good idea, but no good design.It's an excellent design, IMO. You couldn't be more wrong.
    Ant's XML files effectively imitate an own programming syntax. Thats not what XML is suited for. I think no
    future programming language or script language will ever use XML as their main source files like Ant does. Nor will any other Library or Framework do that.Ant does not pretend to be a programming language. There aren't constructs for looping, and the conditional logic is quite limited. I've even read in the docs (can't recall where right now) that it's not intended to be a full-fledged scripting language.
    Being an Ant beginner, I have to learn to to program Ant scripts with XML. I cannot "reuse" my Java
    knowledge for that purpose. All the very basic things I must learn again when learning Ant: like calling a
    "method", passing "parameters", controlling program flow and so on. They are expressed different in XML syntax than in Java syntax."Being an Ant beginner" - there's the problem. Shallow knowledge.
    They didn't intend for you to reuse your Java knowledge. Ant isn't a replacement for Java. It's a replacement for make. It is a framework that happens to use Java classes to implement common tasks, passing parameters to those tasks via XML.
    Actually, I think it's a very nice framework that makes it possible for people to add tasks as they discover them, because they can define the task class and the XML to drive it in such a way that they're orthogonal to all other tasks. Today one programmer can add WebLogic EJB tasks, tomorrow it's another sending in JBoss EJB tasks for inclusion. It's a flexible, elegant design IMO.
    So what is the alternative? The alternative would if the Ant creator would not have used XML as Ant's
    source files but Java source files instead. This would have resulted in a Library or a Framework.What do you think is doing the work behind the scenes in that ant.jar? Java classes! XML happens to be a convenient, well-understood syntax for providing input values to drive those tasks and glue them together.
    Imagine all the Java Libraries and Java Frameworks
    being designed like Ant. How many different XML
    syntaxes would we have to learn!This comment tells me that you don't understand libraries, frameworks, or Ant.
    I think its sad that Ant used the XML files. It wold be okay to use them as property files, but not as the
    main source files.You'd rather have property files than XML? You're a minority of one there. XML is routinely used to supply properties to Web apps, EJB descriptors, B2B apps, etc. What do you have against the use of XML? It's quite common, and a natural choice.
    I could say more against the Ant design, but this is the main design blunder in my eyes.Please do pass this note to the Ant mailing list. I'm sure the designers are waiting to hear from you.
    What do you think?I think this is one of the most ignorant posts I've seen in a while. - MOD

  • What every developer should know about character encoding

    This was originally posted (with better formatting) at Moderator edit: link removed/what-every-developer-should-know-about-character-encoding.html. I'm posting because lots of people trip over this.
    If you write code that touches a text file, you probably need this.
    Lets start off with two key items
    1.Unicode does not solve this issue for us (yet).
    2.Every text file is encoded. There is no such thing as an unencoded file or a "general" encoding.
    And lets add a codacil to this – most Americans can get by without having to take this in to account – most of the time. Because the characters for the first 127 bytes in the vast majority of encoding schemes map to the same set of characters (more accurately called glyphs). And because we only use A-Z without any other characters, accents, etc. – we're good to go. But the second you use those same assumptions in an HTML or XML file that has characters outside the first 127 – then the trouble starts.
    The computer industry started with diskspace and memory at a premium. Anyone who suggested using 2 bytes for each character instead of one would have been laughed at. In fact we're lucky that the byte worked best as 8 bits or we might have had fewer than 256 bits for each character. There of course were numerous charactersets (or codepages) developed early on. But we ended up with most everyone using a standard set of codepages where the first 127 bytes were identical on all and the second were unique to each set. There were sets for America/Western Europe, Central Europe, Russia, etc.
    And then for Asia, because 256 characters were not enough, some of the range 128 – 255 had what was called DBCS (double byte character sets). For each value of a first byte (in these higher ranges), the second byte then identified one of 256 characters. This gave a total of 128 * 256 additional characters. It was a hack, but it kept memory use to a minimum. Chinese, Japanese, and Korean each have their own DBCS codepage.
    And for awhile this worked well. Operating systems, applications, etc. mostly were set to use a specified code page. But then the internet came along. A website in America using an XML file from Greece to display data to a user browsing in Russia, where each is entering data based on their country – that broke the paradigm.
    Fast forward to today. The two file formats where we can explain this the best, and where everyone trips over it, is HTML and XML. Every HTML and XML file can optionally have the character encoding set in it's header metadata. If it's not set, then most programs assume it is UTF-8, but that is not a standard and not universally followed. If the encoding is not specified and the program reading the file guess wrong – the file will be misread.
    Point 1 – Never treat specifying the encoding as optional when writing a file. Always write it to the file. Always. Even if you are willing to swear that the file will never have characters out of the range 1 – 127.
    Now lets' look at UTF-8 because as the standard and the way it works, it gets people into a lot of trouble. UTF-8 was popular for two reasons. First it matched the standard codepages for the first 127 characters and so most existing HTML and XML would match it. Second, it was designed to use as few bytes as possible which mattered a lot back when it was designed and many people were still using dial-up modems.
    UTF-8 borrowed from the DBCS designs from the Asian codepages. The first 128 bytes are all single byte representations of characters. Then for the next most common set, it uses a block in the second 128 bytes to be a double byte sequence giving us more characters. But wait, there's more. For the less common there's a first byte which leads to a sersies of second bytes. Those then each lead to a third byte and those three bytes define the character. This goes up to 6 byte sequences. Using the MBCS (multi-byte character set) you can write the equivilent of every unicode character. And assuming what you are writing is not a list of seldom used Chinese characters, do it in fewer bytes.
    But here is what everyone trips over – they have an HTML or XML file, it works fine, and they open it up in a text editor. They then add a character that in their text editor, using the codepage for their region, insert a character like ß and save the file. Of course it must be correct – their text editor shows it correctly. But feed it to any program that reads according to the encoding and that is now the first character fo a 2 byte sequence. You either get a different character or if the second byte is not a legal value for that first byte – an error.
    Point 2 – Always create HTML and XML in a program that writes it out correctly using the encode. If you must create with a text editor, then view the final file in a browser.
    Now, what about when the code you are writing will read or write a file? We are not talking binary/data files where you write it out in your own format, but files that are considered text files. Java, .NET, etc all have character encoders. The purpose of these encoders is to translate between a sequence of bytes (the file) and the characters they represent. Lets take what is actually a very difficlut example – your source code, be it C#, Java, etc. These are still by and large "plain old text files" with no encoding hints. So how do programs handle them? Many assume they use the local code page. Many others assume that all characters will be in the range 0 – 127 and will choke on anything else.
    Here's a key point about these text files – every program is still using an encoding. It may not be setting it in code, but by definition an encoding is being used.
    Point 3 – Always set the encoding when you read and write text files. Not just for HTML & XML, but even for files like source code. It's fine if you set it to use the default codepage, but set the encoding.
    Point 4 – Use the most complete encoder possible. You can write your own XML as a text file encoded for UTF-8. But if you write it using an XML encoder, then it will include the encoding in the meta data and you can't get it wrong. (it also adds the endian preamble to the file.)
    Ok, you're reading & writing files correctly but what about inside your code. What there? This is where it's easy – unicode. That's what those encoders created in the Java & .NET runtime are designed to do. You read in and get unicode. You write unicode and get an encoded file. That's why the char type is 16 bits and is a unique core type that is for characters. This you probably have right because languages today don't give you much choice in the matter.
    Point 5 – (For developers on languages that have been around awhile) – Always use unicode internally. In C++ this is called wide chars (or something similar). Don't get clever to save a couple of bytes, memory is cheap and you have more important things to do.
    Wrapping it up
    I think there are two key items to keep in mind here. First, make sure you are taking the encoding in to account on text files. Second, this is actually all very easy and straightforward. People rarely screw up how to use an encoding, it's when they ignore the issue that they get in to trouble.
    Edited by: Darryl Burke -- link removed

    DavidThi808 wrote:
    This was originally posted (with better formatting) at Moderator edit: link removed/what-every-developer-should-know-about-character-encoding.html. I'm posting because lots of people trip over this.
    If you write code that touches a text file, you probably need this.
    Lets start off with two key items
    1.Unicode does not solve this issue for us (yet).
    2.Every text file is encoded. There is no such thing as an unencoded file or a "general" encoding.
    And lets add a codacil to this – most Americans can get by without having to take this in to account – most of the time. Because the characters for the first 127 bytes in the vast majority of encoding schemes map to the same set of characters (more accurately called glyphs). And because we only use A-Z without any other characters, accents, etc. – we're good to go. But the second you use those same assumptions in an HTML or XML file that has characters outside the first 127 – then the trouble starts. Pretty sure most Americans do not use character sets that only have a range of 0-127. I don't think I have every used a desktop OS that did. I might have used some big iron boxes before that but at that time I wasn't even aware that character sets existed.
    They might only use that range but that is a different issue, especially since that range is exactly the same as the UTF8 character set anyways.
    >
    The computer industry started with diskspace and memory at a premium. Anyone who suggested using 2 bytes for each character instead of one would have been laughed at. In fact we're lucky that the byte worked best as 8 bits or we might have had fewer than 256 bits for each character. There of course were numerous charactersets (or codepages) developed early on. But we ended up with most everyone using a standard set of codepages where the first 127 bytes were identical on all and the second were unique to each set. There were sets for America/Western Europe, Central Europe, Russia, etc.
    And then for Asia, because 256 characters were not enough, some of the range 128 – 255 had what was called DBCS (double byte character sets). For each value of a first byte (in these higher ranges), the second byte then identified one of 256 characters. This gave a total of 128 * 256 additional characters. It was a hack, but it kept memory use to a minimum. Chinese, Japanese, and Korean each have their own DBCS codepage.
    And for awhile this worked well. Operating systems, applications, etc. mostly were set to use a specified code page. But then the internet came along. A website in America using an XML file from Greece to display data to a user browsing in Russia, where each is entering data based on their country – that broke the paradigm.
    The above is only true for small volume sets. If I am targeting a processing rate of 2000 txns/sec with a requirement to hold data active for seven years then a column with a size of 8 bytes is significantly different than one with 16 bytes.
    Fast forward to today. The two file formats where we can explain this the best, and where everyone trips over it, is HTML and XML. Every HTML and XML file can optionally have the character encoding set in it's header metadata. If it's not set, then most programs assume it is UTF-8, but that is not a standard and not universally followed. If the encoding is not specified and the program reading the file guess wrong – the file will be misread.
    The above is out of place. It would be best to address this as part of Point 1.
    Point 1 – Never treat specifying the encoding as optional when writing a file. Always write it to the file. Always. Even if you are willing to swear that the file will never have characters out of the range 1 – 127.
    Now lets' look at UTF-8 because as the standard and the way it works, it gets people into a lot of trouble. UTF-8 was popular for two reasons. First it matched the standard codepages for the first 127 characters and so most existing HTML and XML would match it. Second, it was designed to use as few bytes as possible which mattered a lot back when it was designed and many people were still using dial-up modems.
    UTF-8 borrowed from the DBCS designs from the Asian codepages. The first 128 bytes are all single byte representations of characters. Then for the next most common set, it uses a block in the second 128 bytes to be a double byte sequence giving us more characters. But wait, there's more. For the less common there's a first byte which leads to a sersies of second bytes. Those then each lead to a third byte and those three bytes define the character. This goes up to 6 byte sequences. Using the MBCS (multi-byte character set) you can write the equivilent of every unicode character. And assuming what you are writing is not a list of seldom used Chinese characters, do it in fewer bytes.
    The first part of that paragraph is odd. The first 128 characters of unicode, all unicode, is based on ASCII. The representational format of UTF8 is required to implement unicode, thus it must represent those characters. It uses the idiom supported by variable width encodings to do that.
    But here is what everyone trips over – they have an HTML or XML file, it works fine, and they open it up in a text editor. They then add a character that in their text editor, using the codepage for their region, insert a character like ß and save the file. Of course it must be correct – their text editor shows it correctly. But feed it to any program that reads according to the encoding and that is now the first character fo a 2 byte sequence. You either get a different character or if the second byte is not a legal value for that first byte – an error.
    Not sure what you are saying here. If a file is supposed to be in one encoding and you insert invalid characters into it then it invalid. End of story. It has nothing to do with html/xml.
    Point 2 – Always create HTML and XML in a program that writes it out correctly using the encode. If you must create with a text editor, then view the final file in a browser.
    The browser still needs to support the encoding.
    Now, what about when the code you are writing will read or write a file? We are not talking binary/data files where you write it out in your own format, but files that are considered text files. Java, .NET, etc all have character encoders. The purpose of these encoders is to translate between a sequence of bytes (the file) and the characters they represent. Lets take what is actually a very difficlut example – your source code, be it C#, Java, etc. These are still by and large "plain old text files" with no encoding hints. So how do programs handle them? Many assume they use the local code page. Many others assume that all characters will be in the range 0 – 127 and will choke on anything else.
    I know java files have a default encoding - the specification defines it. And I am certain C# does as well.
    Point 3 – Always set the encoding when you read and write text files. Not just for HTML & XML, but even for files like source code. It's fine if you set it to use the default codepage, but set the encoding.
    It is important to define it. Whether you set it is another matter.
    Point 4 – Use the most complete encoder possible. You can write your own XML as a text file encoded for UTF-8. But if you write it using an XML encoder, then it will include the encoding in the meta data and you can't get it wrong. (it also adds the endian preamble to the file.)
    Ok, you're reading & writing files correctly but what about inside your code. What there? This is where it's easy – unicode. That's what those encoders created in the Java & .NET runtime are designed to do. You read in and get unicode. You write unicode and get an encoded file. That's why the char type is 16 bits and is a unique core type that is for characters. This you probably have right because languages today don't give you much choice in the matter.
    Unicode character escapes are replaced prior to actual code compilation. Thus it is possible to create strings in java with escaped unicode characters which will fail to compile.
    Point 5 – (For developers on languages that have been around awhile) – Always use unicode internally. In C++ this is called wide chars (or something similar). Don't get clever to save a couple of bytes, memory is cheap and you have more important things to do.
    No. A developer should understand the problem domain represented by the requirements and the business and create solutions that appropriate to that. Thus there is absolutely no point for someone that is creating an inventory system for a stand alone store to craft a solution that supports multiple languages.
    And another example is with high volume systems moving/storing bytes is relevant. As such one must carefully consider each text element as to whether it is customer consumable or internally consumable. Saving bytes in such cases will impact the total load of the system. In such systems incremental savings impact operating costs and marketing advantage with speed.

  • Errror while Running the ant file(build.xml) when applying B2B-BPEL patch

    Hello all,
    I am trying to apply the B2B WSIL Browser patch and while running the ant file i got the following warning while backing out d3l.jar file
    echo Backing out dl3l.jar to avoid conflicts with B2B...
    move *Warning: Could not find file C:\product\1013~1.1\ORACLE~1\bpel\samples\tmp\B2B-BPEL\${env.ORACLE_HOME}\xqs\lib\d3l.jar to copy.*
    and the following error when it was not able to find admin_client.jar file
    *java Unable to access jarfile C:\product\1013~1.1\ORACLE~1\bpel\samples\tmp\B2B-BPEL\${env.ORACLE_HOME}\j2ee\home\admin_client.jar*
    java Java Result: 1
    echo Binding B2B WSIL Browser...
    *java Unable to access jarfile C:\product\1013~1.1\ORACLE~1\bpel\samples\tmp\B2B-BPEL\${env.ORACLE_HOME}\j2ee\home\admin_client.jar*
    and the BUILD FAILED
    *so i created the necessary folders in the newly generated folder manually in ${env.ORACLE_HOME} i.e xqs\lib & j2ee\home and pasted the d3l.jar and admin_client.jar in these folders respectively,and again ran the ant file,this time the error is first problem is cleared i.e it is not showing the warning that it could not find* d3l.jar_+ file and it is also converting this file as d3l.jar.hide_+ *, but this time in the place of second error a new error is generated i.e* +
    Problem_
    C:\product\1013~1.1\ORACLE~1\bpel\samples\tmp\B2B-BPEL&gt;ant
    Buildfile: build.xml
    apply-b2b-bpel-10.1.3:
    echo Prompting for B2B repository connection parameters...
    input Please enter B2B repository hostname [http://127.0.0.1:] [http://127.0.0.1]
    172.17.4.14
    input Please enter B2B repository port 1521: 1521
    1521
    input Please enter B2B repository sid ORCL: ORCL
    orcl
    input Please enter B2B password b2b: b2b
    b2b
    input Please enter oc4j instance name home: home
    home
    input Please enter oc4j admin password welcome1: welcome1
    welcome1
    input Please enter opmn request port 6003: 6003
    6003
    echo Copying b2b.jar and tip.properties to appropriate locations...
    copy Copying 1 file to C:\product\1013~1.1\ORACLE~1\bpel\samples\tmp\B2B-BPEL\${env.ORACLE_HOME}\lib
    copy Copying 1 file to C:\product\1013~1.1\ORACLE~1\bpel\samples\tmp\B2B-BPEL\${env.OB_HOME}\system\classes
    echo Backing out dl3l.jar to avoid conflicts with B2B...
    move Moving 1 file to C:\product\1013~1.1\ORACLE~1\bpel\samples\tmp\B2B-BPEL\${env.ORACLE_HOME}\xqs\lib
    echo Deploying B2B WSIL Browser ...
    echo OPMN Port is : 6003
    echo Container is : home
    echo Host is : ${env.HOSTNAME}
    echo iasadminpassword is : welcome1
    java java.lang.NoClassDefFoundError: oracle/oc4j/admin/deploy/cmdline/Oc4jAdminCmdline
    java Exception in thread "main"
    java Java Result: 1
    echo Binding B2B WSIL Browser...
    java java.lang.NoClassDefFoundError: oracle/oc4j/admin/deploy/cmdline/Oc4jAdminCmdline
    java Exception in thread "main"
    BUILD FAILED
    C:\product\1013~1.1\ORACLE~1\bpel\samples\tmp\B2B-BPEL\build.xml:88: The following error occurred while executing this line:
    C:\product\1013~1.1\ORACLE~1\bpel\samples\tmp\B2B-BPEL\build.xml:49: Java returned: 1
    Total time: 31 seconds
    C:\product\1013~1.1\ORACLE~1\bpel\samples\tmp\B2B-BPEL&gt;
    i have set the classpath for the jdk and jre files correctly and also checked it with a sample program and the file is compiling and running with correct output.then why is it showing up java.lang.NoClassDefFoundError exception.Did anyone face the same problem or have a solution for this problem if they have then plzzz help me
    thnx
    Sunny
    Edited by: sunny kay on Jan 27, 2009 4:14 AM

    Hello sri,
    Thanks for your response as you have told i have set the ORACLE_HOME = C:\product\10.1.3.1\OracleAS_1
    and added C:\product\10.1.3.1\OracleAS_1\bin to my sys path
    and i have also set the JAVA_HOME=C:\product\10.1.3.1\OracleAS_1\jdk
    and added C:\product\10.1.3.1\OracleAS_1\jdk\bin to my sys path
    and ran the patch,now its coming up with a different problem after entering the B2B repository connection parameters...
    and it is
    Problem_
    echo Deploying B2B WSIL Browser ...
    echo OPMN Port is : 6003
    echo Container is : home
    echo Host is : ${env.HOSTNAME}
    echo iasadminpassword is : welcome1
    java
    java
    java Failed at "Could not get DeploymentManager".
    java
    java This is typically the result of an invalid deployer URI format being
    supplied, the target server not being in a started state or incorrect authentic
    ation details being supplied.
    java
    java More information is available by enabling logging -- please see the
    Oracle Containers for J2EE Configuration and Administration Guide for details.
    java
    java
    java Java Result: 1
    echo Binding B2B WSIL Browser...
    java
    java
    java Failed at "Could not get DeploymentManager".
    java
    java This is typically the result of an invalid deployer URI format being
    supplied, the target server not being in a started state or incorrect authentic
    ation details being supplied.
    java
    java More information is available by enabling logging -- please see the
    Oracle Containers for J2EE Configuration and Administration Guide for details.
    java
    java
    BUILD FAILED
    The Application Server is in the started state and these are the details that i have entered when B2B Repository Connection Parameters is prompeted
    echo Prompting for B2B repository connection parameters...
    input Please enter B2B repository hostname [http://127.0.0.1]: [http://127.0.0.1]
    172.17.4.14
    input Please enter B2B repository port [1521|http://forums.oracle.com/forums/]: [1521|http://forums.oracle.com/forums/]
    1521
    input Please enter B2B repository sid ORCL: ORCL
    orcl
    input Please enter B2B password [b2b|http://forums.oracle.com/forums/]: [b2b|http://forums.oracle.com/forums/]
    b2b
    input Please enter oc4j instance name home: home
    home
    input Please enter oc4j admin password [welcome1|http://forums.oracle.com/forums/]: [welcome1|http://forums.oracle.com/forums/]
    welcome1
    input Please enter opmn request port [6003|http://forums.oracle.com/forums/]: [6003|http://forums.oracle.com/forums/]
    6003
    is anything wrong in this i have tried by giving the default host name instead of mine but result is still the same.what is the problem can you figure it out and provide me a solution.
    thnx
    Sunny

  • Castor XSD Code Generation ANT task: mapping  XML file?

    Hello,
    I am new to Castor and am using the Castor Code Generator ANT task to generate code from a XSD schema file.
    I am using a binding XML file as well. One thing that I have a question about is the needed XML mapping file. I set the ‘*generateMapping*’ attribute to ‘true’ but have not found a mapping XML document.
    Is there something I am doing wrong?
    I would have attached the XSD files(some are imported), binding XML file and the ANT build.xml file in a .zip file to this post, but this forum does not have a facility for file attachments, but I can email them upon request.
    Thanks in advance,
    Andrew

    Hi Andrew,
    JAXB is the Java standard (JSR-222) for generating Java classes from an XML schema. Several implementations of this standard are available:
    - Metro JAXB: The JAXB reference implementation, available in Java SE 6 and as part of GlassFish
    - EclipseLink JAXB (MOXy): Part of EclipseLink, also available in Oracle TopLink
    - JaxMe: Available from Apache
    - Etc...
    Castor is a proprietary XML binding tool. For Castor related questions you should visit the Castor website.
    -Blaise

  • I want to know about enterprise soa and sap netweaver

    Hi all,
                 i am ABAP'r , i want to know about Enterprise SOA And SAP Netweaver ,
    please send some documents about that .
    Thanks&regards.
    Naveen Kumar

    ESOA mean Enterprise Service Oriented Architecture
    SOA mean an Architecture approach to define IT solution for business problems using loose couples SERVICES
    Service mean: definition of a business function in terms of the service message, protocol and nature
    Nature mean Service direction, Service mode and service contract
    WEB SERVICE, XML, XSD, SOAP : Mean a technology following SOA architecture approach to IT enablement of a business need.
    WEB service compose business functions, location of services, messages of service offering and protocol into a single definition to define service contract.
    XML mean a common language to represent message
    XSD mean a common way to define message structure
    SOAP mean a procol which carry messages of services between service consumer and service provider.
    Finally : Web service is not SOA. Web service is a technology implementing SOA architectural approach to IT enablement of a business NEED.
    Note: If you are happy with answer please make sure point is rewarded.
    Thanks

  • I want  to know about smartforms

    hi experts tell me
    i want to know about smartforms
    anybody have material pls send me
    thanks in advance

    SAP Smartforms can be used for creating and maintaining forms for mass printing in SAP Systems. The output medium for Smartforms support printer, fax, e-mail, or the Internet (by using the generated XML output).
    According to SAP, you need neither have any programming knowledge nor use a Script language to adapt standard forms. However, basic ABAP programming skills are required only in special cases (for example, to call a function module you created or for complex and extensive conditions).
    1. Create a new smartforms
          Transaction code SMARTFORMS
          Create new smartforms call ZSMART
    2. Define looping process for internal table
    Pages and windows
          First Page -> Header Window (Cursor at First Page then click Edit -> Node -> Create)
          Here, you can specify your title and page numbering
          &SFSY-PAGE& (Page 1) of &SFSY-FORMPAGES(Z4.0)& (Total Page)
          Main windows -> TABLE -> DATA
          In the Loop section, tick Internal table and fill in
          ITAB1 (table in ABAP SMARTFORM calling function) INTO ITAB2
    3. Define table in smartforms
    Global settings :
    Form interface
    Variable name    Type assignment   Reference type
    ITAB1               TYPE                  Table Structure
    Global definitions
    Variable name    Type assignment   Reference type
    ITAB2               TYPE                  Table Structure
    4. To display the data in the form
    Make used of the Table Painter and declare the Line Type in Tabstrips Table
    e.g.  HD_GEN for printing header details,
            IT_GEN  for printing data details.
    You have to specify the Line Type in your Text elements in the Tabstrips Output options.
    Tick the New Line and specify the Line Type for outputting the data.
    Declare your output fields in Text elements
    Tabstrips - Output Options
    For different fonts use this Style : IDWTCERTSTYLE
    For Quantity or Amout you can used this variable &GS_ITAB-AMOUNT(12.2)&
    5. Calling SMARTFORMS from your ABAP program
    REPORT ZSMARTFORM.
    Calling SMARTFORMS from your ABAP program.
    Collecting all the table data in your program, and pass once to SMARTFORMS
    SMARTFORMS
    Declare your table type in :-
    Global Settings -> Form Interface
    Global Definintions -> Global Data
    Main Window -> Table -> DATA
    Written by :  SAP Hints and Tips on Configuration and ABAP/4 Programming
                        http://sapr3.tripod.com
    TABLES: MKPF.
    DATA: FM_NAME TYPE RS38L_FNAM.
    DATA: BEGIN OF INT_MKPF OCCURS 0.
            INCLUDE STRUCTURE MKPF.
    DATA: END OF INT_MKPF.
    SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001.
    SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR.
       MOVE-CORRESPONDING MKPF TO INT_MKPF.
       APPEND INT_MKPF.
    ENDSELECT.
    At the end of your program.
    Passing data to SMARTFORMS
    call function 'SSF_FUNCTION_MODULE_NAME'
      exporting
        formname                 = 'ZSMARTFORM'
      VARIANT                  = ' '
      DIRECT_CALL              = ' '
      IMPORTING
        FM_NAME                  = FM_NAME
      EXCEPTIONS
        NO_FORM                  = 1
        NO_FUNCTION_MODULE       = 2
        OTHERS                   = 3.
    if sy-subrc <> 0.
       WRITE: / 'ERROR 1'.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    call function FM_NAME
    EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
      CONTROL_PARAMETERS         =
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
      OUTPUT_OPTIONS             =
      USER_SETTINGS              = 'X'
    IMPORTING
      DOCUMENT_OUTPUT_INFO       =
      JOB_OUTPUT_INFO            =
      JOB_OUTPUT_OPTIONS         =
      TABLES
        GS_MKPF                    = INT_MKPF
      EXCEPTIONS
        FORMATTING_ERROR           = 1
        INTERNAL_ERROR             = 2
        SEND_ERROR                 = 3
        USER_CANCELED              = 4
        OTHERS                     = 5.
    if sy-subrc <> 0.
       MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    also refer
    http://www.erpgenie.com/abap/smartforms_detail.htm
    http://www.sap-basis-abap.com/abphy.htm
    <b>http://sap.ionelburlacu.ro/sap0/sapsf001.htm
    http://www.ionutz.ro/sap/sapabap01.htm[very imp links]</b>
    http://www.sap-basis-abap.com/sapsf001.htm
    regards,
    srinivas
    <b>*reward for useful answers*</b>

  • Classpath problems when generating deployment xml

    Hi,
    I am new to using Toplink (9.0.4), but not new to CMP. I'm using the Toplink Mapping Workbench and have created my CMP Entity. I right-click on my project and export the Java Source. Everything (homes, local, remote) generates successfully. I then try to export the project deployment XML. However, I get a classpath error stating that it can't find my bean classes. My classpath is set to the area where the Java/Class files are. Do I have to compile my generated classes before creating the deployment XML? It appears as if I do because it works when I compile first, then generate the deployment XML. Is this the correct way to use the tool (generate Java, compile, generate XML)?
    Also, Is there a way this can all be generated via Ant (i.e. something similar to EJBGen)?
    Thanks,
    Mike

    Generating Java using the Mapping Workbench is good only for the initial Java Objects.
    After the initial Java Objects has been generated TopLink recommend to generate / modify Java Objects using IDE -&gt; compile -&gt; And in the Mapping Workbench 'Add or Refresh classes' -&gt; Map -&gt; generate XML is the right way of using TopLink.

Maybe you are looking for

  • How can I transfer my iTunes account from my old laptop to my new macbook?

    I just got a new macbook and want to have the same itunes account for my iphone and macbook on my macbook, but I can transfer my itunes account from my old laptop to my new macbook. Please help? xx

  • Problem in sending a variable length string

    Hello friends, I have created a scenario as follows. Our Application ==>(SOAP) ==> XI  ==> (RFC) ==> SAP TABLE. I am sending a record with one of the fields of the type 'VARILRAW' When I send this, it is sending me a response that it was inserted in

  • "No Signal Input" on external VGA monitor

    About a year ago my 4 yr emac that I gave my dad starting having the video on the built in display go out periodically. When it started happening more and more, rather than get a whole new computer, we purchased a 22 widescreen VGA monitor and hooked

  • I Need Java code for following Algorithm

    * I Need Java code for following algorithm. Kindly any one help. 1. Read the contents (ideas and its corresponding scores) from two files named as 'a' and 'b'. 2. Stored the file 'a' contents in array a[]. 3. Stored the file 'b' contents in array b[]

  • FMs or methods that calculate discounts in Payment Run (F110)

    Experts, I have a requirement to build a custom forecast report on cash required to be disbursed as vendor payments. I pull BSIK and BSAK entries for my calculation. I know the discount calculation is subjective to the day the report is run. To this