Make changes to the source using ANT (ojdeploy) files

Hello

Assume that you have an application that uses a Web Service data control. The URL of the WSDL file will be hard coded in the connections.xml (indicated by DataControls.dcx). But of course, during the deployment in a different environment (from dev, in tst, in ACC, in production), this hard-coded URL will be replaced by the corresponding environmental WSDL document. My idea was to solve this problem using Ant.

I have already created a build.xml Ant file that uses ojdeploy to build the project as an EAR file. This is the code in build.xml generated to make the deployment:
<target name="deploy" description="Deploy JDeveloper profiles" depends="init">
   <taskdef name="ojdeploy"
                 classname="oracle.jdeveloper.deploy.ant.OJDeployAntTask"
                 uri="oraclelib:OJDeployAntTask"
                 classpath="${oracle.jdeveloper.ant.library}"/>
   <ora:ojdeploy xmlns:ora="oraclelib:OJDeployAntTask"
                  executable="${oracle.jdeveloper.ojdeploy.path}"
                  ora:buildscript="${oracle.jdeveloper.deploy.dir}/ojdeploy-build.xml"
                  ora:statuslog="${oracle.jdeveloper.deploy.dir}/ojdeploy-statuslog.xml">
      <ora:deploy>
         <ora:parameter name="workspace"
                                  value="${oracle.jdeveloper.workspace.path}"/>
         <ora:parameter name="project"
                                 value="${oracle.jdeveloper.project.name}"/>
         <ora:parameter name="profile"
                                  value="${oracle.jdeveloper.deploy.profile.name}"/>
         <ora:parameter name="nocompile" value="false"/>
         <ora:parameter name="outputfile"
                                  value="${oracle.jdeveloper.deploy.outputfile}"/>
      </ora:deploy>
   </ora:ojdeploy>
</target>
How can I edit the build.xml file to adjust the URL to the WSDL for the Web Service (for example in DataControls.dcx) before you deploy the code on an EAR file?

For example, if the DataControls.dcx has the following entry after having created the control data:
<definition xmlns="http://xmlns.oracle.com/adfm/adapter/webservice"
                  name="MyWebServiceDC" version="1.0"
                  provider="oracle.adfinternal.model.adapter.webservice.provider.soap.SOAPProvider"
                  wsdl="http://dev_server:7001/soa-infra/services/default/MyWebService/Dummy_ep?WSDL">
   <service name="Dummy_ep"
                 namespace="http://xmlns.oracle.com/MyWebServiceOutput/MyWebService/Dummy"
                 connection="MyWebServiceDC">
      <port name="execute_pt">
         <operation name="execute"/>
      </port>
   </service>
</definition>
Then I would be able to edit this file for:
<definition xmlns="http://xmlns.oracle.com/adfm/adapter/webservice"
                  name="MyWebServiceDC" version="1.0"
                  provider="oracle.adfinternal.model.adapter.webservice.provider.soap.SOAPProvider"
                  wsdl="http://dev_server:7001/soa-infra/services/default/MyWebService/Dummy_ep?WSDL">
   <service name="Dummy_ep"
                 namespace="http://xmlns.oracle.com/MyWebServiceOutput/MyWebService/Dummy"
                 connection="@connection@">
      <port name="execute_pt">
         <operation name="execute"/>
      </port>
   </service>
</definition>
where @connection @ is an Ant token, which can be replaced by the Ant in the relevant environment. For example, MyWebServiceDC_dev, MyWebServiceDC_tst, MyWebServiceDC_prd etc.

The same issue if you use a Web Service Proxy: the URL of the Web Service is hard coded into the generated Java files, so I would like to change the location of this URL using ANT instead of having to do it by hand.

Is this possible?

Thanks in advance!

Chris,

Yes, there is no real way to do this automatically. Usually, what I do is to keep a copy of the shadow of these files in a separate Directory. Any time one of the files changes, I have a copy in the shadow directory and either do one of two things:

(1) replace all values specific to the environment with chips
(2) create specific versions to the environment of the files with the appropriate values.

Then, in the ANT script, you can do this:

