How to use/read a property in a WSDL file?

Hello list,
Does anybody know how to use a property (e.g. myapp.host.name) in a WSDL file to dynamically switch between a certain host through the use of a property file?
My property file would look like this:
myapp.host.name=<some-ip-address-or-dns>
myapp.host.port=1234
I would save this property file as myapp.properties.
In a WSDL file that I receive from a 3rd-party I want to remove the hardcoded hostname and replace it with my property. For instance, something like this:
<port binding="tns:DoSomething" name="DoSomething">
    <soap address location="http://abcdks02:1234/avb_xsd/start.edw?MySource=WebService></soap:address>
</port>{code}
should be replaced by this:
{code}<port binding="tns:DoSomething" name="DoSomething">
    <soap address location="http://${myapp.host.name}:${myapp.host.port}/avb_xsd/start.edw?MySource=WebService></soap:address>
</port>Is there a fast, efficient and clean way to do this? I do not want to use maven2 filtering, because that forces a new re-deployment every time you change the value of the property. I also want to avoid Spring, because we're trying to get rid of Spring in our project.
What else can I use? I am sure there is a fast and efficient way to do this.
Any help is appreciated!
Thanks,
Gian

Hi biblio,
I have used the method you have mentioned to change the target end point. And that was successful. Thank you. Apart from this I have another issue. I want my web service read some database related values from properties file only when the web service is deployed. Currently the java application read the database related values in a static block. I have made this java application to a web service. I am new to java and thought of there may be something like ServletContextListener where I can read properties file. This allows me to read properties file only when the web application is deployed.

