Modify SoapAction and Endpoint dynamically

I am currently using ESB 10.1.3.4. I have set up a routing service and a routing rule to a soap service. I am invoking the routing service from an oracle database using the utl_http package. The routing service is invoked correctly, the message gets routed to the soap service and the soap service is successfully invoked. The issue I am running in to is that the soap service is being invoked anonymously and now I need to append information to the endpoint (pass parameter to the endpoint) to identify the sending node. I am looking for the best way to accomplish this requirement. I could manually edit the wsdl document prior to creating the soap service but this is not very flexible at all. It appears after reading the following document that I could use xpath:
http://www.oracle.com/technology/products/integration/esb/files/esb-presentation-headers.pdf
I have two basic questions:
1. If i wanted to select the existing endpoint location from the soap header how would I do that? I have not found a good description of the format and in the esb you can only see the payload. For instance on slide 20 of the link above it says you can select the location using the following xpath:
(‘/shdr:ESBHeader/shdr:location’)
If I cannot see the full message how would I have known to use that particular xpath?
2. If I use xpath can I just set the headers in the stylesheet like so:
<xsl:variable name="LocationIn" select="'http://localhost:7777/esb'" />
<xsl:variable name="LocationOut"
select="ehdr:setOutboundHeader('/shdr:ESBHeader/shdr:location',
$LocationIn, 'shdr=http://xmlns.oracle.com/esb;')"/>
Or do I also have to make sure I select the payload and insert it is as well? If I have to select the payload in the stylesheet is there a convenient variable to do so?
Thank you in advance,
Ryan L. Roy

I was able to make this work by using the following stylesheet:
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0"
xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:ehdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.esb.server.headers.ESBHeaderFunctions"
xmlns:ns0="http://www.w3.org/2001/XMLSchema"
xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://oracle.com/esb/namespaces/Maximo_Inbound"
xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
xmlns:xref="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ora="http://schemas.oracle.com/xpath/extension"
xmlns:wsp="http://schemas.xmlsoap.org/ws/2002/12/policy"
xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
xmlns:ns1="chelanpud.org"
exclude-result-prefixes="xsl ns0 tns plnk wsdl soap wsp ns1 bpws ehdr hwf xp20 xref ora ids orcl">
<xsl:variable name="LocationIn"
select="'http://myPsServer:81/PSIGW/PeopleSoftServiceListeningConnector/FSCMDEV?From=ESB'"/>
<xsl:variable name="LocationOut"
select="ehdr:setOutboundHeader('/shdr:ESBHeader/shdr:location', $LocationIn, 'shdr=http://xmlns.oracle.com/esb;')"/>
<xsl:template match="node()|@*">
<xsl:copy><xsl:apply-templates select="node()|@*"/></xsl:copy>
</xsl:template>
</xsl:stylesheet>
I dynamically set the location header using the example found at the link below:
http://www.oracle.com/technology/products/integration/esb/files/esb-presentation-headers.pdf
I was then able to use the xsl:copy construct to send the original payload onto the destination web service. One thing of interest that I did do was remove the xmlns:inp1="" entry from the list as well as removing it from the exclude-result-prefixes list. It appeared that when it was there that namespace would be added to each element which was not the behavior that I desired.

