JAXRPC--adding cmd line args to client

Hi,
I followed all of the steps in the Java Web Services Tutorial for JAX-RPC to run the HelloWorld example and everything worked as outline on pages 335-341 of the tutorial. ONE BIG QUESTION: How can I add my own argument to the client so that, instead of displaying "Hello Duke!" (i.e., "Hello <whatever is hardcoded in HelloClient.java>!"), I can display "Hello <cmd line argument>"
Thanks,
marcia

In HelloClient.java, change the sayHello call to:
System.out.println(stub.sayHello(args[1]));
In the build.xml, add this line to the run target
below the arg line for the endpoint:
<arg value="${msg}" />
To run the program and specify "Bob" as the argument:
ant -Dmsg=Bob run
For more info about passing arguments to ant, please
refer to the Ant User Manual (see the core task named
"java"). The manual starts at the
docs/ant/manual/index.html file.
Hope that helps. -- Dale

Similar Messages

  • Cmd-line client for web service

    Hi there,
    I'm new to Sun Java Studio, but generally familiar with the technology. So far I managed to build a web service and to register it.
    Now I would like to build a simple cmd-line client to invoke this web services. I couldn't find anything in the "documentation" or "tutorial". Does anybody has some sample code?
    Thanks,
    Andreas

    The tutorial http://www.netbeans.org/kb/50/quickstart-webservice-client.html provides a sample for developing a standalone client that consumes a webservice.
    The tutorial is for NetBeans 5.0 (http://www.netbeans.info/downloads/download.php?type=5.0) but should be applicable for JSE8 (based on NB4.1).

  • Adding new line item in SC after it is added to PR or PO

    Hi Experts,
    Our customer wants that if line item is added to PR and PO on ECC side, it should be added to SC as well. I am sure you can't change apporved SC for which follow on document is created. But if someone did similar kind of requirement.
    Here is requirement.
    >  SC has 2 line items.
    >  PR is created in ECC for 2 line items after SC is apporved.
    > User added 3rd line item in PR on ECC side.
    > Customer wants this line item should be added to SC as well.
    Please advise.
    Regards,
    Kamal

    Hi,
    In Classic Scenario: This is not possible .when you are adding a P.O in ECC it will not reflect in
    SRM.
    In Extended Classic scenario: In SRM  only P.O is  created .You can add a new line items (or) change
    because P.O in SRM Server is the main P.O.
    Moreover in this also Shopping cart will not update. Once Shopping cart is approved you can do any changes
    Please check which scenario your client is using.
    Regards
    G.Ganesh Kumar

  • AXL updatePhone(): Adding a Line won't work

    Hello everybody,
    i've got a problem with adding a line to a phone in CUCM 6.0. I'm working with php and its soap-functions and i'm getting the following error:
    [SOAP-ENV:Client] Cannot insert a null into column (devicenumplanmap.numplanindex).
    I'm sending the following parameters with the request:
    Array (
    [uuid] => 0cb9c043-b2c2-ccb6-287c-30a2a4e8d26d
    [enableExtensionMobility] => 0
    [lines] => Array (
    [line] => Array (
    [label] => test
    [display] => test
    [dirn] => Array (
    [pattern] => 5000
    [usage] => Device
    [uuid] => 744b4c71-2ba7-0124-4640-d67a1411c9f7
    [busyTrigger] => 1
    [maxNumCalls] => 2
    [callInfoDisplay] => Array (
    [callerName] => 0
    [callerNumber] => 0
    [redirectedNumber] => 0
    [dialedNumber] => 0
    [ringSetting] => Ring
    The directory number exists and the phone exists also... Does anybody know what that error means?????

    having the exact same problem and its driving me crazy! Any solutions?

  • What are the netsh cmd line for windows server 2008,2012 ?

    Hi
        I am try to config ip,subnet,gateway,preferred and secondary dns using netsh for windows server 2008,2012,
    Before Netsh cmd support for all os including Win 8,win 8.1.
    I need to config form client machine to server machine using netsh cmd lines,i will try in remote login also like i will give server name,username and password with netsh cmd.Below is sample cmd line,using process i will change ip config.
    netsh -r Admin-pc -u admin-pc\administrator -p XXXXX interface ip set address name="Local Area Connection" Static 192.168.0.60 255.255.255.0 192.168.0.1
    when i run in windows server using cmd prompt it show error like "some commands line not found in specified file"
    This is my code in asp.net using vb
     Dim pip As New Process()
            Dim pipa As New ProcessStartInfo("netsh -r Admin-pc -u admin-pc\administrator -p XXXXX interface ip set address name="Local Area Connection" Static 192.168.0.60 255.255.255.0 192.168.0.1")
            pip.StartInfo = pipa
            pip.StartInfo.UseShellExecute = False
            pip.StartInfo.RedirectStandardOutput = True
            pip.Start()
            pip.WaitForExit()
    And if change  ip,subnet and default gateway,internet not work,if i change preferred and secondary dns then only internet work and can browse.
    I can change ip,subnet,gateway,both dns is some other way,below is the link
    http://www.codeproject.com/Questions/795642/How-to-change-IP-Subnet-Gateway-DNS-Prefers-and-al?arn=0
    but what problem is if server is logoff,changes not reflect in server machine,may be it logoff.
    So i need is if server is logoff,need to change ip,subnet,gateway and both dns using netsh or some other vb codings in asp,net.I am try to change ip address form client machine also.
    Pls reply asap
     Regards
         Aravind 

    For the shell scripting I'd try them here.
    Scripting forum on MSDN
    Scripting Guys forum on TechNet
    For the asp.net I'd ask over here.
    Microsoft ASP.Net forums
    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]
    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

  • How can I run multiple midlets in parallel via the raspberry pi cmd line interface?

    I am trying to run multiple midlets at the same time on my raspberry pi.
    From netbeans point of view I am able to deploy and run them. But for my applications I want to auto start multiple midlets on the raspberry pi.
    On the cmd line interface of java me 8 I have commands to install a midlet and run a midlet.
    But i am not able to start multiple midlets.
    Can someone explain to me how I can do this?

    Hi!
    Could you please clarify a bit: do you want auto-start behavior of your applications or be able to start them manually via CLI?
    Because "auto start" means that applications are started by Java once you start Java itself and in order to make it happen you shall mark your applications appropriately (check MEEP spec for "MIDlet-<n>-Type" application attribute value "autostart"). If this is the case, have you added this attribute?
    If you want to run them manually you should be ale to do so via CLI just the same way as you start one application (via "ams-run" command).
    Either way, could you also please clarify what are the symptoms of the problem? E.g. on CLI what are the messages you receive back (if start is unsuccessful what is the error message etc).
    In addition please mind that there is limit on number of simultaneous VM tasks. If I'm not mistaken by default it is 6: 2 of them are used by system code and each running MIDlet consumes 1 VM task. If you want to increase it please change the value of "MAX_ISOLATES" property in jwc_properties.ini file. The maximum supported value is 16
    Regards,
    Andrey

  • Bash number of command line args....

    Hi,
    Is there a way in bash to get number of command line args ...
    atm I am using $1 but of course if you pass a command like uname -a you need two?
    wondered if there is a $<foo> that ill give number of args passed?
    EDIT looks like '$#' emmmm lets see....

    woah!!! ok thanks ..... $# gives me number of args ... will check it out
    $1 $2 > /tmp/cmd
    messy way.....

  • Firefox won't open following update. Can't open Profile Mgr, even when using entire directory path in cmd line

    I'm running Firefox on a Windows 7 machine. Firefox won't open following the latest update. I've read the help articles and it seems like I need to create a new profile because my settings have likely been corrupted. I'm unable to open Profile Mgr, even when using entire directory path in cmd line. I've tried the following commands in the command line:
    firefox -p
    "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -p
    Nothing happens with either command.
    I'm also running Norton Internet Security. I read a help article Re Virtual Browsing features possibly causing a problem. The article said to check the virtualization setting in the internet security software and to clear the virtual cache. I went thru all of the settings menus in Norton Internet Security version 21.6.0.32 and I didn't see anything that looked like 'virtualization" settings, so I assumed that this doesn't apply to me.
    If you have any ideas, I'd sure appreaciate your expertise!!

    ''arcandl [[#question-1038482|said]]''
    <blockquote>
    I'm running Firefox on a Windows 7 machine. Firefox won't open following the latest update. I've read the help articles and it seems like I need to create a new profile because my settings have likely been corrupted. I'm unable to open Profile Mgr, even when using entire directory path in cmd line. I've tried the following commands in the command line:
    firefox -p
    "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -p
    Nothing happens with either command.
    I'm also running Norton Internet Security. I read a help article Re Virtual Browsing features possibly causing a problem. The article said to check the virtualization setting in the internet security software and to clear the virtual cache. I went thru all of the settings menus in Norton Internet Security version 21.6.0.32 and I didn't see anything that looked like 'virtualization" settings, so I assumed that this doesn't apply to me.
    If you have any ideas, I'd sure appreaciate your expertise!!
    </blockquote>
    ''philipp [[#answer-670108|said]]''
    <blockquote>
    hello arcandl, when firefox isn't launching after you double-click on the shortcut this is sometimes also a sign of malware being active on a system.
    you might want to try running a scan with some different other security tools like the [http://www.malwarebytes.org/products/malwarebytes_free free version of malwarebytes] and [http://www.bleepingcomputer.com/download/adwcleaner/ adwcleaner] which are specialised in removing adware and browser hijackers.
    [[Troubleshoot Firefox issues caused by malware]]
    </blockquote>
    Phillip - You're a genius!!! I ran malwarebytes and it resolved my problem. Thank you so much!!!

  • Default G/L acct and Cost center in service PO with added Freight line also

    Hi,
    I am doing Service PO my requirement is we need default G/l account and cost center in Service PO, we have added one line as Freight charges that is also required default g/l account.
    please suggest me the configuration.
    Thanks
    Shital

    Hi,
    Can be set with help of following t.codes to have default G/L account with  cost center in Service PO
    OME9, OMGO ,OMQW & OBYC
    Also check the blog:
    http://www.bluemarlinsys.com/ns/0603-03.asp
    Regards,
    Biju K

  • Include command line args in executable jar?

    Hello all,
    I'm trying to package up some software which takes 2 command line args to run (for example, java -jar prog.jar FooBar 3.14159). I'm using a utility called Jar2Exe to wrap it up into an exe (still needs JRE to run, but it's nicer packaging for distribution).
    My question is, how can I included command line arguments in the jar? Or can I? Or, are there any exe-wrapping utilities out there that will allow me to accomplish this?
    Thanks,
    -Thok

    Thok wrote:
    Hello all,
    I'm trying to package up some software which takes 2 command line args to run (for example, java -jar prog.jar FooBar 3.14159). I'm using a utility called Jar2Exe to wrap it up into an exe (still needs JRE to run, but it's nicer packaging for distribution).
    My question is, how can I included command line arguments in the jar? Or can I? Or, are there any exe-wrapping utilities out there that will allow me to accomplish this?
    Thanks,
    -ThokOkay, did some more research... It appears you can't specify command line options in a jar, but if you package it into an exe, you can--depending on what utility you use to wrap it, that is. I downloaded a free one (Launch4j) and it does the trick.
    -Thok

  • Wrong to process command line args in a loop?

    I tried to process my command line args like this:
    int[] rgb = {0,0,0};
              for(int i=1;i<3;i++)
                   rgb[i-1] = Integer.parseInt(args);
    I enter six args where args 1 to 3 are ints and not zero, but rgb[2] always ends up being zero. I had to do away with the loop and write out three assignment statements, but if I had ten or more args that would be a headache! Does anyone know why this is happening? I'm using JDK 1.3.1_15.

    for(int i=0;i<3;i++)
       rgb[i] = Integer.parseInt(args);
    Look closely and make sure you understand the differences between my code and yours:
    * i starts at 0, not 1
    * rgb uses i for index, not i - 1.
    Why would you have rgb using i -1 and args using i?
    Now, if you have an arg [i]before the RGB args, then it would make sense for args' index to be different than rgb's. In that case, you might have i-1 and i, or i and i+1, etc. depending on how you structure your loop.
    The main problem is that you had i=1; i<3, which will go through the loop body for i=1 and i=2 only. Make sure you understand why.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to set JRE 1.5.0_07 as default Java from the cmd line in Windows

    Hi All,
    We are currently in the process of upgrading our company to IE8. As MS JVM is incompatible we need to remove it.
    However, once we have done this JRE 1.5.0_07 is not the default version of Java any more for IE8.
    My question is - Is there a command line switch to set set JRE 1.5.0_07 as default Java from the cmd line in Windows. ie the setting in Java Control panel where you would tick Internet Explorer?
    Thanks in advance!

    This is to confirm a similar issue. Here is the scenario:
    We are currently using IE 6 and looking forward to upgrade to IE 8. Our current Java version is: J2RE 1.5.0_16.
    When updating from IE 6 to IE 8 with J2RE 1.5.0_16 on a test workstation, we get the following error from the Java testing website (http://www.java.com/en/download/help/testvm.xml): "load: class testvm2/Main.class not found."
    Workaround :
    -> Change Java JRE Network Settings in Control Panel to "User proxy server : xxx.xxx.xxx.xxx:xx"
    We are using an autoconfig.pac file and it seems IE8 can't parse the settings to JRE to go through the proxy.
    Please advise if you have a fix for the autoconfig.pac file.

  • Adding One Line Code in all tables in Designer Trigger.

    I have 300+ tables in my Schema (All tables generated through Designer), I want to add one line of code in the begining of "Before Inset Row Trigger" of all tables, So what is the fastest way of doing that,
    Adding One Line Code in all tables in Designer Trigger.
    I don't want to go and modify each and every table

    You'll have to write a script that reads out the current contents of your triggers, add your line to this contents and dynamically "create or replace" the new trigger text.
    Beware, trigger_body column of user/all/dba_triggers is in a column with datatype LONG, so you'll have to use some sort of conversion.
    Good luck.
    regards,
    Rob.

  • 1142N unable to open Web GUI and CMD line options not available

    I am currently trying to configure two 1142N APs (AIR-LAP1142N-A-K9) to be stand alone APs. I have followed the PDFs
    http://www.cisco.com/en/US/customer/docs/wireless/access_point/12.3_8_JA/configuration/guide/s38frst.html#wp1103248
    and
    http://www.cisco.com/en/US/customer/docs/wireless/access_point/12.3_2_JA/configuration/guide/s32frst.html#wp1103310
    I set up the switch to provide DHCP and confirmed that each AP is indeed assigned an IP address. I can also ping each device. However when trying to browse to the GUI it fails to connect. So I tried to configure it via the CMD line. The enable mode does not give the option to configure interfaces as you would expect in enable mode nor does it give the option to enter global exec. example of the out put below.
    AP8843.e178.0ee0>
    AP8843.e178.0ee0>enable
    Password:
    AP8843.e178.0ee0#?
    Exec commands:
      cd               Change current directory
      clear            Reset functions
      clock            Manage the system clock
      crypto           Encryption related commands.
      debug            Debugging functions (see also 'undebug')
      delete           Delete a file
      dir              List files on a filesystem
      disable          Turn off privileged commands
      enable           Turn on privileged commands
      exit             Exit from the EXEC
      fsck             Fsck a filesystem
      help             Description of the interactive help system
      led              LED functions
      lock             Lock the terminal
      login            Log in as a particular user
      logout           Exit from the EXEC
      lwapp            lwapp exec commands
      mkdir            Create new directory
      monitor          Monitoring different system events
      more             Display the contents of a file
      name-connection  Name an existing network connection
      no               Disable debugging functions
      ping             Send echo messages
      pwd              Display current working directory
      release          Release a resource
      reload           Halt and perform a cold restart
      rename           Rename a file
      renew            Renew a resource
      rmdir            Remove existing directory
      send             Send a message to other tty lines
      set              Set system parameter (not config)
      show             Show running system information
      systat           Display information about terminal lines
      terminal         Set terminal line parameters
      test             Test subsystems, memory, and interfaces
      traceroute       Trace route to destination
      undebug          Disable debugging functions (see also 'debug')
      upgrade          Upgrade software
      verify           Verify a file
      where            List active connections
    It seems that the IOS on this device does not have the capability to configure the AP as stand alone or that it has been disabled. How do I get into the CMD line to configure the AP for deployment?
    Secondly since I could not configure it via the CMD line I attempted to connect to it via the GUI like I said above. This fails. I ran an NMAP to find out what is open and found that nothing but port 23 is open. What is the deal here? Is the web GUI shut off by default? Am I just totally missing something? I think I dies a little inside after this...help please?

    AP8843.e178.0ee0#sh ver
    Cisco IOS Software, C1140 Software (C1140-RCVK9W8-M), Version 12.4(18a)JA, RELEASE SOFTWARE (fc4)
    Technical Support: http://www.cisco.com/techsupport
    Copyright (c) 1986-2008 by Cisco Systems, Inc.
    Compiled Fri 21-Nov-08 01:28 by prod_rel_team
    ROM: Bootstrap program is C1140 boot loader
    BOOTLDR: C1140 Boot Loader (C1140-BOOT-M) Version 12.4(18a)JA3, RELEASE SOFTWARE (fc1)
    AP8843.e178.0ee0 uptime is 2 hours, 16 minutes
    System returned to ROM by power-on
    System image file is "flash:/c1140-rcvk9w8-mx/c1140-rcvk9w8-mx"
    This product contains cryptographic features and is subject to United
    States and local country laws governing import, export, transfer and
    use. Delivery of Cisco cryptographic products does not imply
    third-party authority to import, export, distribute or use encryption.
    Importers, exporters, distributors and users are responsible for
    compliance with U.S. and local country laws. By using this product you
    agree to comply with applicable laws and regulations. If you are unable
    to comply with U.S. and local laws, return this product immediately.
    A summary of U.S. laws governing Cisco cryptographic products may be found at:
    http://www.cisco.com/wwl/export/crypto/tool/stqrg.html
    If you require further assistance please contact us by sending email to
    [email protected].
    cisco AIR-LAP1142N-A-K9    (PowerPC405ex) processor (revision B0) with 98294K/32768K bytes of memory.
    Processor board ID
    PowerPC405ex CPU at 586Mhz, revision number 0x147E
    Last reset from power-on
    LWAPP image version 3.0.51.0
    1 Gigabit Ethernet interface
    32K bytes of flash-simulated non-volatile configuration memory.
    Base ethernet MAC Address:
    Part Number                          :
    PCA Assembly Number                  :
    PCA Revision Number                  : A0
    PCB Serial Number                    :
    Top Assembly Part Number             :
    Top Assembly Serial Number           :
    Top Revision Number                  : A0
    Product/Model Number                 : AIR-LAP1142N-A-K9
    Configuration register is 0xF

  • Wlst obiee restart .py script errors when cmd line; ok if type cmds

    I pulled the scripts that are posted at http://obiee101.blogspot.com/2011/08/obiee-wlst-useful-scripts.html to automate some admin tasks. I downloaded and installed the zip version of wl s106_dev on my desktop. When I start wlst from command line and type commands they work just fine. When I try to run them from the cmd line as "java weblogic.WLST RestartOBI.py" I get error message shown below...???
    Thanks
    ------------script start---------------------
    connect('weblogic','welcome1','t3://obi5.mnapps.state.mn.us:7101',adminServerName='AdminServer');
    print 'Connecting to Domain ...'
    try:
    domainCustom()
    except:
    print 'Already in domainCustom'
    cd('..\..')
    print 'Go to biee admin domain'
    cd('oracle.biee.admin')
    print 'Go to coreapplication_obips1 Mbean'
    cd('oracle.biee.admin:oracleInstance=EPM91TD,type=BIDomain.BIInstanceDeployment.BIComponent,biInstance=coreapplication,process=coreapplication_obis1,group=Service')
    ------------script end---------------------
    ---works fine if it start wlst and type commands
    when runing "java weblogic.WLST RestartOBI.py"
    -----------------------------output from command line execution--------------------------
    Welcome to WebLogic Server Administration Scripting Shell
    Type help() for help on available commands
    Error: No domain or domain template has been read.
    Connecting to Domain ...
    You will need to be connected to a running server to execute this command
    Go to biee admin domain
    Error: No domain or domain template has been read.
    Go to coreapplication_obips1 Mbean
    Thanks

    Finally found a solution: removing the import of the wlstModule and calling the wlst commands directly works.
    When using the wlstModule, I was in the wrong namespace, where there was no theInterpreter.

Maybe you are looking for