(a) copy the original files somewhere safe (temp directory).
(b) copy the tokenised files or specific to the environment to the correct location
(c) use on the tokenised file if it was your approach
(d).
(e) deliver the original files.

This is a hack, but that's life.

John

Tags: Java

Similar Questions

  • Windows 7 does not recognize me as an administrator and do not make changes to the notifier of explicit congestion using cmd

    Windows 7 does not recognize me as an administrator and do not make changes to the notifier of explicit congestion using cmd

    I am the administrator also have an account invited and created another user account to see if this helped (she didn't)

    Hello

    If you use the command prompt, you must bring up the command prompt.

    Go in Start / All Programs / Accessories.

    Click on the command prompt and select run as administrator .

    Concerning

  • Directory issues active with SBS 2008. Cannot use NTDSUTIL or management tools or make changes to the DNS.

    In July 2010, I've migrated a SBS2003 system to a system of SBS2008. There were a few hiccups along the way, but eventually everything worked very well and the original server was demoted and closes.

    Fast forward to today, June 2013, and now that I see errors in the event log that read:

    «This server is the owner of the following FSMO role, but considers that it not invalid.»

    "This directory server has not recently received replication of a number of directory servers."

    And when you run NTDSUTIL I can't join the domain controller by name or the domain name. I always get the following error message:
    "Error DsBindWithSpnExW 0x6ba (the RPC server is unavailable".

    I have read and tried all the imaginable solutions I could find. However, the difference between my situation and all the other scenarios that I have met is that there is usually another available domain controller. This isn't my case.

    Here is my configuration:

    1 - SBS 2008 Server.

    7 - workstations running Windows 7 Professional

    I can't run Active Directory users and computers, Active Directory and approvals, or make changes in the DNS. However, DNS is working and my domain controller points to itself as a single domain controller and resolves the name to the IP address.

    That I could track down, it's the original domain controller does not correctly downshift and there is always a ton of references to it in Active Directory, but I can't run any tools to remove the reference and seize the roles.

    Is there someone out there who can help you?

    Thanks in advance for your suggestions

    I would recommend posting your query in the TechNet Forums. This forum is dedicated for windows servers... We'll find a solution much more effective here...

    http://social.technet.Microsoft.com/forums/en-us/category/WindowsServer

  • make changes to the PDF format

    How can I make changes to a PDF using Pages or Word document?

    You can't do that.

    You must use another tool to achieve this.  Such a tool is PDFPen.

    https://smilesoftware.com/PDFpen-family

    You can use a copy of the trial, but he let an advertisement on everything you print.

    (I have no financial interest in PDFPen.  I am a customer of theirs.)

  • Unable to make changes to the registry.

    Original title: The status bar notification

    I used to be able to go to regedit, theoretically/local settings, current version, and then in the notification bar and remove previous workflow icon and another thing after the cache then go to Explorer and delete, but now I can not do this way somehow.

    I already know how this hide them

    Hello

    Thanks for posting your query on the Microsoft Community.

    According to the description of the problem, you cannot make changes in the registry, that you were able to do before. The question might be if there is a file system corruption or corruption of the registry settings. Then, I suggest you to try the steps below and see if it helps.

    Method 1

    There could be a chance that there is a file system corruption. So, I suggest you run SFC scan and see if it makes a difference.

    The file system check is a utility built into the operating system that will check for the corruption of system files. The sfc/scannow command. (System File Check) analyzes the integrity of all protected operating system files and replaces incorrect versions, damaged, altered, or damaged with correct versions where possible.

    How to use the System File Checker tool to fix the system files missing or corrupted on Windows Vista or Windows 7.

    • Go to Start, click all programs and open the Accessories.
    • Right-click on command prompt in the list programs, and then select run as administrator. If you are prompted for an administrator password or for confirmation, type your password, or click OK.
    • In the command prompt, type the following command and press ENTER:

    sfc/scannow

    For more information, refer to this link:

    http://support.Microsoft.com/kb/929833/en-us

    Method 2

    If the problem persists, then there might be a corruption of the registry settings so, I suggest you to check the steps in the below mentioned thread and see if it helps you to solve the problem.

    Access denied - owner and/or setting permissions on the registry key

    Registry warning : This section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base:

    You can use the following link to back up and restore the registry in Windows: http://support.microsoft.com/kb/322756/

    Hope it would help. If problem persists always post back with the current state of your computer and the result of the proposed suggestion, we will be happy to help you.

    Kind regards

  • Allow the child to "make changes to the computer.

    How can I allow the user of my child to "Make changes to the computer" as facilities, make her an administrator, or lose its other parental controls?

    I am using Windows 7 Parental control with none of the additional controls. I want to be able to install its programs without asking me to enter my password every 10 minutes.

    How can I allow the user of my child to "Make changes to the computer" as facilities, make her an administrator, or lose its other parental controls?

    I am using Windows 7 Parental control with none of the additional controls. I want to be able to install its programs without asking me to enter my password every 10 minutes.

    You can not. Windows 7 accounts either have administrator privileges, or they do not. There's nothing in between.

  • How and in which files that I can combine my computer policy in the html for my captivate project file? I know that I need to make changes on the css, HTML, and I need to add fonts to a folder, but do not know where please help

    How and in which files that I can combine my computer policy in the html for my captivate project file? I know that I need to make changes on the css, HTML, and I need to add fonts to a folder, but do not know where please help

    https://forums.Adobe.com/servlet/JiveServlet/showImage/2-7496573-757050/pastedImage_0.PNG

    This is an image of the files I see

    If the police will not be on the end user's computer, it won't make a difference.

    You should try to include a web font, but you cannot use those during the creation of course, so when you publish or correct fonts you have alignment issues.

  • When a snapshot is complete, so I can start to make changes to the virtual machine?

    When I take a snapshot in merge, a progress bar appears in the window of virtual computer, then disappears in a few seconds.

    But a picture of a clock also appears on the Fusion icon in the dock. Only the clock takes a minute or two to disappear.

    What process is the clock?  What is the take a complete snapshot?  When the progress bar disappears, or when the clock disappears?

    Can I safely begin to make changes to the virtual machine, I want to be able to restore, immediately after the progress bar disappears?

    Or, it is more prudent to wait to make changes until the clock disappears?

    Thank you

    (The progress bar and the clock appear in my Fusion 3 that I use always happy... I don't know what appears in more recent versions).

    While the stopwatch turns, Fusion is busy writing the snapshot to disk, so the performance of your comments and your host could be reduced.

    As long as the performance isn't an obstacle, you can continue to use the virtual machine while the snapshot is taken.  Merger will ensure that the snapshot includes the exact state of the virtual machine at the moment, you started the snapshot: nothing of what you are doing inside the guest, while the snapshot is in progress does not affect the State of the socket.

    See you soon,.

    --

    Darius

  • I can't make changes to the settings of Firefox - none of this works

    As usual, when I allow an update firefox Win Desktop, more things gets sacked. God I wish there was an alternative to that shit from ff!

    I can't make changes to the settings of Firefox - none of this works

    It was theme Aeon 7.5 - this is obviously totally redesigned the appearance of the settings options and caused my mouse does not work.

    Thanks for your help - and I'm sorry for the insults.

  • Windows Vista CD problems - "Windows cannot read the disc in the drive E:\. Make sure that the disc uses a firmat Windows recognizes.

    Original title: problems of Windows Vista CD

    Windows Vista Home premium. You want to burn on a CD - RW disc image files. Inserted the disc in the drive and got the message "Windows is unable to read the disc in the drive E:\. Make sure that the disc uses a firmat Windows recognizes. If the drive is not formatted, you must format it before you use it. "I can't get a dialog to come so that I could format. Not had this problem with a disc previous out of the box Memorex even.

    My problem has been resolved by the www.mydigitallife.info/autoplayautorun-not-working-or-missing-not-open-in-windows-vista/ procedure. The first element - material Detection service kernel - managed.

  • How can I save information on a cd - rw and be able to make changes to the documents instead of read-only

    I'm trying to save the information from my laptop to a CDRW. But it wont let me make changes, says that this is a read-only.

    Hi GracieGritton,

    It is not possible to make changes on the data stored in the CD. You must copy the data to the laptop, and then make the necessary changes. You can also make the changes before saving the data to a CD.

  • I need my permission to make changes to the network folder

    Hello

    I met a few weird problem on network
    I was provided with security reading group, write permissions on one of the network folder, now, whenever an attempt to read the file is fine, but when I would write or create any folder, it says, "you require permission to 'domainane\myid' to make changes to the file, now, what to do?

    It of permission to my self, I'm already, log on to the domain, but still,

    below things, I did up to now
    1 deleted my self by system admin security group and added again.
    2 done GPupdate, restart my PC with the boot,
    3 - tried it on different PC

    Still no change, can anyone help?

    Thank you

    Hello

    Since the network folder is on a computer in the domain, the question you posted would be better suited for the IT Pro TechNet public. I would recommend posting your query in the TechNet Forums to get help:

    Windows 7 networking TechNet Forums

    Let us know if you need help with Windows related issues. We will be happy to help you.

  • Restrict user access to make changes to the form of assignment


    Dear friends,

    I'm in the need to create a diagnostic error-> client code-> customize that whenever the user attempts to make changes in the field «Job», which should an error such as "you are not allowed" and does not save. Please please help me... a friend in need is a friend indeed . Thank you

    Kind regards

    Adeel Anwer

    Hello Adeel,

    Realize you your condition do the following,

    Go to diagnostics--> CustomerID--> customize

    Sequence number: 1
    Description: JOB FIELD DISABLE

    Level: Fuction

    In the status tab:

    Triggering event: ONCE - NEW - ITEM - INSTANCE

    Trigger object: ASSGT. JOB_NAME

    Condition: leave it blank

    Processing mode: both


    In the Actions tab:


    sequence: 1

    Type: property

    Description: Disable the field of employment

    Object type: agenda

    Target the object: ASSGT. JOB_NAME

    Property name: ALTERABLE_PLUS

    Value: FALSE

    sequence: 2

    Type: Message

    Description: Error Message

    Message type: error

    Text of the message: you are not allowed. Contact the person in charge.

    Go to tools-> validate all the, then save.

    now check and let me know whether it works or not. All the best

    Thank you best regards &,.

    Knockaert

  • Get information for clip loaded in the source using ExtendScript monitor

    Hello

    So, the short version: I was wondering if there is a way to get information about the clip currently loaded in the source, using ExtendScript monitor. Specifically, I am interested in the name, from timecode and in/out points. I don't see anything obvious in the ExtendScript Toolkit data browser, but I thought I'd ask.

    The long version of what I'm trying to do: I have a clip in the source monitor Panel that I know is in the active sequence. I would take the points of entry/exit from the source element and those like entry/exit points in the sequence. It's kind of a hack to get around the fact that you can't associate speech analysis with a multicam clip so I cut with one of the audio clips in the multicam clip and then I am translating those points to the multicam editing sequence. I have a way to do it with an AppleScript macro, but I would find a more robust solution (and cross-platform).

    Thank you!

    There is no possibility of returning to an element of the Source monitor to real projectItem in Agency CC 2015.

    However, you are not the first to ask such a feature, and (ahem) I can neither confirm nor deny that it can be added in the near future.

  • Hello, I recently created a website for a client. I also created a brochure with a QR code that automatically redirects visitors to a single page in the site. Well, I had to make changes to the site and I had to change the name of the page in which t

    Hello, I recently created a website for a client. I also created a brochure with a QR code that automatically redirects visitors to a single page in the site. Well, I had to make changes to the site and I had to change the name of the page in which the QR code pointing to. Is it possible to keep the current name of the page but create a page of automatic redirect named like the QR code? Basically, the brochures have all been printed already, so I need the QR code when analyzed in order to continue working. Now, it is not the case.

    Nevermind, I figured it. I've reproduced the page, renamed the QR that indicates the code of the page, and then he hid in the menu of page properties.

Maybe you are looking for