Using variables in WLST Script ant task

I have multiple scipts that are run using ant tasks, however, I do not want to have to enter the password every time one of these scripts is executed. Instead I would like to use the following ant task to store the password in a variable/property:
<target name="getPassword" >
     <echo message="Domain: ${domain}" />
<echo message="Username: system" />
<input message="Please enter password:" addproperty="password" />
</target>
I would then like to use that variable/property everytime a script is executed like this:
     <target name="deploy4x">
          <echo message="***** Copying 4X.ear *****" />
          <copy file="${build.path}\jar\4X.ear" todir="${apps.dir}" preservelastmodified="true"/>     
          <echo message="***** Updating 4X.ear on ${domain} *****"/>
          <wlst debug="true" fileName="Deploy4X.py" executeScriptBeforeFile="true" failonerror="true" >
               <script>
                    connect('system','%s' % ${password},'%s' % $url)
               </script>
          </wlst>
     </target>
However, the script blows up every time I try to run it b/c of the connect() line. I have also tried connect('system','%s' % password, '%s' % url).
Has anyone else successfully used variables in an Ant WLST Script task?
Thanks.

Hi,
when I use *XDIM_MEMBERSET ACCOUNT AS %TEST% = BAS(REVENUE) - it work fine.
BUT ! after my first commit, it seems like the variable value is lost. And the *Xdim_memberset takes all.....
Fortunately enough, *select still contains the variable value after *commit.
Thanks,
Joergen
*Correction !
It actually works, it still contains the variable value after commit !!
Edited by: Jørgen Dalby Andersen on Dec 30, 2011 1:33 PM