Similar Messages

  • Setting an endpoint dynamically for a business service

    I need to set an endpoint for a business service dynamically in the message flow of a proxy service. I'm basically doing what it says in this article(page 9 under heading - Registry per Individual Domain):
    http://e-docs.bea.com/alsb/docs26/pdf/deploybestprac.pdf
    I've gone to the link to the User guide that it gives in there for "Using Dynamic Routing". And I've pieced together most of what I need to do. I have a dummy business service with a dummy URL. I'm making a service callout and getting and endpoint back and saving that endpoint address to a variable. (that's all in a stage in a pipeline node.) Then I dynamically route it to dummy business service. The part I don't know how/where to do is reassign the dummy business service's endpoint to the endpoint I got back from my service callout.
    Can anyone help me with this?
    Thanks,
    Brittany

    Try with a 'Dynamic publish to service' action with:
    <ctx:route isProxy="false">
    <ctx:service>{ $yourBusinessService }</ctx:service>
    </ctx:route>
    where $yourBusinessService is the variable hosting the uri of your business service.
    Regards
    ferp

  • Service Registry: why do i need two bindings (wsdlDeployment and endPoint)

    based on the technical note of Clemens Utschig "Enabling a Dynamic, Reusable SOA with Oracle BPEL Process Manager and Oracle Service Registry" i have one question:
    why do i need two bindings (wsdlDeployment and endPoint) in my service in the service registry. if i only define the wsdlDeployment if get this messages:
    <2006-12-07 09:39:02,559> <FATAL> <default.collaxa.cube.ws> no endpoint found - nothing to adjust
    <2006-12-07 09:39:02,559> <WARN> <default.collaxa.cube.ws> Could not lookup base endpoint!
    the problem of defining two bindings is that the url to my partner is redundant.

    Hi Clemens,
    The UDDI Version 3.0.2 Specification (http://www.uddi.org/pubs/uddi_v3.htm) say this:
    B.1.2 Using the "wsdlDeployment" value
    Instead of directly providing the network address in the accessPoint, it is occasionally useful or necessary to provide this information through indirect means. One common scenario for such a behavior is when the accessPoint is embedded within a WSDL file. In such a scenario, the UDDI accessPoint contains the address of the WSDL file, and the client then must retrieve the WSDL file and extract the end point address from the WSDL file itself.
    In this case, decorating the UDDI accessPoint with a useType="wsdlDeployment" is appropriate. A sample of such behavior is as follows:
    <bindingTemplate bindingKey="uddi:example.org:catalog">
       <description xml:lang="en">
           Browse catalog Web service
       </description>
       <accessPoint useType="wsdlDeployment">
           http://www.example.org/CatalogWebService/catalog.wsdl
       </accessPoint>
       <categoryBag>
           <keyedReference keyName="uddi-org:types:wsdl"
           keyValue="wsdlDeployment"
           tModelKey="uddi:uddi.org:categorization:types"/>
       </categoryBag>
    </bindingTemplate>In the example above, a client would be able to parse the result of the bindingTemplate and determine the end point of the Web service within the WSDL file discovered in the accessPoint element. Note that the bindingTemplate has also been categorized with the "wsdlDeployment" value from the uddi.org:categorization:types scheme so that it can be discovered through a find_binding API call.
    1) This means for me that providing one binding with useType=wsdlDeployment should be enough.
    2) Sadly the "Business Service Control" of the Service Registry (Publish new WSDL service) does not create the correct structure needed by the bpel-engine. The "Publish new WSDL service" wizard just creates one service with one binding with useType=other (http). So if i want to reuse this published service from bpel (as a service consumer) i have to switch to the "Service Registry Admin Control" and create a second binding with useType=wsdlDeployment. But i don't want the developers to get inside the "Service Registry Admin Control"! They should only work with the "Business Service Control".
    All this makes the usage of the service-registry very unhandy and reduce the acceptance for developers because of unnecessary manual steps and broken security principles.
    My wish for this issue is that the "Publish new WSDL service" inside the "Business Service Control" of the Service Registry would additionlly create this needed binding with useType=wsdlDeployment.
    Best Regards,
    Harald Reinmueller

  • [svn:bz-trunk] 19782: Add Remoting test application and endpoints for testing login-after-disconnect channel setting .

    Revision: 19782
    Revision: 19782
    Author:   [email protected]
    Date:     2011-01-17 11:21:11 -0800 (Mon, 17 Jan 2011)
    Log Message:
    Add Remoting test application and endpoints for testing login-after-disconnect channel setting.
    Modified Paths:
        blazeds/trunk/qa/apps/qa-manual/WEB-INF/flex/remoting-config.mods.xml
        blazeds/trunk/qa/apps/qa-manual/WEB-INF/flex/services-config.mods.xml
    Added Paths:
        blazeds/trunk/qa/apps/qa-manual/remoting/
        blazeds/trunk/qa/apps/qa-manual/remoting/RemotingApp.mxml

    I appreciate Adobe teams efforts to reproduce the issue and acknowledged it as a  Bug in AIR
    But now I am waiting on them to come back with an answer -  Is it going to be fixed in future versions? Is there a work around?
    Is adobe even considering this as an Issue? What are the next steps after acknowleding the issue?
    I hope I am not too aggressive but I also want Adobe to understand the urgency of the situation when it comes to a product release.
    I have experimented with couple of work arounds but none seem to work.
    If anyone has come across this issue please comment.
    Thanks,

  • Difference between modify , append and update

    Hi,
          Give me diffference between modify , append and update?
           If possible give me with example.
    Thanks & regards
    venkravi

    Hi,
    Syntax Diagram
    MODIFY itab
    Syntax
    MODIFY { itab_line | itab_lines }.
    Effect
    This statement changes the content of one or several itab_line or itab_lines lines that can be specified using the table key or the table index.
    System fields
    sy-subrc Meaning
    0 At least one line was changed.
    4 No lines were changed, since no suitable line was found for the insertion using the table key, or the specified index was greater than the current number of lines for the insertion using the table index.
    Note
    Apart from using the MODIFY statement, the content of an individual table line can be changed using assignments to field symbols and dereferenced data references that point to the table line.
    Exceptions
    Non-Catchable Exceptions
    Cause: Illegal dynamic specification of a line component
    Runtime Error: ITAB_ILLEGAL_COMPONENT
    Cause: Illegal key component in the TRANSPORTING list.
    Runtime Error: ITAB_ILLEGAL_TRANSP_COMP
    Syntax Diagram
    APPEND
    Syntax
    APPEND line_spec TO itab [SORTED BY comp] [result].
    Addition:
    ... SORTED BY comp
    Effect
    This statement appends one or more rows line_spec to an internal index table itab. If itab is a standard table, you can use SORTED BY to sort the table in a specified way. Use result when appending a single row as of release 6.10 to set a reference to the appended row in the form of a field symbol or a data reference.
    For the individual table types, appending is done as follows:
    To standard tables, rows are appended directly and without checking the content of the internal table.
    To sorted tables, rows are appended only if they correspond to the sort sequence and do not create duplicate entries with unique table key. Otherwise, an untreatable exception is triggered.
    To hashed tables, no rows can be appended.
    The APPEND statement sets sy-tabix to the table index of the last appended row.
    Addition
    ... SORTED BY comp
    Effect
    This addition is allowed only if you specify a workarea wa and if you use a standard table, where wa must be compatible to the row type of the table. You can specify component comp as shown in section Specifying Components, however, you can access only one single component and no attributes of classes using the object component selector.
    The statement is executed in two steps:
    Starting at the last row, the table is searched for a row, in which the value of component comp is greater than or equal to the value of component comp of wa. If such a row exists, the workarea wa is included after this row. If no such row exists, the workarea wa is included before the first row. The table index of all rows following the included rows increases by one.
    If the number of rows before the statement is executed is greater than or equal to the number specified in the definition of the internal table in the INITIAL SIZE addition, the newly-created last row is deleted.
    Note
    When using only the statement APPEND with addition SORTED BY to fill an internal table, this rule results in an internal table that contains no more than the number of rows specified in its definition after INITIAL SIZE and that is sorted in descending order by component comp (ranking).
    The SORT statement should usually be used instead of APPEND SORTED BY.
    Example
    Creating a ranking of the three flights of a connection showing the most free seats.
    PARAMETERS: p_carrid TYPE sflight-carrid,
                p_connid TYPE sflight-connid.
    DATA: BEGIN OF seats,
            fldate TYPE sflight-fldate,
            seatsocc TYPE sflight-seatsocc,
            seatsmax TYPE sflight-seatsmax,
            seatsfree TYPE sflight-seatsocc,
          END OF seats.
    DATA seats_tab LIKE STANDARD TABLE OF seats
                   INITIAL SIZE 3.
    SELECT fldate seatsocc seatsmax
           FROM sflight
           INTO seats
           WHERE carrid = p_carrid AND
                 connid = p_connid.
      seats-seatsfree = seats-seatsmax - seats-seatsocc.
      APPEND seats TO seats_tab SORTED BY seatsfree.
    ENDSELECT.
    Exceptions
    Non-Catchable Exceptions
    Cause: Including a row with identical key (target table defined with UNIQUE)
    Runtime Error: ITAB_DUPLICATE_KEY_IDX_OP
    Cause: Violation of the sorting sequence due to an APPEND to a sorted table
    Runtime Error: ITAB_ILLEGAL_SORT_ORDER:
    Cause: Unallowed index value (<= 0) for a FROM, TO, or INDEX specification
    Runtime Error: TABLE_INVALID_INDEX
    Syntax Diagram
    UPDATE dbtab
    Syntax
    UPDATE target source.
    Effect:
    The statement UPDATE changes the content of one or more lines of the database table specified in target. The entries in source determine which columns of which lines are changed, and how they are changed.
    System fields
    The statement UPDATE sets the values of the system fields sy-subrc and sy-dbcnt.
    sy-subrc Meaning
    0 At least one line has been changed.
    4 At least one line was not able to be changed, either because no appropriate line was found, or because the change would generate a line that leads to double entries in the primary key or a unique secondary index in the database table.
    The statement UPDATE sets sy-dbcnt to the number of changed lines.
    Note
    The changes are definitively copied to the database with the next database commit. Until that point, they can still be undone using a database rollback
    The statement UPDATE sets a database lock up to the next database commit or rollback, which may lead to a deadlock if used incorrectly.
    For the specific database, the number of rows that can be changed within a database LUW in the database table is restricted by the fact that a database system can only manage a certain amount of data in the rollback area and from locks.

  • EDGE and HTML dynamic text in a "box" with scroll bar

    I'm new to EDGE, a win7pro master collection cs5.5 suite owner. I'm mainly in the Film/Video post production field (mostly AE, PPro, Pshop, IA) but have been branching into web design the last couple of years.  I use Dreamweaver, Fireworks, Flash. While I'm a expert user with all the Film/video apps, I would say I only have intermediate ability with the web apps. While I understand a lot of programing logic bulding blocks I'm not a coder.
    So since we're told "flash is dead",  my interest in Edge is to try to do some of the things that I can currently do in flash in  EDGE. I was excited when Edge first came out but lost interest when it became obvious that Adobe was not going to offer Edge and Muse to "suite owners" but only in their force feeding of the "Cloud". Better known as the "golden goose" for adobe stockholders and a never ending perpetual hole in the pocket for users. Anyway....
    I spent the last couple of days doing some of the tuts and messing with the UI. It's matured a lot since I was here last.
    I've been working on a flash site for a sports team where one of the pages is a player profile page where college recuriters and other interested parties can view recuriting relavent info/stats about players. This is how it works. While on the "Team" page a users clicks on  a button labled "Player Profiles" . (Animation) A "page" flies in and unfurls from the upper right corner (3d page flips effect created in AE played by flash as a frame SEQ). Once it lands filling most of the center of the screen there is a bright flash. As the brightness fades we see the "page" is a bordered box with a BG image of a ball field(End). (Animation) from behind the border in fly small pictures (player head shots with name and jersey number). They stream in and form a circle like a wagon train and the team logo zooms up from infinity to the center of the circle(End). As the user mouses over a player's pic it zooms up a little and gets brighter (like mouseover image nav thumbs for a image slider). If the user clicks on a player's head shot it flips over and scales up to become a text box with a scrollbar. The content of the box is a mix of images, static and dynamic text fields populated from data in an "player info data base" XML file, and some hyperlinks. It's all kept updated dynamicaly with current stats, info and images from the XML file. There is also a "PDF" button that allows the user to open/save/print a PDF of the player's profile (the PDF's are static files for now but the choice of which pdf to retrive is dynamicaly supplied via the XML file.
    So.... Is Edge now able to do something like this?  Would it need to be a collection of small animations? could these be "assembled" and connected as an asset in dreamweaver ?
    I thought I would approach this from the end (ie click on an image and display a box with dynamic TEXT fileds. ) since that is the most important part, ie displaying the dynamicaly updated profile info.  Sooooo....
    Can Edge display a scrolling text box with Images, static text, and html dynamic text in it??
    Joel

    The code is in composition ready. Click the filled {}

  • Excel and Word dynamic VIs broken

    I upgraded from Labview 8.5.1 to 8.6 and tried to upgrade the microsoft office report generation toolkit at the same time but got an error as I am using office 2000 (not compatible with the new toolkit).  Now, I can add the word and excel dynamic VIs to a project and add them to an application build but when I try to build the exe I get an error saying the word and excel VIs are broken.  Looking at the Excel VI shows an error "SubVI 'NI_Excel.lvclass:Excel_Get_Properties.vi': required input 'report in' is not wired".  The Word VI gives three similar errors.  Is there a known problem or workaround for this?

    Hi zeppelin_79,
    Can you provide me with the screenshots of the error?
    From my experience, Common error came up when we upgrade the Microsoft Office versions. Since, different version of Microsoft Office might have different attributes that being access by the Report Generation Toolkit for Microsoft Office.
    In the meantime, try to do what this article recommended:
    Broken Run Arrow When Using Excel Get Data VI in My Application
    http://digital.ni.com/public.nsf/allkb/77D87AC905ECE51386256DE50077D6C0?OpenDocument
    Let me know if the problems are still persist.
    Sincerely,
    Krisna Wisnu
    Message Edited by Krisna Wisnu on 10-07-2008 03:09 AM
    Message Edited by Krisna Wisnu on 10-07-2008 03:10 AM
    Sincerely,
    Krisna Wisnu

  • How to get last modified date and time of a file which is in apache server.

    Hi ,
    I need to get last modified date and time of a file in remote machine.
    This file is in remote machine which has apache server installed.
    I am trying to get this information by connecting to apache server from client by giving absolute URI of the file to file object.
    URI is got from apache server URL by using toURI method.
    when I use lastModified method , its throwing exception , because scheme of URI is not file.
    I can't give scheme as file because ftp server is not installed on that server
    Is there any other way to get this information .

    No, unless you can use an FTP client.

  • Deployment error when modifying measures and my heirarchy

    I am working on Lesson 3 on analysis services tutorial where i am modifying measures and my heirarchy
    and this is my error message.
    Warning 1 Dimension [Date] : Avoid visible attribute hierarchies for attributes used as levels in user-defined hierarchies. 0 0
    Warning 2 Dimension [Customer] : Avoid visible attribute hierarchies for attributes used as levels in user-defined hierarchies. 0 0
    Warning 3 Dimension [Product] : Avoid visible attribute hierarchies for attributes used as levels in user-defined hierarchies. 0 0
    Warning 4 Dimension [Product] : Define attribute relationships as 'Rigid' where appropriate. 0 0
    Warning 5 Errors in the OLAP storage engine: A duplicate attribute key has been found when processing: Table: 'dbo_DimDate', Column: 'CalendarQuarter', Value: '4'. The attribute is 'Calendar Quarter'. 0 0
    Error 6 Internal error: The operation terminated unsuccessfully. 0 0
    Error 7 Server: The current operation was cancelled because another operation in the transaction failed. 0 0
    What can i do to fix this?

    Hi Cook959,
    In your scenario, it seems that the issue was related to the error message.
    Errors in the OLAP storage engine: A duplicate attribute key has been found when processing: Table: 'dbo_DimDate', Column: 'CalendarQuarter', Value: '4'. The attribute is 'Calendar Quarter'. 0 0
    There are many reasons that can cause this issue, here are some blogs which list the reasons and explanation, please refer to the links below to see the details.
    http://ms-olap.blogspot.com/2009/11/duplicate-attribute-key-has-been-found.html
    http://blog.oraylis.de/2013/08/a-duplicate-attribute-key-has-been-found-during-processing-revisited/
    Hope this helps.
    Regards, 
    Charlie Liao
    TechNet Community Support

  • How to change the master page and theme dynamically in sharepoint2013 anonymous site

    hi
    I have to change the master page and theme dynamically in sharepoint2013 anonymous site. i have to show one master page to authenticated user  another master page to anonymous user through code
    Srinivas

    Hi Srinivas,
    According to your description, my understanding is that you want to change the master page and theme dynamically based on the anonymous users or authenticated users.
    Per my knowledge, there is not an OOB way to change the master page and theme dynamically.
    SharePoint is based on Asp.net, as we know Asp.Net request processing is based on pipeline model, so we can delevlop a custom HttpModule to dynamic change the master page based on current logon user profile(using SP Object Model to get).
    Another solution could be to use the SecurityTrimmed control that injects the CSS depending on global user permissions, more information, please refer to
    it.
    Some similar posts for your reference:
    http://social.msdn.microsoft.com/Forums/office/en-US/c2b2d0da-c752-4aea-9c2d-e31a5b1a2988/sharepoint-2010-dynamic-masterpage-based-on-userprofile-property
    http://johanleino.wordpress.com/2011/10/20/using-a-different-master-page-for-authenticated-users-in-sharepoint/
    http://sharepoint.stackexchange.com/questions/21679/how-can-we-use-a-different-masterpage-for-annoymous-and-authenticated-users
    http://sivarajan.me/post/How-to-customize-the-SharePoint-2013-Master-Page-for-Anonymous-Users
    Best Regards,
    Wendy
    Wendy Li
    TechNet Community Support

  • I am trying to organize thousands of images in aperture.  The dates on the old scanned images is all 2008, when I started importing them.  When I change the date in aperture some of them hold the modified date and some revert to 2008.  Any ideas?

    I am trying to organize thousands of old images in aperture.  Aperture dates them all in 2008, when I started this project.  When I change the date in aperture some of them hold the modified date and some revert to 2008.  Any ideas?

      I just tried a test library, re-imported fresh images from a hard drive, and the date changes still revert.
    So neither your external drive nor your Aperture library are to blame.
    What do you mean test in a different user acct?  Would it be a good idea to uninstall and re-download aperture 3?
    Appreciate all your help.
    I meant the trouble shooting procedure described here:  Isolating an issue by using another user account
    To test, if some settings in your user account are faulty or preferences files corrupted, it helps to create a new user account from the "Users&Groups" System preferences. With a brand new user account you can see, if something in your current account is causing this.
    Should you see, that Aperture is not even working from a new and clean account, I'd reinstall Aperture, and if need be the Operating system.  Are you using any plug-ins?

  • How to pass tag name and value dynamically in the output of PCo notification?

    Hi,
    I have a requirement to develop such a scenario where there can be multiple no of tags in PCo (Say 10) but there will be single notification to push the tag name when the value got changed and the changed value to MII. for any value change for any of the tag, the notification will be trigger. So As per my knowledge I have to pass the tag name and value dynamically in the "output" tab of the notification. But need your support to find out how to pass them dynamically.
    Thanks in advance.
    Regards,
    Suman

    Hi Suman/Jeedesh,
    As per Pco notification, it will trigger whenever any of the tag value changes in Agent instance subscription items.
    For above issue, My suggestion
    1. Create DB table name TAGLIST with 200 tags as rows in columns (Tagname, TagValue)
    2. Based on notification trigger, create a transaction and update values w.r.t TagNames in above table
    3. Next time, when notification trigger with fresh value for any of the tag, cross check with existing TagName with Value and update in DB table.
    4. And in the mean time, send those Tag details vie mail trigger or as per requirement
    Instead of creating 200 notification, above is a just alternate way suggestion to achieve dynamic tag value change notification.
    Hope it might solve your problem
    Regards,
    Praveen Reddy

  • Get File by modified date and extension then copy to location

    Hello,
    Ill give a brief description of what I am trying to accomplish. We have a bunch of files that are sitting on a deduplication box (Exagrid), we want to try and copy certain files off of this dedup box, however, if we copy EVERYTHING this will fill up our
    entire NAS Device. So, instead, I need to build a script that finds files by a modified date and extension type, then copy those to a specified folder. 
    Here is the code:
    $logfile = "C:\CopyResults.log"
    function LogWrite{
    Param([string]$logstring)
    Add-Content $logfile -Value $logstring
    $date = get-date
    $DateToCompare = (Get-Date).AddDays(-2)
    $Files = Get-ChildItem -Recurse | Where-Object {$_.LastWriteTime -gt $DateToCompare} | Where-Object {$_.Extension -eq ".xlsx"}
    foreach($File in $Files){
    Write-Host "$File was copied to C:\test"
    Copy-Item $File C:\test
    logWrite "$File was copied to c:\test --- $date"
    The file extension is of course just a test, as well as the destination of where these files are to be copied to. Ultimately I would like to build in the functionality that will check the date and delete the files after a certain amount of time has passed and
    then copy new files. For now, though, I would be satisfied with just some insight on my own idea and know where I am going wrong or how to clean this up a little better. The overall issue I having is when I run this portion of the script I get this: Copy-Item
    : Cannot find path 'C:\Users\<username>\<filename>.xlsx' because it does not exist.
    At line:13 char:5
    +     Copy-Item $File C:\test
    +     ~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (C:\Users\<usern...al filename>.xlsx:String) [Copy-Item], ItemNotFoundException
        + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.CopyItemCommand

    I solved the issue. Here is the full script:
    net use \\netpath\filename /user:<Username> <Password>
    $logfile = "C:\CopyResults.log"
    function LogWrite{
    Param([string]$logstring)
    Add-Content $logfile -Value $logstring
    $date = get-date
    $DateToCompare = (Get-Date).AddDays(-1)
    $VBMs = Get-ChildItem \\netpath\filename -Recurse | Where-Object {$_.LastWriteTime -gt $DateToCompare} | Where-Object {$_.Extension -eq ".vbm"}
    $VBKs = Get-ChildItem \\netpath\filename -Recurse | Where-Object {$_.LastWriteTime -gt $DateToCompare} | Where-Object {$_.Extension -eq ".vbk"}
    $VIBs = Get-ChildItem \\netpath\filename -Recurse | Where-Object {$_.LastWriteTime -gt $DateToCompare} | Where-Object {$_.Extension -eq ".vib"}
    foreach($VBM in $VBMs){
    Write-Host "$VBM was copied to C:\test"
    Copy-Item $VBM.FullName \\netpath\filename
    logWrite "$VBM was copied to c:\test --- $date"
    foreach($VBK in $VBKs){
    Write-Host "$VBK was copied to C:\test"
    Copy-Item $VBK.FullName \\netpath\filename
    logWrite "$VBK was copied to c:\test --- $date"
    foreach($VIB in $VIBs){
    Write-Host "$VIB was copied to C:\test"
    Copy-Item $VIB.FullName \\netpath\filename
    logWrite "$VIB was copied to c:\test --- $date"
    "In this case you are handing a System.IO.FileSystemInfo.FileInfo object to the Copy-Item cmdlet. I think the cmdlet is probably defaulting to using the .Name property and that is not enough information for the copy to work. When you explicitly give the
    .FullName property to the cmdlet, it now has the information that it needs."
    I found this on Stack Overflow buried in the forums and it resolved all my issues. I have tried using that tool and it works very well, however, Powershell is what I am using for everything and I would like to keep it that way.
    Thank you all for your time and help.

  • GetHttpRequestData missing "If-Modified-Since" and "If-None-Match"

    I'm using CF8 on IIS6/Win2003 Server.
    In my cfm I have:
    <cfset reqheaders=GetHttpRequestData().headers>
    <cfdump var="#reqheaders#">
    ...which gives:
    struct
    Accept
    text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Charset
    ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Accept-Encoding
    gzip,deflate
    Accept-Language
    en-us,en;q=0.5
    Cache-Control
    max-age=0
    Connection
    keep-alive
    Cookie
    CFID=[removed]; CFTOKEN=[removed]
    Host
    [my test server]
    Keep-Alive
    300
    User-Agent
    Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3
    But if I look at the actual headers being sent from my browser (using Firefox LiveHTTP add-on), it shows I am sending "If-Modified-Since" and "If-None-Match" headers.
    GET /path/to/cfmfile.cfm HTTP/1.1
    Host: [removed]
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Language: en-us,en;q=0.5
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 300
    Connection: keep-alive
    Cookie: CFID=[removed]; CFTOKEN=[removed];
    If-Modified-Since: Fri, 18 Sep 2009 01:18:19 GMT
    If-None-Match: ""0134E50193C69AD753656B0513FCB28C""
    Cache-Control: max-age=0
    Is there some reason IIS would "steal" those headers before handing over control to ColdFusion?  Or does GetHttpRequestData sometimes "miss" headers?  Other ideas?  Is there any other way I can get at the raw HTTP request from within ColdFusion?
    I'm at a loss.  Others have used the same process and no one seems to have this issue.
    (see: http://www.petefreitag.com/item/235.cfm or http://admin.mxblogspace.journurl.com/?mode=article&entry=1853 for examples)
    I've tried accessing the page using Internet Explorer instead.  It also is not showing those headers, but I have not sniffed IE's actual headers being sent so I can't be sure those headers are included (but I think they are, since IE implements conditional GET).

    Found out the answer.  IIS 6 does in fact steal "If-Modified-Since" and "If-None-Match" headers, but only on custom 404 redirects.  That's actually what I'm doing here (that'll teach me not to put details in a question when I think they're irrelevant -- actually I just forgot).
    Here's two discussions on the issue (they're using ASP, but apparently it's the same for ColdFusion):
    http://www.eggheadcafe.com/conversation.aspx?messageid=32839787&threadid=32839787
    http://www.webmasterworld.com/microsoft_asp_net/3935439.htm

  • Remove Recently Modified text and links

    I am new to CSS.  Here are the instructions I am using to remove recently modified text and links below it:
    Type in the CSS code below in red into Notepad without the quotes. Save the file.
    “<style> .s4-recentchanges{ DISPLAY:none; } </style>”
    Upload to file to your SharePoint site. Copy the link of the file.
    Go to Edit mode of the page where you want the “Recently Modified” link to disappear.
    Add a Content Editor webpart (under Media and Content) on the page.
    Edit the webpart.
    In the Content Link box, paste the URL you copied in 2) above.
    Under Chrome Type, select None.
    Click OK.
    I created the file but am not sure where do I upload the file (site assets, etc).  This should have an .css extension. Does this webpart go at the top or bottom of the page.
    d.bell

     Open master page through SPD. Goto code view. then under “head ” tag put the following css:
    <style type="text/css"> 
    .s4-recentchanges 
    display:none; 
    </style> 
    Link will not show now in  page
    Whenever you see a reply and if you think is helpful, click "Vote As Helpful"! And whenever you see a reply being an answer to the question of the thread, click "Mark As Answer

Maybe you are looking for