Similar Messages

  • How to use runtime.exe to activate the native file coping commands

    How to use runtime.exe to activate the native file coping commands.(It might include using process(), and such.. but how?

    Why would you want to do this? It's harder than copying the file in Java (by reading the file and writing it to a new file) and you'll need to write new code each time you want to port your code to a new OS.

  • How do i read complete line from a text file in j2me?????

    how do i read complete line from a text file in j2me????? I wanna read file line by line not char by char..Even i tried with readUTF of datainputstream to read word by word but i got UTFDataFormatException.. Please solve my problem.. Thanks in advance..

    That is not my problem . i already read it char by char.. i am getting complete line..But this process is taking to much time..So thats why i directly wanna read complete line or word to save time..

  • How the client stub is generated from the wsdl file ?

    I want to know how the client stub is generated from the wsdl file ?
    how the client accesses the methods in the wsdl fie ?
    thanks alot .

    there are several ways to generate the stubs from a wsdl.
    if you're using jax-ws, there is a netbeans tutorial creating web services. you found this on http://www.netbeans.org/kb/trails/web.html.
    if you're using axis as your framework, i think this would be a nice introduction of it. link : http://www.eli.sdsu.edu/courses/spring03/cs683/notes/AXIS/AXIS.html#Heading4

  • How to use viewslifetime managed property to get the list of sites which are least accessed?

    Hi,<o:p></o:p>
    I am trying to get the subsites of a site collection which are least accessed. I am using ViewsLifeTime managed property in a content search web part with a condition like this:
    ViewsLifeTime < 0
    OR
    ViewsLifeTime = 0.
    However, It is not giving any results. I even tried with ViewsLifeTime < 10. I have some subsites which are accessed less than 10 times. I came to know this when I saw the value of ViewsLifeTime
    property.
    Can anyone suggest how to add a condition on ViewsLifeTime property?
    Thanks in advance.

    Hi Mohan,
    Here is a thread with similar issue for your reference:
    http://social.technet.microsoft.com/Forums/en-US/770f100d-eadb-45d1-9305-15f11cf9038d/ctxcurrentitemviewslifetime-is-showing-null?forum=sharepointsearch 
    If you would like to get site usage report in SharePoint 2013, there is OOTB feature for you to view popular trends report for a site, you could refer to the link below:
    http://blogs.technet.com/b/tothesharepoint/archive/2014/01/28/view-and-configure-usage-analytics-reports-in-sharepoint-server-2013.aspx
    In addition, custom script for usage report for SharePoint sites might be more helpful to your requirement to know access times:
    http://blog.falchionconsulting.com/index.php/tag/audit/
    Regards,
    Rebecca Tu
    TechNet Community Support

  • How to use quick link property in the km navigation iview

    Hi all
    I have requirement.
    T structured lables
    one on top and rest 12 at the bottem in 3 columns, 4 rows.
    when i click the lable it should connect to a  respective folder in the KM
    this entire page have to be connected to a folder link...ie when i click this folder link this page with T structured lables have to come and when i click each lable respective folders should open...
    so for that i have created  one KM Document iview(this is like heading in the page) and 12 KM Navigation iviews(pointing to  respective folders)
    after that which layout will be suitable for this in page layout???
    if i add all iviews into a  one single page
    how to connect lables to folder???
    one of my friend have suggested to use '"quicklink'" property along with html page...???
    how to use it ???
    so pls do help me???
    my dead line is by today evening i.e 2.12.08
    pl do reply me as soon as posible
    thanks and regards
    Gayathri vuthukota

    hi Nikhil
    cau u explain me in detail please.
    I have done with HTML page and attached to Km document iview.and i have my 12 Km navigation i views.
    Then create static Links on HTML page to navigate to other iviews. It can be created by using the Insert link in Km tool of the html editor available in Km. For opening a url iview from a link you can write this for executing the 'donavigate method' to open the iview you needed.???
    what is EPCF client eventing???
    thanksn regards
    Gayathri

  • How to use Reader in non-interactive persistent mode to convert PDFs?

    How to use Adobe Acrobat Reader in non-interactive and persistent mode to convert PDFs to PostScript (or even better, bitmapped image files) ?
    At present, I'm using
        acroread -toPostScript  indir/*pdf outdir/
    to convert a set of PDFs to PostScript (the platform is Solaris on Sparc).
    These PDFs arrive at varying rates at arbitrary intervals and I'd like to avoid the overhead of startup of the acroread process and loading of the fonts etc. I would like the acroread process to become persistent and that it should convert the PDFs either as and when they become available or on demand (ie upon receipt of some signal or message).
    In the words, the usage is similar to that used by web browsers, which is effectively a client of the rendering service provided by the Adobe Acrobat Reader running in the background.
    The only difference is that I need the output in a file (or set of files), either bitmap or PostScript.
    Any help / pointers on how to do this would be greatly appreciated.
    Thanks and best regards.

    Hello,
    As I understand, you would like to setup a watch folder which will be getting pdf files in arbitrary intervals. You then want each pdf to be converted to ps in a separate folder.
    You could achieve this with the help of a script by polling for pdf files present in the watch folder. When you find pdf files, convert them to ps, save the ps file in another folder and then move the pdf to another folder.
    In any case, once the process of conversion of pdf to ps is over, acroread will quit.
    There is no way to keep the acroread process running in background and convert pdfs as and when they are available.
    Please let me know if this answers your query.
    Regards,
    Rishi

  • How to use session cookie property of System object?

    Hi all,
    I have searched all over the SDN but didnt get anything relevent so here i am posting my query...
    My scenario is as follows:
    I have created a KM document iview that launches an HTML page, on click of button of HTML page a VC iview is launched. On this iview i have a button that hits BI query.
    PS: A system object is created for the connectivity bet portal and backend BI server.
    PS: i have configured SSO between portal and backend.
    Now when i click on button on iview that fetches the data from backend, i am asked for authentication pop-up, although i have configured SSO why i am asked to enter UID and PWD again??
    In system object there is a property named
    <b>"session cookie = MYSAPSSO2"</b>
    So should i use this property so that cookie will get transfered from one session to other session when i click button on iview??
    If yes then HOW??
    Is there any other setting remained in Visual Admin?? or Backend or portal?
    What could be the missing??
    PS: User id are same on portal & backend.
    Any help will be highly appreciated...
    Regards,
    Ameya
    Thanks in advance
    Message was edited by:
            Ameya Pimpalgaonkar
    null
    Message was edited by:
            Ameya Pimpalgaonkar

    Hi Ameya,
    I do not know the exact answer.However you should look for something called JSESSION ID.
    Have a look at the thread:
    Re: Problems Using Application Integrator for BSP Application
    Reg SSO Logon Tickets and Browser sessions
    How to use jsessionid while making HTTP calls??
    Hope you find something which can help you.
    Regards
    Atul Shrivastava

  • How to use read() method in JEditorPane

    Hai,
    I not quite understand how to use the "read(InputStream in, Object desc)" method in JEditorPane, especially the "Object desc" argument. What should I put there? Can anyone give me an examples?
    Thank you and sorry for the trouble.

    The second parameter could be an HTMLDocument. If you
    just pass null, then it takes the default as Text
    document.
    Cheers~ Thank idreesmd :)

  • How to use Read table with out key fields

    Hi Experts,
    I need to retrieve the 2 internal tables data into single table.
    I have 3 common fields between the 2 tables but I don't have the Key fields. Then how to use the read table in this.
    Thanks in Advance.
    Edited by: satish4abap on Mar 10, 2010 9:39 AM

    Hi Satish,
    Key fields are nothing but the common fields with which you can pick the data from the second internal table.
    If you can paste your Internal table fields then we will be able to assit you better.
    However, in genral scenarios you can use it as below :
    In this scenario, we are putting data from 3 internal table to another single internal table.
    LOOP AT T_PRGEN INTO WA_PRGEN.
           WA_FINAL-GUID_PR       = WA_PRGEN-GUID_PR.
           WA_FINAL-ATTR20A       = WA_PRGEN-ATTR20A.
           WA_FINAL-ATTR05A       = WA_PRGEN-ATTR05A.
           WA_FINAL-ATTR05B       = WA_PRGEN-ATTR05B.
           WA_FINAL-ATTR05C       = WA_PRGEN-ATTR05C. " + DG1K902190
           WA_FINAL-ATTR10A       = WA_PRGEN-ATTR10A.
        READ TABLE T_V_TCAV201 INTO WA_V_TCAV201 WITH KEY ATTRV20 = WA_PRGEN-ATTR20A BINARY SEARCH.
        IF SY-SUBRC = 0.
          WA_FINAL-TEXT1   = WA_V_TCAV201-TEXT1.    "SUBID-TEXT1
        ENDIF.
        READ TABLE T_PNTPR INTO WA_PNTPR WITH KEY GUID_PR = WA_PRGEN-GUID_PR BINARY SEARCH.
        IF SY-SUBRC = 0.
           WA_FINAL-PRVSY  = WA_PNTPR-PRVSY.   "PROD NO
           WA_FINAL-GRVSY  = WA_PNTPR-GRVSY.   "LOGICAL SYS GROUP
        ENDIF.
      append wa_final to t_final.
    endloop.

  • How to use read text for VF03 for a particular header text ID...

    Hello Experts,
    How do we read the text from a given text ID? in my speccs, it says that I need to get the text from
    a given text ID for invoices(VF03).
    Thank you guys and take care!

    i am not at system right now, but I guess object is VBBK. you can do SE16 on STXH, put name as your invoiuce#, iD as your text id, object as VBBK and see if it returns the row. if not leave object as blank and see hwat does it return for object for the given key

  • How to use the same element in different photoshop files?

    It occurs to me often that I use the same element in different photoshop files, a header or footer shown in the example below. So when the footer changes in one document, I need to change this footer in every other single document.
    Is there a possibility to use some kind of template, one single document,  that can be placed in different files , which is still editable afterwards?
    Thanks in advance.
    I'm using Photoshop CS6

    In a single document you can have several pages and these pages may have headers and footers that share smart objects.  If you replace the contents of the an embedded smart object on one page page that is shared on an other page the pages you will see both pages contents are changed. For they share the common object.   It is also possibly to have independent smart object layers. It depends how you create the layers in the single document.
    Example one sharing a smart object hi-light a smart object layer and use menu layer>Duplicate Layer... This will create a second smart object layer that share a common smart object. Each layer has is own associated transform. Do it again and you will have three layers the share a common smart object. So you can use each layer associated transform to position and size the layers contents. Make a picture package for example. When you hi-light any of the three smart layers and you use menu Layer>Smart Objects>Replace Contents... all three layers contents will be replace with the new smart object.  Care must be taken to replace the smart object with an identical size object for only the object is replaced the three associated transform for the three layers are not replaced or changed.
    Example two independent smart objects  hi-light a smart object layer and use menu layer>Smart Objects>New Smart Object via Copy.  This will  create a second smart object layer that has it own embedded smart object copy.  Do it again and you will have three all have independent embedded smart object that are identical.  However they do not have to remain identical.  For example if the first smart object layer was created by using ACR to open a RAW file as a smart object layer the embedded object is a copy of the raw file and its associated RAW conversion settings.  Double clicking on one of the smart object layers and you will see ACR open on its embedded RAW file with the embedded RAW conversion setting.  Changing these settings will update the layer smart object content with new ACR setting and pixel when you click OK in ACR. Repeat for the third and you will find you have three different raw conversions in Photoshop you can mask and blend together to bring out detail.
    I think what your missing is that a smart object contains a copy of the original object.  Changing the original after creating a smart object layer in document will not effect the smart object layer at all. Its independant from the original having a copy of the original. Only changes to the smart object layer and its embedded smart object effect smart object layers.

  • JNI - how to use java access function in TypeLibrary( .tlb file) HELP ME PL

    Hey All
    I got one project which can be done by calling up functions in xxxx.tlb
    (window type library) file, that is no problem.
    How to use java to access those functions???
    I know there are some classes which can be used to access function in
    DLL file e.g. JAWIN.
    Is the .tlb file related to one DLL file??? if so, how to locate the
    DLL file through .tlb file???
    Thanks a lot.
    Steve

    Use JNI to create a link between Java class and a DLL, then you can load that DLL (or TLB) from that class.
    Read the JNI Tutorials.

  • How to use Conditional statements in SQL Loader control file

    Hi,
    I am using sql loader to load a flat file to the table. I am using control file for this purpose as show below:
    LOAD
    INTO TABLE store_shrink
    TRUNCATE
    FIELDS TERMINATED BY "     "
    TRAILING NULLCOLS
    SITE_ID char,
    ST_SHRINK char,
    ST_REVENUE char,
    SHRINK_PR char ":ST_SHRINK/:ST_REVENUE"
    My question is this. If in the flat file the value of 'ST_REVENUE' is '0', then I want 'SHRINK_PR' to be '0' as well, and skip the calculation (:st_shrink/:st_revenue).
    How to achieve this with the conditional statement or using any Oracle function?
    Any help or suggestion is greatly appreciated.
    Thanks in advance.

    Hi there,
    I tried the following in my above query and it doesn't work somehow. Anyone has an idea? I have been on internet throughout but to no avail. Please help:
    LOAD
    INTO TABLE store_shrink
    TRUNCATE
    FIELDS TERMINATED BY "     "
    TRAILING NULLCOLS
    SITE_ID char,
    ST_SHRINK char,
    ST_REVENUE char,
    SHRINK_PR char "case (when :st_revenue<>'0.00' then :SHRINK_PR=:ST_SHRINK/:ST_REVENUE else :SHRINK_PR='0.00') end"
    )

  • How to use Swing html to parse a html file..

    I am currently working on a project in java.i need to read a Html file, extract the table tag along with its contents if it has a button embedded in it and replace it with another code..
    i tried it with Reg Ex in java but in vain.. Any help is great... I need an idea of how to use Html parser for this prob.. any examples will be fine..

    Run the program from command line, this way you will see the errors, if any.
    example.: java -jar theJarfile.jar
    I was successful in creating a comm application. I placed the win32com.dll in the same directory of my application jar file and all worked.
    I also extracted the comm.jar , and jar'd my app with the extracted comm files to make one jar.
    I also had a fileWriter() to get the clients jre path and my app would write the javax.properties file to the correct place.
    It took me severel weeks and late nights to accomplish this, but it was all necessary to be able to install only my app, and not a bunch of api's that were needed.

Maybe you are looking for

  • Please solve this mysterious broken run arrow

    Everything works great for a while. Then suddenly, this will happen. This is on a PXI chassis using a lot of LVOOP. It happened on my PC so I moved the code all to a VM. It worked fine for a while, then it just came back. These are NI's VIs. The weir

  • Error when connecting XLSX file

    Hi, I have a xlsx file which made 8Mo with 7 sheets. Each of this sheeet is a report with EPM addin connection - to BFC or BPC cube. When i try to create a request in webI based on this file, i have an error with this code : IES 10872 : Impossible d'

  • Why is my WAR file still referencing data from the old database server?

    OK I will outline the steps: 1. I downloaded a perfectly functioning WAR fIle 2. Uncompressed it 3. Changed the database settings in the Database.properties file 4. Made it a WAR file again 5. Imported it in Eclipse IDE using File -> Import 6. Ran a

  • Ipod lost and no serial number

    i lost my ipod and i dont have any of the serial numbers with me ive tried alomst everything

  • ALV  Grid downloading problem

    Hi expert,   I got problem while downloading ALV GRID ouput to any local file.  The  output contains two records.  but while downloading  no records will be downloaded. only field headings are downloaded.  What is the problem. Pls help me to do. Than