Similar Messages

  • Using variables in Calc scripts and Business Rules

    I am sure there have been previous discussions about this, but can somebody let me know the benefits of using variables in Calc scripts and BRs?
    Thanks,
    A

    I have never used calc variables and after reading a study guide, which talked about them, I couldn't really understand the benefits.^^^I use variables all the time to make abstract difficult formulas. Below is an example.
    /*     Declare variables     */
    VAR varSalaryCosts ;
    VAR varProdOHLabXXXX ;
    VAR varXXXX ;
    A whole bunch of code here along with very limited FIX statement and then...
    "Salaried Labor"
         varSalaryCosts = "Salary Costs"->"No Department"->"No Category"->"Salaried" -
                             "Wage Bonus"->"No Department"->"No Category"->"Salaried" -
                             "YYYY Retention Bonus 40%"->"No Department"->"No Category"->"Salaried" -
                             "YYYY 60% Ret Bonus Accrual"->"No Department"->"No Category"->"Salaried" ;
         varProdOHLabXXXX = "Number of Employees"->"ZZZZDepartments"->"Codes"->"Salaried" +
                             "Number of Employees"->"Blah Departments"->"Codes"->"Salaried" +
                             "Number of Employees"->"Humph Departments"->"Codes"->"Salaried" +
                             "Number of Employees"->"TTTT"->"Codes"->"Salaried" ;
         "Salaried Labor" = varSalaryCosts * ("Number of Employees"->"Salaried" / varProdOHLabXXXX) ;
    )The last formula is how the formula was described to me by the business owner. I find it to be much easier to read than something like:
    "Salaried Labor" = ("Salary Costs"->"No Department"->"No Category"->"Salaried" -
                             "Wage Bonus"->"No Department"->"No Category"->"Salaried" -
                             "YYYY Retention Bonus 40%"->"No Department"->"No Category"->"Salaried" -
                             "YYYY 60% Ret Bonus Accrual"->"No Department"->"No Category"->"Salaried") *
                             ("Number of Employees"->"Salaried" /
                             ("Number of Employees"->"ZZZZDepartments"->"Codes"->"Salaried" +           
                             "Number of Employees"->"Blah Departments"->"Codes"->"Salaried" +
                             "Number of Employees"->"Humph Departments"->"Codes"->"Salaried" +     
                             "Number of Employees"->"TTTT"->"Codes"->"Salaried")) ;I have used ARRAY in a really-cool-but-alas-not-invented-by-me calc script to do currency conversion in Planning better than Planning does currency conversion. (How's that for a run-on sentence?) It is one of the six blog posts I am working on and I will finish it soon, I hope. I am sort of in thrash mode right now. It does have its uses and I'll try to remember to update this thread when I'm done.
    Regards,
    Cameron Lackpour

  • Using xsb files with xmlbeans ant task

    Hi all
    I have got an xsd which references other schemas: for these other schemas I have only the xsbs. The xmlbeans ant task refuse to load the xsd I'm giving in because cannot found the other schemas. I'd like to simply import the existing xsb so that the ant task can use them: does anyone know how to do it?
    Thank you in advance for any help
    cdr

    Actually it doesn't work properly in SQL Server 2008 R2.  I have a similar EP task.  If I set the working directory to \\server\share\subdir the task fails. However, if I map a drive latter to the \\server\share and set working directory to <drive>:\subdir
    it works

  • How to use variable in rule script in HFM

    I'm now writing VB script for HFM rule, and have something to ask about the use of variables in rule.
    The script below generates the following error.
    -Error description-
    Line: 4, Error: Invalid Expression
    HS.Exp "S#Actual.A#77300.I#[ICP None] = cur"
    An error has occurred in Hyperion Financial Management.
    -Rule script-
    Sub Allocate()
    Dim cur
    cur = 500
    HS.Exp "S#Actual.A#77300.I#[ICP None] = cur"
    End Sub
    On the other hand, the script below works properly.
    -Rule script-
    Sub Allocate()
    HS.Exp "S#Actual.A#77300.I#[ICP None] = 500"
    End Sub
    Probably I'm not using variables in proper way, but have no idea how to correct it.
    Does anyone have any idea?
    Thanks in advance.

    Hello,
    try this in the sub calculate:
    HS.Exp "S#Actual.A#77300.I#[ICP None]=" & cur
    For the sub allocate, I suppose that you do not have the issue because the allocate is not launch during the consolidation process. Allocate is launched separatly by a right click, and can only be done when calculation status = "OK", which means that all calculation have been done (that could not be the case if you have an error like this in sub calculate).
    Hope it helps

  • Assigning Null to a variable in SSIS script component task

    Hi,
    I have created a script component task has codes like the one below.
    If Row.SessionKey is null, how do I assign it to _prevSessionKey? Currently, I am receiving column reference is null error.
    Please help!
    publicclassScriptMain : UserComponent
    { int _prevSessionKey;
    public override void Input0_ProcessInputRow(Input0Buffer Row)
    if (Row.Event == 5)
    _prevSessionKey = Row.SessionKey;
    cherriesh

    you can make it like this
    publicclassScriptMain : UserComponent
    { int _prevSessionKey;
    public override void Input0_ProcessInputRow(Input0Buffer Row)
    if (Row.Event == 5)
    _prevSessionKey = (Row.SessionKey_IsNull? <your default value here> : Row.SessionKey);
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Use Variables created in script block outside of script block

    hello
    I have a code like:
    $command= { param($p1,$p2) if (Test-Path "D:\$p1") {
    $s=$p1+ "_" +$p2 } }
    Invoke-Command -session $sesion -ScriptBlock $command -ArgumentList 1,2here session is already created with remote server. Invoke-Command runs that script block on a remote server.Now I want to use that variable $s after invoke-command like $command= { param($p1,$p2) if (Test-Path "D:\$p1") { $s=$p1+ "_" +$p2 } }
    Invoke-Command -session $sesion -ScriptBlock $command -ArgumentList 1,2write-host $sif ($s -eq "ZTE_3G") {Write-host True} else {write host false}But here value of variable $s comes as null.Could you please help me how can i use value of that vairable?

    You need to return $s in your scriptblock and then save the output of Invoke-Command to a variable in order to test.
    Something like this may work:
    $command= {
    param($p1,$p2)
    if (Test-Path "D:\$p1") {
    $s=$p1+ "_" +$p2
    $s
    $s = Invoke-Command -session $sesion -ScriptBlock $command -ArgumentList 1,2
    write-host $s
    If ($s -eq "ZTE_3G") {
    $True
    } else {
    $False
    Boe Prox
    Blog |
    Twitter
    PoshWSUS |
    PoshPAIG | PoshChat |
    PoshEventUI | PoshRSJob
    PowerShell Deep Dives Book

  • Using variables in sql scripts

    I am trying to pass a variable into a simple
    sql script - but each time I run it, it still asks for the variable.
    Here is my example:
    test.sql contains:
    select count(*) from &tbl
    I try to run it by typing the following
    at the sqlplus prompt:
    @test the_tbl
    Even though I provide a value for &tbl,
    sqlplus still asks me for the value:
    Enter value for tbl:
    I am sure that the answer is very simple.
    what am I doing wrong ?
    Thanks !

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by KR:
    I am trying to pass a variable into a simple
    sql script - but each time I run it, it still asks for the variable.
    Here is my example:
    test.sql contains:
    select count(*) from &tbl
    I try to run it by typing the following
    at the sqlplus prompt:
    @test the_tbl
    Even though I provide a value for &tbl,
    sqlplus still asks me for the value:
    Enter value for tbl:
    I am sure that the answer is very simple.
    what am I doing wrong ?
    Thanks !<HR></BLOCKQUOTE>
    In SQL Plus 8.0 this command goes correctly:
    select count(*) from &tb ;
    null

  • Are the WLS 9.1 Web Service Ant Tasks ready for prime time?

    I am trying to create a Proof of Concept (POC) for Enterprise and B2B Services at Wendy's Int'l, Inc.
    As part of this POC, I created a WSDL for an in-house service and then used the wsdlc and jwsc Ant Tasks to translate this WSDL to Java classes and ultimately (I hoped) a deployable services.
    In this document, I describe the issues I encountered setting up what I consider to be a simple POC.
    I'll try to attach my WSDL file and build.xml so you can follow along.
    I'll also try to attach my CSS file so you can compare how the generated WSDL appears in the Browser to the way I want it to appear.
    If attachments are not allowed on these forums, then I will wait and see if there is interest in those documents before I paste them under this topic.
    Some preliminary information about my environment.
    Environment:
         Windows XP Pro SP2
         WebLogic 9.1
         Java 1.5.0_04
    Service Name:
         AppRelease
    Note: If I modify my WSDL (perhaps to add a new Operation or to change the definition of an element) and run wsdlc again, the AppReleaseSOAPPortImpl.java file is overwritten For this reason, I implemented my service logic in a class called AppReleaseServiceImple.java.
    Now, for the issues.
    1.     Bug:
    In the WSDL generated by wsdlc, the wsdl:part child of the wsdl:message tag is erroneously prefixed with a colon.
    This occurs whether or not I specify a prefix for the http://schemas.xmlsoap.org/wsdl/ namespace.
    Work around: Extract the wsdl from the jar file, fix it and add it back into the jar.
    2.     Bug:
    In the WSDL generated by wsdlc, the wsdl:input and wsdl:output children of the wsdl:operation child of wsdl:portType tag are erroneously prefixed with a colon. Like 1 above, this occurs whether or not I specify a prefix for the http://schemas.xmlsoap.org/wsdl/ namespace.
    Work around: Extract the wsdl from the jar file, fix it and add it back into the jar.
    The error message generated by Bugs 1 and 2 is not helpful in diagnosing the problem:
    [jwsc] Error at line:46 col:7 ':' expected [?! -- [CDATA[ ]
    3.     Bug:
    In the WSDL generated by wsdlc, the documentation elements have all of my html elements stripped out, as well as my xhtml and wsdl namespace references. This completely negates one of the best features of the documentation tag, being able to present the WSDL in a browser as a nicely formatted, human friendly document which is also the underlying WSDL that can be viewed when the person views the source document.
    I label this as a bug because it greatly reduces the functionality of the resulting WSDL.
    4.     Annoyance:
    The WSDL generated by wsdlc has all of my comments stripped out, except the comments in the xsd:schema section of the wsdl:types element. I would prefer that all my comments be left in the WSDL, but if comments must be stripped out then I think all of the comments should be stripped out.
    5.     Annoyance:
    The WSDL generated by wsdlc has my CSS specification stripped.
    Work around: I don’t know if adding the CSS back will do any good because I have not yet created a deployable service (see the last issue below).
    6.     Annoyance:
    The WSDL generated by wsdlc has different namespace prefixes than the ones I specified for my application's namespace and for the http://schemas.xmlsoap.org/wsdl/soap/ namespace.
    Work around: Perform a find/replace on namespace prefixes "s0" and "s1" to return them to my prefered values.
    Another thing I can do at this point is simply replace the generated WSDL in the jar file with my original WSDL. This would address issues 1 thru 6 above.
    7.     Annoyance:
    The java source files created by wsdlc are put into a jar file. This makes it annoying when working within a traditional IDE like Eclipse because there is no way to reference the source files within the jar as working source.
    Work around: Extract the source files from the jar and identify the resulting directory structure as part of the source structure of the project.
    8.     Bug:
    The jwsc task complains if the same parameter name is used in multiple operations. I received the following Errors from jwsc:
    [jwsc] C:\IDE\workspace\Acre-WL9.1\AppReleaseSOAPPort.java 0:0
    [jwsc] [ERROR] - Parameter element "{http://acre.services.wendys.com/AppRelease/}garRequest" is not unique across document/literal bare WebService.
    Since the operation names are unique, I see no reason to also require uniqueness in the parameter names used by those operations.
    Work around: Use unique element names for the input parameters of the services operations.
    9.     Bug:
    Once items 1, 2 and 8 above are taken care of, jwsc fails with the following error:
    java.lang.AssertionError: java.lang.ClassNotFoundException: weblogic.j2ee.descriptor.ApplicationBeanImpl
    This seems to be due to the weblogic.jar file not being in the System Classpath.
    However, I should note that when I set verbose="on" and debug="on" in the jwsc ant task, there was a message from the task which stated "[jwsc] [search path for class files: [big freakin’ jar list]". In the big freakin’ jar list, I did find weblogic.jar and weblogic.jar has the required ApplicationBeanImpl. This indicates to me that the jwsc task does not fully honor either its classpathref attribute, nor an embedded classpath element.
    Work around: Make sure the weblogic.jar is in the System Classpath.
    10.     Bug:
    I fixed bug #9 by running a setDomainEnv script and then ran my ant task. This time I received the following output:
    ant build-serviceBuildfile: build.xml
    build-service:
    [jwsc] 1 JWS files will be processed.
    [jwsc] Processing JWS: C:\IDE\workspace\Acre-WL9.1\src\com\wendys\services\acre\AppReleaseServiceImpl.java
    [jwsc] JWS: C:\IDE\workspace\Acre-WL9.1\src\com\wendys\services\acre\AppReleaseServiceImpl.java Validated.
    [AntUtil.deleteDir] Deleting directory <some temporary directory>
    BUILD FAILED
    java.lang.ExceptionInInitializerError
    At this point, I am completely stymied about how to proceed.
    I wonder what new issues await once this 10th issue is addressed.
    Really, is this tool set ready for prime time?

    <i>Sorry to hear you are having so many issues with using the WLS 9.1 web service Ant tasks, inside of Eclipse.
    I generally create a User Library for the couple weblogic jars needed, and use it (the User Library) in my Eclipse projects that I create JWSes in.</i><br>
    I also have a separate WebLogic Library in Eclipse (actually 2 libraries since I work with WL 8.1 and now WL 9.1). As you may know, one of the long-standing issues with the Ant integration within Eclipse is the fact that Ant, being an External Tool, does not receive the Project-specific Paths/Libraries. However, since most Java-relevant Ant tasks can take classpath and classpathref attributes, this is usually not an issue. In the case of the BEA-supplied wsdlc Ant task, it is apparent from the verbose/debug console output that wsdlc can see the jars in its classpathref, but it ignores those references when resolving class references and instead only uses the system classpath.
    <p>
    <i>I've only needed the weblogic.jar and xbean.jar, not all the ones you mentioned in an earlier thread of this post.</i><br>
    I have not tried to winnow down exactly which jars are required. I simply included all the jars that exist and were added to the system classpath by the setDomainEnv.bat file created by WebLogic 9.1.
    <p>
    <i>Afterwards, I create an Ant Builder to build the JWS Web Service EAR, as opposed to fiddlin' with Eclipse.</i><br>
    I too use Ant to build my deployable archives. Eclipse is simply my IDE of choice. I validated that all the issues I listed occurred when running Ant from the command line.
    <p>
    <i>If you are interested in how I do it, send me an e-mail (to [email protected]), and I'll send you a zip of one of these JWS projects. The build.xml script for the project, takes care of a lot of the "annoyances" you mentioned, one of which I think is not accurate. I have never had a situation where the wsdlc Ant task "overwrote" my XXXImpl.java file..</i><br>
    Since I'm doing a POC to determine how we want to proceed with developing Web Services and an SOA in general, I tried to perform the same tasks using Axis 2 1.0, the WebLogic 9.1 tools, and XFire 1.1. Overwriting the Impl class is a common failing in the tools which take a WSDL and create Java source files for all three frameworks.
    <p>
    Try my scenario. Add another operation to an existing WSDL, and run the wsdlc Ant Task. The old IMPL class will be over-written.
    <p>
    Because of this, I have a separate Impl class and I make sure that all its methods and annotations match the methods and annotations in the Skeleton Impl class created by wsdlc.
    <p>
    <i>Maybe that's because I use the <exec> Ant task with jar.exe (the xvf options) in my build.xml, to only get what I need out of the .jar/.zip the wsdlc generates. I'm typically only interest in the interface class that my XXXImpl.java file needs to implements, because I use XMLBeans for the input args (and return values) of my web service operations.</i><br>
    Perhaps. I am not using XMLBeans in any of the three frameworks because the resulting service seems to be lighter-weight in all three frameworks if XMLBeans is not used. I'm sure there will be scenarios where XMLBeans is preferred, but I have not encountered that case in this POC.
    <p>
    <i>Regards,
    Mike Wooten</i>
    Thanks for the follow-up.
    Mike McAngus

  • 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

  • Sun-appserv-deploy cutom Ant task

    Hi
    I wanted to use sun-appserv-deploy custom ant task in my build file to deploy an archive. But the file attribute requires EXISTING file which is constantly being deleted and recreated during development...
        <taskdef name="sun-appserv-deploy" classname="org.apache.tools.ant.taskdefs.optional.sun.appserv.DeployTask">
            <classpath refid="j2ee.classpath"/>   
        </taskdef>
        <sun-appserv-deploy
          file="webapp1.war"
          contextroot="/webapp1"
          name="webapp1WAR
          force="true"
          precompilejsp="false"
          verify="false"
          upload="true"
          user="admin"
          passwordfile="${passwordfile}"
          host="localhost"
          port="4848"
          asinstalldir="${j2ee.home}"/>
    Unless the "webapp1.war" exists the enitre build.xml file invalidates (in eclipse)
    How do I use this custom task during my development time (obviously when I run clean the WAR file is removed which invalidates my build.xml)
    Is there a workaround for this?
    Thanks
    Z...

    You have to include an additional attribute in the task:
    <sun-appserv-deploy ... generatermistubs="true" />Edited by: sjfischli on May 15, 2008 8:54 AM

  • Ant tasks to migrate BPM organisation 5.7.3 to BPM10g

    We are migrating from BPM 5.7.3 to BPM 10g.
    We are referring to this article to do this task. http://www.oracle.com/technetwork/middleware/bpm/migrationinstructionsfromalbpm5-133430.pdf
    In preconditions it is mentioned -
    It is necessary to replicate the same exact Organization from ALBPM 5.7 to
    OBPM 10gR3. This can be accomplished in different ways using the Organization
    Export/Import, Ant Tasks and/or even a custom Organization replication mechanism
    Does anyone have samples on how to accomplish this?
    Thanks
    Mini

    Hi,
    Look at
    http://docs.oracle.com/cd/E13154_01/bpm/docs65/anttasks/index.html
    and you have a task called directory that is to export and import the organization.
    HTH

  • Wldeploy/wlserver Ant tasks & cruisecontrol output

    Hi,
    We are using the wlserver and wldeploy Ant tasks with cruisecontrol. We have found that the output from these tasks in included in the cruise email which is sent out, and are looking for a way to redirect this output to a file so that cruise doesn't think that this is warning output from the JVM. Currently, with all the deploy messages weblogic publishes cruise thinks that our code has 500 warnings.
    I would expect that this should be easy, but can't figure out for the life of me how to do it.
    Regards

    I'm coming back a few month later, and don't remember how I solved this problem. Today, I'm sure it is resolved, the task looks like this :
    <wldeploy action="deploy"
    source="${weblogic.deploy.dir}/${module.name}.ear"
    name="${module.name}"
    user="${weblogic.user}"
    password="${weblogic.password}"
    verbose="true"
    adminurl="${weblogic.adminurl}"
    debug="true"
    targets="${weblogic.servers.name}" />
    It should work since I've upgraded from WL 8.1 SP2 to WL 8.1 SP4.
    Regards
    Bernard

  • JWSC Ant task with JAXWS web services failed

    Hi,
    I do not manage to generate my JAXWS web services using jwsc ant task. It worked when my web services were JAX-RPC web services but now I have an error.
    In my build process, I generate first the web service artifacts from wsdl files using wsdlc :
    <path id="bea-ant-task.classpath">
      <pathelement location="${java.home}/../lib/tools.jar" />
      <fileset dir="${bea.home.dir}/wlserver_10.0/server/lib"/>
      <fileset dir="${bea.home.dir}/modules"/>
    </path>
    <taskdef name="wsdlc" classname="weblogic.wsee.tools.anttasks.WsdlcTask">
      <classpath refid="bea-ant-task.classpath" />
    </taskdef>
    <target name="generate-artifacts">
       <wsdlc type="JAXWS" srcWsdl="${build.wsdl.dir}/AlarmWS.wsdl" destJwsDir="${build.artifacts.jar.dir}" />
       <wsdlc type="JAXWS" srcWsdl="${build.wsdl.dir}/AlertWS.wsdl" destJwsDir="${build.artifacts.jar.dir}" />
    </target>Then I tried to generate my web services with jwsc :
    <taskdef name="jwsc" classname="weblogic.wsee.tools.anttasks.JwscTask">
      <classpath refid="bea-ant-task.classpath" />
    </taskdef>
    <target name="generate-webservices">
      <jwsc srcdir="src" destdir="${ear.dir}" keepGenerated="yes" classpathref="compile.classpath" >
           <module contextpath="myappli" name="webservices.jar" explode="true">
          <jws type="JAXWS" file="${myappli.path}/alarm/jwsendpoint/AlarmBean.java" compiledWsdl="${build.artifacts.jar.dir}/AlarmWS_wsdl.jar"/>
          <jws type="JAXWS" file="${myappli.path}/alert/jwsendpoint/AlertBean.java" compiledWsdl="${build.artifacts.jar.dir}/AlertWS_wsdl.jar"/>
        </module>
      </jwsc>
    </target>This task generate the following error :
    generate-webservices:
         [jwsc] JWS: processing module webservices.jar
         [jwsc] Parsing source files
         [jwsc] Parsing source files
         [jwsc] 2 JWS files being processed for module webservices.jar
         [jwsc] JWS: C:\projects\appli\main\src\net\aze\appli\services\alarm\jwsendpoint\AlarmBean.java Validated.
         [jwsc] JWS: C:\projects\appli\main\src\net\aze\appli\services\alert\jwsendpoint\AlertBean.java Validated.
         [jwsc] Processing 2 JAX-WS web services...
         [jwsc] warning: Annotation types without processors: [javax.ejb.Stateless, javax.annotation.Resource, javax.annotation.security.RolesAllowed]
         [jwsc] C:\DOCUME~1\wg\LOCALS~1\Temp\_jg4rtr3\net\aze\appli\jws\alert\PTAlert.java:33: The endpoint interface net.aze.appli.jws.alarm.PTAlarm does not match the interface net.aze.appli.jws.alert.PTAlert.
         [jwsc] public interface PTAlert {
         [jwsc]        ^
         [jwsc] 1 error
         [jwsc] 1 warning
         [jwsc] Command invoked: apt C:\apps\bea10\JROCKI~1\jre\bin\java.exe -classpath C:\projects\appli\lib\common\caplib.jar;C:\pr......[pre]
    C:\projects\aze\main\bea-build.xml:15: The following error occurred while executing this line:
    C:\projects\aze\main\ant\bea-generate-webservices.xml:46: The following error occurred while executing this line:
    C:\projects\aze\main\ant\bea-generate-webservices.xml:110: weblogic.wsee.tools.WsBuildException: Error processing JAX-WS web servicesHere is my bean implementation :
    @Stateless()
    @Resource(name = "jdbc/applids", mappedName = "applids", type = DataSource.class)
    @WebService(endpointInterface = "net.aze.appli.jws.alarm.PTAlarm")
    @HandlerChain(file = "../../../handler/alarmHandlerChain.xml")
    @RolesAllowed({"anonym", "systemUser"})
    public class AlarmBean implements PTAlarm {
        @Resource
        private SessionContext sessionContext;
        public AlarmCreateOut persist(AlarmCreateIn in) {
            return AlarmDelegate.getInstance(sessionContext).persist(in);
    @Stateless()
    @Resource(name = "jdbc/applids", mappedName = "applids", type = DataSource.class)
    @WebService(endpointInterface = "net.aze.appli.jws.alert.PTAlert")
    @RolesAllowed({"anonym", "systemUser"})
    public class AlertBean implements PTAlert {
        @Resource
        private SessionContext sessionContext;
        public AlertCreateOut persist(AlertCreateIn in) {
            return AlertDelegate.getInstance(sessionContext).persist(in);
    }Jwsc seems to mix the interfaces... If I try to generate only one bean in jwsc it works...
    Any ideas? I can't find the solution, could it be a bug?
    Thanks for your help.
    Edited by will_mad at 09/11/2007 1:56 AM

    Hi,
    I do not manage to generate my JAXWS web services
    using jwsc ant task. It worked when my web services
    were JAX-RPC web services but now I have an error.
    In my build process, I generate first the web service
    artifacts from wsdl files using wsdlc :
    <path id="bea-ant-task.classpath">
    <pathelement location="${java.home}/../lib/tools.jar" />
    <fileset dir="${bea.home.dir}/wlserver_10.0/server/lib"/>
    <fileset dir="${bea.home.dir}/modules"/>
    </path>
    <taskdef name="wsdlc" classname="weblogic.wsee.tools.anttasks.WsdlcTask">
    <classpath refid="bea-ant-task.classpath" />
    </taskdef>
    <target name="generate-artifacts">
    <wsdlc type="JAXWS" srcWsdl="${build.wsdl.dir}/AlarmWS.wsdl" destJwsDir="${build.artifacts.jar.dir}" />
    <wsdlc type="JAXWS" srcWsdl="${build.wsdl.dir}/AlertWS.wsdl" destJwsDir="${build.artifacts.jar.dir}" />
    </target>Then I tried to generate my web services with jwsc :
    <taskdef name="jwsc" classname="weblogic.wsee.tools.anttasks.JwscTask">
    <classpath refid="bea-ant-task.classpath" />
    </taskdef>
    <target name="generate-webservices">
    <jwsc srcdir="src" destdir="${ear.dir}" keepGenerated="yes" classpathref="compile.classpath" >
    <module contextpath="myappli" name="webservices.jar" explode="true">
    <jws type="JAXWS" file="${myappli.path}/alarm/jwsendpoint/AlarmBean.java" compiledWsdl="${build.artifacts.jar.dir}/AlarmWS_wsdl.jar"/>
    <jws type="JAXWS" file="${myappli.path}/alert/jwsendpoint/AlertBean.java" compiledWsdl="${build.artifacts.jar.dir}/AlertWS_wsdl.jar"/>
    </module>
    </jwsc>
    </target>This task generate the following error :
    generate-webservices:
    [jwsc] JWS: processing module webservices.jar
    [jwsc] Parsing source files
    [jwsc] Parsing source files
    [jwsc] 2 JWS files being processed for module
    odule webservices.jar
    [jwsc] JWS:
    JWS:
    C:\projects\appli\main\src\net\aze\appli\services\alar
    m\jwsendpoint\AlarmBean.java Validated.
    [jwsc] JWS:
    JWS:
    C:\projects\appli\main\src\net\aze\appli\services\aler
    t\jwsendpoint\AlertBean.java Validated.
    [jwsc] Processing 2 JAX-WS web services...
    [jwsc] warning: Annotation types without
    thout processors: [javax.ejb.Stateless,
    javax.annotation.Resource,
    javax.annotation.security.RolesAllowed]
    [jwsc]
    jwsc]
    C:\DOCUME~1\wg\LOCALS~1\Temp\_jg4rtr3\net\aze\appli\jw
    s\alert\PTAlert.java:33: The endpoint interface
    net.aze.appli.jws.alarm.PTAlarm does not match the
    interface net.aze.appli.jws.alert.PTAlert.
    [jwsc] public interface PTAlert {
    [jwsc]        ^
    [jwsc] 1 error
    [jwsc] 1 warning
    [jwsc] Command invoked: apt
    : apt C:\apps\bea10\JROCKI~1\jre\bin\java.exe
    -classpath
    C:\projects\appli\lib\common\caplib.jar;C:\pr......[pr
    e]
    C:\projects\aze\main\bea-build.xml:15: The following
    error occurred while executing this line:
    C:\projects\aze\main\ant\bea-generate-webservices.xml:
    46: The following error occurred while executing this
    line:
    C:\projects\aze\main\ant\bea-generate-webservices.xml:
    110: weblogic.wsee.tools.WsBuildException: Error
    processing JAX-WS web servicesHere is my bean implementation :
    @Stateless()
    @Resource(name = "jdbc/applids", mappedName =
    "applids", type = DataSource.class)
    @WebService(endpointInterface =
    "net.aze.appli.jws.alarm.PTAlarm")
    @HandlerChain(file =
    "../../../handler/alarmHandlerChain.xml")
    @RolesAllowed({"anonym", "systemUser"})
    public class AlarmBean implements PTAlarm {
    @Resource
    private SessionContext sessionContext;
    public AlarmCreateOut persist(AlarmCreateIn in)
    in) {
    return
    return
    n
    AlarmDelegate.getInstance(sessionContext).persist(in);
    @Stateless()
    @Resource(name = "jdbc/applids", mappedName =
    "applids", type = DataSource.class)
    @WebService(endpointInterface =
    "net.aze.appli.jws.alert.PTAlert")
    @RolesAllowed({"anonym", "systemUser"})
    public class AlertBean implements PTAlert {
    @Resource
    private SessionContext sessionContext;
    public AlertCreateOut persist(AlertCreateIn in)
    in) {
    return
    return
    n
    AlertDelegate.getInstance(sessionContext).persist(in);
    }Jwsc seems to mix the interfaces... If I try to
    generate only one bean in jwsc it works...
    Any ideas? I can't find the solution, could it be a
    bug?
    Thanks for your help.
    Edited by will_mad at 09/11/2007 1:56 AM
    Hi,
    I do not manage to generate my JAXWS web services
    using jwsc ant task. It worked when my web services
    were JAX-RPC web services but now I have an error.
    In my build process, I generate first the web service
    artifacts from wsdl files using wsdlc :
    <path id="bea-ant-task.classpath">
    <pathelement location="${java.home}/../lib/tools.jar" />
    <fileset dir="${bea.home.dir}/wlserver_10.0/server/lib"/>
    <fileset dir="${bea.home.dir}/modules"/>
    </path>
    <taskdef name="wsdlc" classname="weblogic.wsee.tools.anttasks.WsdlcTask">
    <classpath refid="bea-ant-task.classpath" />
    </taskdef>
    <target name="generate-artifacts">
    <wsdlc type="JAXWS" srcWsdl="${build.wsdl.dir}/AlarmWS.wsdl" destJwsDir="${build.artifacts.jar.dir}" />
    <wsdlc type="JAXWS" srcWsdl="${build.wsdl.dir}/AlertWS.wsdl" destJwsDir="${build.artifacts.jar.dir}" />
    </target>Then I tried to generate my web services with jwsc :
    <taskdef name="jwsc" classname="weblogic.wsee.tools.anttasks.JwscTask">
    <classpath refid="bea-ant-task.classpath" />
    </taskdef>
    <target name="generate-webservices">
    <jwsc srcdir="src" destdir="${ear.dir}" keepGenerated="yes" classpathref="compile.classpath" >
    <module contextpath="myappli" name="webservices.jar" explode="true">
    <jws type="JAXWS" file="${myappli.path}/alarm/jwsendpoint/AlarmBean.java" compiledWsdl="${build.artifacts.jar.dir}/AlarmWS_wsdl.jar"/>
    <jws type="JAXWS" file="${myappli.path}/alert/jwsendpoint/AlertBean.java" compiledWsdl="${build.artifacts.jar.dir}/AlertWS_wsdl.jar"/>
    </module>
    </jwsc>
    </target>This task generate the following error :
    generate-webservices:
    [jwsc] JWS: processing module webservices.jar
    [jwsc] Parsing source files
    [jwsc] Parsing source files
    [jwsc] 2 JWS files being processed for module
    odule webservices.jar
    [jwsc] JWS:
    JWS:
    C:\projects\appli\main\src\net\aze\appli\services\alar
    m\jwsendpoint\AlarmBean.java Validated.
    [jwsc] JWS:
    JWS:
    C:\projects\appli\main\src\net\aze\appli\services\aler
    t\jwsendpoint\AlertBean.java Validated.
    [jwsc] Processing 2 JAX-WS web services...
    [jwsc] warning: Annotation types without
    thout processors: [javax.ejb.Stateless,
    javax.annotation.Resource,
    javax.annotation.security.RolesAllowed]
    [jwsc]
    jwsc]
    C:\DOCUME~1\wg\LOCALS~1\Temp\_jg4rtr3\net\aze\appli\jw
    s\alert\PTAlert.java:33: The endpoint interface
    net.aze.appli.jws.alarm.PTAlarm does not match the
    interface net.aze.appli.jws.alert.PTAlert.
    [jwsc] public interface PTAlert {
    [jwsc]        ^
    [jwsc] 1 error
    [jwsc] 1 warning
    [jwsc] Command invoked: apt
    : apt C:\apps\bea10\JROCKI~1\jre\bin\java.exe
    -classpath
    C:\projects\appli\lib\common\caplib.jar;C:\pr......[pr
    e]
    C:\projects\aze\main\bea-build.xml:15: The following
    error occurred while executing this line:
    C:\projects\aze\main\ant\bea-generate-webservices.xml:
    46: The following error occurred while executing this
    line:
    C:\projects\aze\main\ant\bea-generate-webservices.xml:
    110: weblogic.wsee.tools.WsBuildException: Error
    processing JAX-WS web servicesHere is my bean implementation :
    @Stateless()
    @Resource(name = "jdbc/applids", mappedName =
    "applids", type = DataSource.class)
    @WebService(endpointInterface =
    "net.aze.appli.jws.alarm.PTAlarm")
    @HandlerChain(file =
    "../../../handler/alarmHandlerChain.xml")
    @RolesAllowed({"anonym", "systemUser"})
    public class AlarmBean implements PTAlarm {
    @Resource
    private SessionContext sessionContext;
    public AlarmCreateOut persist(AlarmCreateIn in)
    in) {
    return
    return
    n
    AlarmDelegate.getInstance(sessionContext).persist(in);
    @Stateless()
    @Resource(name = "jdbc/applids", mappedName =
    "applids", type = DataSource.class)
    @WebService(endpointInterface =
    "net.aze.appli.jws.alert.PTAlert")
    @RolesAllowed({"anonym", "systemUser"})
    public class AlertBean implements PTAlert {
    @Resource
    private SessionContext sessionContext;
    public AlertCreateOut persist(AlertCreateIn in)
    in) {
    return
    return
    n
    AlertDelegate.getInstance(sessionContext).persist(in);
    }Jwsc seems to mix the interfaces... If I try to
    generate only one bean in jwsc it works...
    Any ideas? I can't find the solution, could it be a
    bug?
    Thanks for your help.
    Edited by will_mad at 09/11/2007 1:56 AMI too am getting similar error. If you hit a solution, do let me know :)

  • Why this WLST script does not work from ant a task

    Hi,
              The following is my lovely WLST script to disable managed server hostname verification in a cluster environment.
              It works perfect if I run it from the OS command line,
              java -cp $WL_HOME/server/lib/weblogic.jar sslSetting.py weblogic weblogic t3://localhost:7001
              But if I run it from ant task, it never works. Nothing happens, not even any messages. Any idea?
              ------ sslSetting.py -----------
              # Disable HostnameVerification on managed servers
              # This is a ONLINE script. The admin server must be running
              # @param $1 BEA_USER_NAME
              # @param $2 BEA_USER_PWD
              # @param $3 admin server URL
              if (len(sys.argv) != 4):
              print "usage: " + sys.argv[0] + " domain-home "
              sys.exit()
              beaUserName=sys.argv[1]
              beaUserPwd=sys.argv[2]
              adminServerUrl=sys.argv[3]
              def handleServer(server):
              SSLPath="/Servers/" + server.getName() + "/SSL/" + server.getName()
              print("handleServer(1): " + SSLPath)
              try:
              cd (SSLPath)
              print("handleServer(2): " + SSLPath)
              set("HostnameVerificationIgnored", "true")
              except Exception, inst:
              dumpStack()
              print ("FAILED handleServer(): " + SSLPath)
              else:
              print ("DONE handleServer(): " + SSLPath)
              #===============================================================================
              # Main
              #===============================================================================
              try:
              connect(beaUserName, beaUserPwd, adminServerUrl)
              edit()
              startEdit()
              adminServerName=cmo.getAdminServerName()
              for server in cmo.getServers():
              if adminServerName != server.getName():
              handleServer(server)
              save()
              activate()
              except Exception:
              dumpStack()
              else:
              print ("=== DONE ===")

    OK, when I run the WLST script from command java, I only need the weblogic.jar in the classpath. But I'll need a couple other jar file for it to work inside an ant target, as showing below.
              <target name="run-wlst">
              <java classname="weblogic.WLST" fork="true">
              <classpath>
              <pathelement path="${props.JAVA_HOME}/lib/tools.jar"/>
              <pathelement path="${props.WL_HOME}/server/lib/weblogic_sp.jar"/>
              <pathelement path="${props.WL_HOME}/server/lib/weblogic.jar"/>
              <pathelement path="${props.WL_HOME}/server/lib/webservices.jar"/>
              </classpath>
              <sysproperty key="weblogic.Home" value="${props.WL_HOME}" />
              <arg line="sslSetting.py weblogic weblogic t3://localhost:7001"/>
              </java>
              </target>

  • Error Using WLST In Ant

    When I run the following Ant target:
    <target name="deploy-to-weblogic">
    <exec executable="${weblogic.bin.dir}/setWLSEnv.cmd" />
    <wlst failOnError="true" debug="true">
    <script>
    Jython stuff
    </script>
    </wlst>
    </target>
    I get this error:
    BUILD FAILED
    D:\bea_dev\domains\domain_dev\build-weblogic-deployment.xml:25: java.lang.Runtim
    eException: error in finding weblogic.Home
    at weblogic.ant.taskdefs.management.WLSTTask.execute(WLSTTask.java:119)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
    a:105)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:357)
    at org.apache.tools.ant.Target.performTasks(Target.java:385)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
    cutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
    at org.apache.tools.ant.Main.runBuild(Main.java:698)
    at org.apache.tools.ant.Main.startAnt(Main.java:199)
    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
    Total time: 1 second
    As you can see, I have set the environment with that exec task, but for some reason I am getting the error you see above.
    It is interesting to note though that the file wlst.cmd does indeed work. The file looks like this:
    @ECHO OFF
    SETLOCAL
    SET WL_HOME=D:\bea_dev\weblogic92
    CALL "%WL_HOME%\server\bin\setWLSEnv.cmd"
    SET CLASSPATH=%CLASSPATH%;%WL_HOME%\common\eval\pointbase\lib\pbembedded51.jar;%WL_HOME%\common\eval\pointbase\lib\pbtools51.jar;%WL_HOME%\common\eval\pointbase\lib\pbclient51.jar
    @echo.
    @echo CLASSPATH=%CLASSPATH%
    "%JAVA_HOME%\bin\java" weblogic.WLST %*
    ENDLOCAL
    I will mention that WL_HOME is set as an environment variable to the value above. I also tried running the class through the <java> task to no avail.
    I appreciate any insight you can provide.
    Thanks.

    If you are on windows, the ant <exec> forks off another process using
    ::CreateProcess, so I think your <exec> command is setting up the
    environment in a different process than the process that wlst is being
    run from.
    See http://ant.apache.org/manual/CoreTasks/exec.html
    Have you tried doing the setWLSEnv.cmd before you run ant?
    Tony
    Neil C wrote:
    When I run the following Ant target:
    <target name="deploy-to-weblogic">
    <exec executable="${weblogic.bin.dir}/setWLSEnv.cmd" />
    <wlst failOnError="true" debug="true">
    <script>
    Jython stuff
    </script>
    </wlst>
    </target>
    I get this error:
    BUILD FAILED
    D:\bea_dev\domains\domain_dev\build-weblogic-deployment.xml:25: java.lang.Runtim
    eException: error in finding weblogic.Home
    at weblogic.ant.taskdefs.management.WLSTTask.execute(WLSTTask.java:119)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
    a:105)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:357)
    at org.apache.tools.ant.Target.performTasks(Target.java:385)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
    cutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
    at org.apache.tools.ant.Main.runBuild(Main.java:698)
    at org.apache.tools.ant.Main.startAnt(Main.java:199)
    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
    Total time: 1 second
    As you can see, I have set the environment with that exec task, but for some reason I am getting the error you see above.
    It is interesting to note though that the file wlst.cmd does indeed work. The file looks like this:
    @ECHO OFF
    SETLOCAL
    SET WL_HOME=D:\bea_dev\weblogic92
    CALL "%WL_HOME%\server\bin\setWLSEnv.cmd"
    SET CLASSPATH=%CLASSPATH%;%WL_HOME%\common\eval\pointbase\lib\pbembedded51.jar;%WL_HOME%\common\eval\pointbase\lib\pbtools51.jar;%WL_HOME%\common\eval\pointbase\lib\pbclient51.jar
    @echo.
    @echo CLASSPATH=%CLASSPATH%
    "%JAVA_HOME%\bin\java" weblogic.WLST %*
    ENDLOCAL
    I will mention that WL_HOME is set as an environment variable to the value above. I also tried running the class through the <java> task to no avail.
    I appreciate any insight you can provide.
    Thanks.

Maybe you are looking for

  • HT1657 Not enough storage to complete movie download.

    Can I get a refund?

  • Ship Method not populating in SBO

    All of a sudden, I have no Ship Methods populating in SAP from Web tools. Has anyone experienced this and know how to fix it? What table and column dictates who is a B2B or B2C customer? Thanks, Craig Spehar Edited by: Craig Spehar on Oct 6, 2008 6:2

  • Call 'SAP Java Connector'

    Hi, has someone integrated in Forms 9.0.4 the call to the 'SAP Java Connector'? If yes, do you have an HowToDo or a ProfOfConcept? All Tipps and Tricks are welcome. Best Regrads Martin

  • Rollover buttons are turning into Xs!!!

    I created a template in dreamweaver 8, I designed the site in photoshop and then sliced it in image ready, I did rollover navigation buttons in image ready, simply giving them glow when you move over them. I then defined the site in dreamweaver and i

  • Can't drag and drop to iTunes any more.

    I can't drag and drop to iTunes any more, like I have done for years.  Files are correct for iTunes.  HD's have plenty of space.  What's wrong???