Oracle Service Bus 10.3 - split join how to set header for invoked service

In Oracle Service Bus 10.3 how can I set the header for the service being invoked. We make parallel calls to 2 different business services. One of the invoked service requires header to be set and I am unable to figure out how it can be done. Below are snippet of the code and WSDL.
--- Login Operation start ---
<operation name="login">
<wsdlsoap:operation soapAction="blah"/>
<input name="loginRequest">
<wsdlsoap:body use="literal"/>
<wsdlsoap:header message="passport:loginHeader" part="hppwsHeaderElement" use="literal"/>
</input>
<output name="loginResponse">
<wsdlsoap:body use="literal"/>
</output>
<fault name="genericFaultException">
<wsdlsoap:fault name="genericFaultException" use="literal"/>
</fault>
</operation>
--- Login Operation end ---
--- hppwsHeader Element --
<complexType name="hppwsHeaderElement">
<sequence>
<element maxOccurs="1" minOccurs="0" name="version" type="tns1:version"/>
<element maxOccurs="1" minOccurs="0" name="tx-id" type="tns1:tx-id"/>
<element maxOccurs="1" minOccurs="1" name="systemLangCode" type="xsd:string"/>
</sequence>
</complexType>
--- LoginRequest Element ---
<xs:element name="loginRequestElement" type="s0:loginRequestType"/>
<xs:complexType name="loginRequestType">
<xs:sequence>
<xs:element name="userId" minOccurs="1" maxOccurs="1" type="xs:string"/>
<xs:element name="password" minOccurs="1" maxOccurs="1" type="xs:string"/>
</xs:sequence>
</xs:complexType>
--- LoginResponse Element ---
<xs:element name="loginResponseElement" type="s0:loginResultType"/>
<xs:complexType name="loginResultType">
<xs:sequence>
<xs:element name="sessionToken" minOccurs="1" maxOccurs="1" type="xs:string"/>
</xs:sequence>
</xs:complexType>
In Oracle Workshop for WebLogic when I create a split-join .flow file while adding the invoke service call to login operation I am prompted to create the loginRequest and loginResponse variables. I can assign the appropriate expression to loginRequest.loginRequestElement prior to making the invoke call but then the backend business call fails because "systemLangCode" is not defined and set. Actual fault is
<ns1:genericFault xmlns:ns1="http://hppcbl.globalops.company.com/webservice">
<systemLangCode>en</systemLangCode>
<fault>
<ruleNumber>589</ruleNumber>
<fieldName>systemLangCode</fieldName>
<code>field.empty</code>
<desc>System language code is required.</desc>
<ftype>2</ftype>
</fault>
</ns1:genericFault>
I would really appreciate if someone could guide me on how to resolve this
Regards,
-Nilay

There is this $header variable which you should populate before calling the BS. What is the type of BS? If it is WSDL BS , Any Soap BS then above solution will work. I assume that yours is WSDL based BS and setting $header should resolve this issue.
AnyXML and Messaging type BS services requires that you create proper pay load (setting $header will not work).
There is also other actions Set Transport Headers {outbound request/inbound response} which can be used to set transport related headers but not soap headers.
Manoj

Similar Messages

  • How to set DISPLAY for tomcat service inorder to run reports using rwrun.sh

    Here is my problem..
    I came to know that its not possible to invoke rwrun.sh without setting the DISPLAY environment variable from the servlet or any java program. But some one proposed me a solution that to set the DISPLAY variable for TOMCAT service from where my servlet invokes the shell script written for report generation using rwrun.sh. The user for tomcat service is wwwrun ..
    Do i need to set this variable in the logon script for this user ..but I couldn't find the .profile file for that.
    Is there any way to set this variable for tomcat service and get the report successfully.

    i gave export DISPLAY=aatsv001.local:0.0 in $ORACLE_HOME/bin/reports.sh
    but it gives me the following error when i invoke the report
    Xlib: connection to "aatsv001.local:0.0" refused by server
    Xlib: No protocol specified
    REP-0069: Internal error
    REP-3000: Internal error starting Oracle Toolkit.
    I also tried giving localhost and also aatsv001 (without .local)
    some one help me..

  • How to set aspects for "storeContent" service operation

    Hi,<br />I'm using LiveCycle ES 8.2 and I want to set the aspects from a service parameter. So I switched the property "Aspects List" to "variable" and selected a service input parameter (with data type "list") as an input variable. In this list I want to specify all aspects, which has to be assigned to a document.<br />Invoking this Webservice causes an "Not serializable"-Error.<br /><br />The question is how I have to specify the aspect list in the input parameter so that the "storeContent" service is understanding it correctly?<br /><br />Until now the input parameter in the Java client, which is invoking the web service is from type "ArrayList<String>", but this doesn't work.<br /><br />Thanks

    Hi,<br />I'm using LiveCycle ES 8.2 and I want to set the aspects from a service parameter. So I switched the property "Aspects List" to "variable" and selected a service input parameter (with data type "list") as an input variable. In this list I want to specify all aspects, which has to be assigned to a document.<br />Invoking this Webservice causes an "Not serializable"-Error.<br /><br />The question is how I have to specify the aspect list in the input parameter so that the "storeContent" service is understanding it correctly?<br /><br />Until now the input parameter in the Java client, which is invoking the web service is from type "ArrayList<String>", but this doesn't work.<br /><br />Thanks

  • Split-Join, unable to set SOAP:HEADER in OSB at Invoke Service Component.

    Hi Experts,
        i created a Split-join for parallel processing and invoke third party services, but this service requires some mandatory elements in soap:header like WS-Addressing and, WSA-TO and some security infomation, but i don't know  how to pass header in invoke service step. Please help me to setup Header for Invoke services in split join.
    Please help me to resolve this issue.
    Thanks
    Ankit

    see this :https://forums.oracle.com/thread/951618
    not the most fancy way, but you can create some sort of  wrapper proxyservice in front of your business service to make it work

  • HOW TO SET DELETION FLAG TO SERVICE ENTRY SHEET ?

    Dear Experts,
    Can anybody explain how to set deletion flag to Service entry sheet created ?
    Service Entry sheet has been accepted and saved, i want to set deletion flag to the Service Entry sheet.
    Thanks in Advance

    Hi,
    Go to ML85 and give your service entry sheet no in Entry sheet data and select "cancel release" check box and give the corresponding release code and execute and save. The release gets cancelled.
    The other way is go to ML81N and give your Po and service entry sheet and click on the icon "cancel release" (reverse arrow mark) give the corresponding release code for cancellation and save. Now the service entry sheet will go to "No acceptance" mode. again go to the change mode and select the line item and delete it by clicking on delete icon.
    regards,
    Kannaiah Naidu

  • How to activate trace for web services

    Hi Experts,
    How to activate trace for web services in SOAMANAGER.
    We are not able to view the Payload trace of the error logs.
    Can anyone please let me know how to go about this???
    Regards,
    Ashwini

    Hi Ashwini,
    The thread below might be useful to you:
    [SOAMANAGER - Get the XML generated;
    Regards, Trevor

  • How to generate client for GetFile service of Webcenter Content Management.

    How to generate client for GetFile service of Webcenter Content Management.
    Downloaded file : GetFile.wsdl
    <?xml version="1.0" encoding="utf-8" ?>
    - <definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="http://www.stellent.com/GetFile/" targetNamespace="http://www.stellent.com/GetFile/" xmlns="http://schemas.xmlsoap.org/wsdl/">
    - <types>
    - <s:schema elementFormDefault="qualified" targetNamespace="http://www.stellent.com/GetFile/">
    - <s:element name="GetFileByID">
    - <s:complexType>
    - <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="dID" type="s:int" />
    <s:element minOccurs="0" maxOccurs="1" name="rendition" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="extraProps" type="s0:IdcPropertyList" />
    </s:sequence>
    </s:complexType>
    </s:element>
    - <s:element name="GetFileByIDResponse">
    - <s:complexType>
    - <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="GetFileByIDResult" type="s0:GetFileByIDResult" />
    </s:sequence>
    </s:complexType>
    </s:element>
    - <s:complexType name="GetFileByIDResult">
    - <s:sequence>
    <s:element minOccurs="0" maxOccurs="unbounded" name="FileInfo" type="s0:FileInfo" />
    <s:element minOccurs="0" maxOccurs="1" name="downloadFile" type="s0:IdcFile" />
    <s:element minOccurs="0" maxOccurs="1" name="StatusInfo" type="s0:StatusInfo" />
    </s:sequence>
    </s:complexType>
    - <s:element name="GetFileByName">
    - <s:complexType>
    - <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="dDocName" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="revisionSelectionMethod" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="rendition" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="extraProps" type="s0:IdcPropertyList" />
    </s:sequence>
    </s:complexType>
    </s:element>
    - <s:element name="GetFileByNameResponse">
    - <s:complexType>
    - <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="GetFileByNameResult" type="s0:GetFileByNameResult" />
    </s:sequence>
    </s:complexType>
    </s:element>
    - <s:complexType name="GetFileByNameResult">
    - <s:sequence>
    <s:element minOccurs="0" maxOccurs="unbounded" name="FileInfo" type="s0:FileInfo" />
    <s:element minOccurs="0" maxOccurs="1" name="downloadFile" type="s0:IdcFile" />
    <s:element minOccurs="0" maxOccurs="1" name="StatusInfo" type="s0:StatusInfo" />
    </s:sequence>
    </s:complexType>
    - <s:complexType name="FileInfo">
    - <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="dDocName" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="dDocTitle" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="dDocType" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="dDocAuthor" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="dSecurityGroup" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="dDocAccount" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="dID" type="s:int" />
    <s:element minOccurs="0" maxOccurs="1" name="dRevClassID" type="s:int" />
    <s:element minOccurs="0" maxOccurs="1" name="dRevisionID" type="s:int" />
    <s:element minOccurs="0" maxOccurs="1" name="dRevLabel" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="dIsCheckedOut" type="s:boolean" />
    <s:element minOccurs="0" maxOccurs="1" name="dCheckoutUser" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="dCreateDate" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="dInDate" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="dOutDate" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="dStatus" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="dReleaseState" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="dFlag1" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="dWebExtension" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="dProcessingState" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="dMessage" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="dReleaseDate" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="dRendition1" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="dRendition2" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="dIndexerState" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="dPublishType" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="dPublishState" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="dDocID" type="s:int" />
    <s:element minOccurs="0" maxOccurs="1" name="dIsPrimary" type="s:boolean" />
    <s:element minOccurs="0" maxOccurs="1" name="dIsWebFormat" type="s:boolean" />
    <s:element minOccurs="0" maxOccurs="1" name="dLocation" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="dOriginalName" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="dFormat" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="dExtension" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="dFileSize" type="s:int" />
    <s:element minOccurs="0" maxOccurs="1" name="CustomDocMetaData" type="s0:IdcPropertyList" />
    </s:sequence>
    </s:complexType>
    - <s:complexType name="StatusInfo">
    - <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="statusCode" type="s:int" />
    <s:element minOccurs="0" maxOccurs="1" name="statusMessage" type="s:string" />
    </s:sequence>
    </s:complexType>
    - <s:complexType name="IdcPropertyList">
    - <s:sequence>
    <s:element minOccurs="0" maxOccurs="unbounded" name="property" type="s0:IdcProperty" />
    </s:sequence>
    </s:complexType>
    - <s:complexType name="IdcProperty">
    - <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="name" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="value" type="s:string" />
    </s:sequence>
    </s:complexType>
    - <s:complexType name="IdcFile">
    - <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="fileName" type="s:string" />
    <s:element minOccurs="0" maxOccurs="1" name="fileContent" type="s:base64Binary" />
    </s:sequence>
    </s:complexType>
    </s:schema>
    </types>
    - <message name="GetFileByIDSoapIn">
    <part name="parameters" element="s0:GetFileByID" />
    </message>
    - <message name="GetFileByIDSoapOut">
    <part name="parameters" element="s0:GetFileByIDResponse" />
    </message>
    - <message name="GetFileByNameSoapIn">
    <part name="parameters" element="s0:GetFileByName" />
    </message>
    - <message name="GetFileByNameSoapOut">
    <part name="parameters" element="s0:GetFileByNameResponse" />
    </message>
    - <portType name="GetFileSoap">
    - <operation name="GetFileByID">
    <input message="s0:GetFileByIDSoapIn" />
    <output message="s0:GetFileByIDSoapOut" />
    </operation>
    - <operation name="GetFileByName">
    <input message="s0:GetFileByNameSoapIn" />
    <output message="s0:GetFileByNameSoapOut" />
    </operation>
    </portType>
    - <binding name="GetFileSoap" type="s0:GetFileSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
    - <operation name="GetFileByID">
    <soap:operation soapAction="http://www.stellent.com/GetFile/" style="document" />
    - <input>
    <soap:body use="literal" />
    </input>
    - <output>
    <soap:body use="literal" />
    </output>
    </operation>
    - <operation name="GetFileByName">
    <soap:operation soapAction="http://www.stellent.com/GetFile/" style="document" />
    - <input>
    <soap:body use="literal" />
    </input>
    - <output>
    <soap:body use="literal" />
    </output>
    </operation>
    </binding>
    - <service name="GetFile">
    - <port name="GetFileSoap" binding="s0:GetFileSoap">
    <soap:address location="http://localhost:7101/_dav/cs/idcplg" />
    </port>
    </service>
    </definitions>

    Hi,
    I would suggest you to check the time recording functionality, see
    details in:
    http://help.sap.com/saphelp_sm70ehp1_sp26/helpdata/en/d5/299631364d4e959
    c6609ca3bc24740/content.htm
    Another possibility is configuring the Service Level Agreement, see
    details in SDN blog:
    Service Desk: SLA configuration hints
    https://weblogs.sdn.sap.com/pub/wlg/24813
    or
    http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/24813
    Thanks
    Regards,
    Vikram

  • How to set  password for BPEL domain

    Hi,
    I am new to SOA.
    I want to setup client-server environment for few developers.
    I installed SOA 10.1.3.3 in the server machine.
    And I created few domains in BPEL, one for each developer.
    It didn't ask me to set the password while creation of the domain.
    Please let me know how to set password for newly created domain so that each developer login to his/her own domain and manage processes.
    Thanks!!!

    Thanks for the prompt response.
    What roles should I give to my developers to allow them to manage their services in ESB control, BPEL control, WSM control.
    And I would like to know how to set the password for a BPEL domain too.
    Message was edited by:
    user644377

  • How to set sourceURL for MS Access database in other computer?

    How to set sourceURL for MS Access database in other computer?
    getConnection("jdbc:odbc://www.micrsoft.com:9999/msaccess");
    How do you determine the port for the MS Access?
    Thank you very much.

    How to set sourceURL for MS Access database in other computer?You don't.
    How do you determine the port for the MS Access?You don't.
    Databases like Oracle and MS SQL Server have 'server' software which runs on a server computer. Requests talk to that server software. MS Access does not have a server, so there is nothing to talk to.
    You either must use a DSN or create you own server. For the DSN each client must have a mapped driver to the computer with the database. For your own server search the Sun site for JDBC drivers or use RmiJdbc (http://www.objectweb.org/)

  • How to set optional for table structure in functiona module

    hi experts,
    as i have small doubt regarding
    while publishing web service by using rfc where i am unable to set optional for table structure i am able to put optional for import parameters may i know how to set optional for table structure ....
    reagrds prabhanjan

    Ignoring the TABLES/CHANGING/EXPORTING argument...
    while publishing web service by using rfc where i am unable to set optional for table structure i am able to put optional for import parameters may i know how to set optional for table structure
    Why not?  There's no issue with marking a TABLES interface parameter with 'Optional' and publishing the function module or function group as a web service...

  • How to set value for radio button in sap crm survey suite

    Hi ,
    I created a survey in CRM Service, in which I added a question with answer as '10 Selection Button Group ('radio button'). And answer has 11 answer options (which means 11 radio buttions). Now when we test the survey, the value for the radio buttons is appearing like 'id_0050569b03091ee480a29d8ee61e953c'. But i want to set a specific value for each radion button (from 1 to 11). So, how to set value for radio button in sap crm survey suite???.
    Thanks & Regards,
    Seshu

    Hi,
    I found solution myself. Click on Goto -> Editing Mode -> Expert Mode. Now you can set value for radio button.
    Regards,
    Seshu

  • How to set value for selectOneChoice

    Hello,
    How to set value for selectOneChoice defined as:
    <af:selectOneChoice label="Label" id="soc1" binding="#{DepositorMergingBean.socSurnameComponent}">
    <f:selectItems id="si1" value="#{DepositorMergingBean.socSurnames}"/>
    </af:selectOneChoice>
    where socSurnames is List<SelectItem> - manually filled list of SelectItem(SomeObject, (String)text_description), so - SOC is filled manually (no binded iterators, etc..)
    Neither socSurnameComponent.setValue( new Integer(0) ) nor socSurnameComponent.setValue( socSurnames.get(0) ) do not help.
    Thanks in advance.

    this.selectOneChoice.setValue(selectItems.get(2).getValue());Try as per the following sample:
    SelectOneChoiceTest.JSPX:
    <af:form id="f1">
    <af:selectOneChoice label="Select One Choice" id="soc1"
    binding="#{SelectOneChoiceTestBean.selectOneChoice}">
    <f:selectItems value="#{SelectOneChoiceTestBean.selectItems}"
    id="si1"/>
    </af:selectOneChoice>
    <af:commandButton text="Set Selected Value" id="cb1"
    actionListener="#{SelectOneChoiceTestBean.onClick}"/>
    </af:form>
    SelectOneChoiceTestBean.java:
    import java.util.ArrayList;
    import java.util.List;
    import javax.faces.event.ActionEvent;
    import javax.faces.model.SelectItem;
    import oracle.adf.view.rich.component.rich.input.RichSelectOneChoice;
    public class SelectOneChoiceTestBean {
    private RichSelectOneChoice selectOneChoice;
    public SelectOneChoiceTestBean() {
    super();
    private List<SelectItem> selectItems;
    public void setSelectItems(List<SelectItem> selectItems) {
    this.selectItems = selectItems;
    public List<SelectItem> getSelectItems() {
    selectItems = new ArrayList<SelectItem>();
    selectItems.add(new SelectItem("One", "One"));
    selectItems.add(new SelectItem("Two", "Two"));
    selectItems.add(new SelectItem("Three", "Three"));
    return selectItems;
    public void setSelectOneChoice(RichSelectOneChoice selectOneChoice) {
    this.selectOneChoice = selectOneChoice;
    public RichSelectOneChoice getSelectOneChoice() {
    return selectOneChoice;
    public void onClick(ActionEvent actionEvent) {
    this.selectOneChoice.setValue(selectItems.get(2).getValue());
    Thanks,
    Navaneeth

  • HOW TO: set anchoredObjectSettings for .palce() object?

    Hi, I'm currently working on interesting script for GREP placing, and I'm wondering how I can set anchoredObjectSettings for .palce() object?
    for(i=0; i < found.length; i++)
        foundElem = new File (myFolder + "/" + found[i].contents);
        found[i].place(foundElem); // Placing Ancored Object
        // HERE IS WHERE I NEED SOME HELP: how to set "anchoredObjectSettings" for just placed Ancored Object
        //anchoredObjectSettings.anchoredPosition = AnchorPosition.ABOVE_LINE;
        //anchoredObjectSettings.horizontalAlignment = HorizontalAlignment.TEXT_ALIGN;
    Here you can download example files - script, InDesign file and images, that should be placed into InDesign file with script
    Dropbox - GREP placing.zip
    PS: I believe this script will be very useful, so if anybody have any ideas/suggestions, and want to help me with further development - this would be great!

    Hi Kai, this script is still under development, here is updated version attached (now it can also place files/images by file name only, without extension):
    #target indesign;
    //#include  "! Basic functions.jsx"
        GREP place files.
        This script will ask to select source folder with files to place,
        and then, with dialog box (or prompt) [this is not implemented yet, so I use static GREP value while developing]
        will ask to type GREP find expresion to search for text placeholder, that need to be replaced with file from source folder we just selected.
        TODO: Check how it works with other than image formats
            Also, this might be usefull to make anchored frame with column widh, and fit image proportionally
    scriptName = decodeURI(File(app.activeScript).name.slice(0, -4)); // detect name of current script without expression
    function Alert(msg) // function for native-looking alerts
        w = new Window ("dialog", scriptName, undefined, {closeButton: true});
        w.preferredSize = [300,75]; // window width and height
        w.margins = 15; // window margins
        w.orientation = "column";
        w.alignChildren = ["left", "top"];
        w.add("statictext", undefined, msg);
        close = w.add ("button", [0,0,96,20], "OK", {name: "Ok"});
        close.alignment = ["right", "bottom"];
        close.onClick = function(){exit();}
        w.show();
    main();
    function main()
        app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
        if(app.documents.length == 0)
            Alert("No documents are open. Please open a document and try again."); exit();
        else
            //> START OF doUndoWraper
            if (parseFloat(app.version) < 6) // "app.version < 6" if it's running under an earlier version than CS4, as earlier versions don't support "Undo" in scripts
                doUndoWrapper();
            else
                app.doScript(doUndoWrapper, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, scriptName);
            //< END OF doUnoWraper
    function doUndoWrapper() // this is the wraper function UNDO everything script made  by single undo
    {// START OF doUndoWrapper
    defaultGREPexpression = "(?i)^[a-z0-9 _-]+\\.\\w{2,4}$"; // Paragraph that starts with upper or lower case latin character, digits, spaces, hyphen or underscore, and ends with .extension
    var myFilteredFiles;
    var myExtensions = []; // initialize array
    myExtensions.push(".jpg", ".jpeg", ".png", ".gif"); // raster images
    myExtensions.push(".psd", ".tif", ".tiff", ".pdf"); // raster images (layered)
    myExtensions.push(".ai", ".eps", ".svg", ".cdr"); // vector graphics
    myExtensions.push(".mp3"); // audio files
    myExtensions.push(".mp4"); // video files
    myExtensions.push(".swf"); // flash files
    myExtensions.push(".doc", ".docx", ".rtf", ".txt"); // text documents
    myExtensions.push(".xls", ".xlsx"); // table documents 
    //Display the folder browser.
    if(app.activeDocument.saved) // our document was saved before - we suggest to start search for source folder from were InDesign file saved
        var myFolder =  Folder(app.activeDocument.filePath).selectDlg("Select the source folder with files for placing", "");
    else // file was not saved before, so we don't know where to search > suggest to start from Desktop
        var myFolder = Folder.selectDialog("Select the source folder with files for placing", "");
    if(myFolder) // if folder was selected
        //Get the path to the folder containing the files you want to place.
        var files = new Object(); // This will assoc array with FILE_NAME => FILE_EXTENSION
        if(File.fs == "Macintosh")
            myFilteredFiles = myMacOSFileFilter(myFolder);
        else
            myFilteredFiles = myWinOSFileFilter(myFolder);
        if(myFilteredFiles.length != 0) // success: we have found supported files to place
            for(i = 0; i < myFilteredFiles.length; i++)
                var filename = myFilteredFiles[i].fsName.toString().replace(/^.*[\\\/]/, ""); // now we get only file names with extenstions
                var file = [];
                file = filename.split("."); // separate file name from file extension         
                files[file[0]] = file[1]; // write FILE_NAME => FILE_EXTENSION as assoc array
        else // error: There is no supported files for placing in specified folder
            Alert("ERROR: There is no supported files for placing in specified folder.");
            exit();
    else // ERROR: we have not choose source folder
        Alert("Folder with source files was not specified"); exit();
    //Windows version of the file filter.
    function myWinOSFileFilter(myFolder)
      var myFiles = new Array;
      var myFilteredFiles = new Array;
      for(myExtensionCounter = 0; myExtensionCounter < myExtensions.length; myExtensionCounter++)
            myExtension = myExtensions[myExtensionCounter];
            myFiles = myFolder.getFiles("*"+ myExtension);
      if(myFiles.length != 0)
                for(var myFileCounter = 0; myFileCounter < myFiles.length; myFileCounter++)
      myFilteredFiles.push(myFiles[myFileCounter]);
      return myFilteredFiles;
    function myMacOSFileFilter(myFolder)
      var myFilteredFiles = myFolder.getFiles(myFileFilter);
      return myFilteredFiles;
    //Mac OS version of file filter
    //Have to provide a separate version because not all Mac OS users use file extensions and/or file extensions are sometimes hidden by the Finder.
    function myFileFilter(myFile)
        var myFileType = myFile.type;
        switch (myFileType)
            case "JPEG":
            case "EPSF":
            case "PICT":
            case "TIFF":
            case "8BPS":
            case "GIFf":
            case "PDF ":
                return true;
                break;
            default:
            for(var myCounter = 0; myCounter<myExtensions.length; myCounter++)
                var myExtension = myExtensions[myCounter];
                if(myFile.name.indexOf(myExtension)>-1)
                    return true;
                    break;
      return false;
    //> START OF GREP expression dialog
    w = new Window ("dialog", scriptName+": specify expression", undefined, {closeButton: true});
    w.preferredSize = [300,75]; // window width and height
    w.margins = 15; // window margins
    w.orientation = "column";
    w.alignChildren = ["left", "top"];
    panel = w.add("panel", undefined, "Find what: (GREP expression)");
    if(app.findGrepPreferences.findWhat != "")
        grepExpression = app.findGrepPreferences.findWhat;
        clearFindWhat = false;
    else
        grepExpression = defaultGREPexpression; // use default GREP expression
        //fgrepExpression = "\\[.+\\]"; // \\< means "begining of the world", and \\> means end of the world;
        clearFindWhat = true;
    var grepExpression = panel.add ("edittext", [0,0,270,20], grepExpression);
    grepExpression.active = true;
    panel.add("statictext", undefined, "GREP expression no need for for double \\\\ escaping");
    ok = w.add ("button", [0,0,96,20], "Continue", {name: "Ok"});
    ok.alignment = ["right", "bottom"];
    ok.onClick = function()
        findWhat = grepExpression.text; 
        w.hide();
    w.show();
    //< END OF GREP expression dialog
    if(typeof findWhat !== "undefined") // check we have not left GREP expression field empy
        app.findGrepPreferences.findWhat = findWhat; // our GREP that search for image placeholder text;
        found = app.activeDocument.findGrep();
        for(i=0; i < found.length; i++)
            if(found[i].contents.indexOf(".") > -1) // we wroking with file name with extension
                foundElem = new File (myFolder + "/" + found[i].contents);
            else // we work with file name only, so we need to add file extension manually
                found[i].contents = found[i].contents.replace(/[^a-z0-9 _-]/gi, ""); // remove all unwanted characters from file name: only letters, numbers, spcaces, minus and underscores allowed     
                foundElem = new File (myFolder + "/" + found[i].contents + "." +  files[found[i].contents]);     
          try
                placedObj = found[i].place(foundElem)[0].parent; // THANKS TO: Jump_Over for help @ https://forums.adobe.com/message/6912489#6912489
                placedObj.anchoredObjectSettings.anchoredPosition = AnchorPosition.ABOVE_LINE;
                placedObj.anchoredObjectSettings.horizontalAlignment = HorizontalAlignment.TEXT_ALIGN;
                placedObj.frameFittingOptions.autoFit = true;
                placedObj.frameFittingOptions.fittingOnEmptyFrame = EmptyFrameFittingOptions.FILL_PROPORTIONALLY;
                placedObj.frameFittingOptions.fittingAlignment = AnchorPoint.CENTER_ANCHOR;         
            catch(e)
                Alert(e);         
        app.changeGrepPreferences.changeTo = "";
        app.activeDocument.changeGrep();
        if(clearFindWhat) // clearing only if typed GREP expression manually
            app.findGrepPreferences = app.changeGrepPreferences = null; // clear Find/Change preferences once we finished
    else
        Alert("Find what GREP expression was not specified"); exit();
    }// END OF doUndoWrapper
    Top part with Windows/Mac filtering was copy-pasted from default InDeign script "ImageCatalog.jsx" as example and modified - I'm not sure if all this stuff is needed, I haven't test if it works the same without those filtering on both OS - if that's not needed - then thanks for tip!
    PS: in your findWhat \l{3,4} will not catch .ai files
    and what means .source at the end? is that doing necessary escaping, so with it it's posible to write \l instead of \\l

  • How to set View for Completed items inside Tasks?

    How to set button for 'View' and see Completed items or not completed inside Tasks?

    Hi,
    You want to set custom views for Tasks folder so that when we click a view button, it will show all Completed or incomplete tasks, am I correct?
    Which version of Outlook are you using? There are existing views for completed/incomplete tasks in Outlook. In Outlook 2010 and Outlook 2013, we can find the buttons under View tab > Change View. Click Completed button to view all completed
    tasks; Click Active button to view incomplete tasks.
    In Outlook 2007, just click View > Current View to switch between different views.
    If I've misunderstood something, please feel free to let me know.
    Regards,
    Steve Fan
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to set password for every application

    Hi,
    As a administrator how to set password for every weblication in sharepoint 2013.
    Is there any way to set?
    Thanks,

    Who's password are you trying to set? Please provide more details.

Maybe you are looking for

  • White boundary line around flash movie

    Hi, When I use a flash movie on an HTML page it all looks good in Mozilla Firefox. In IE on the other hand, it sucks, because when you move your move over the flash movie you see a white boundaty box. Which makes it all look very silly. How do I get

  • Messages issue in message area of Tab Strip

    Hi , Iu2019m having 2 tabs in my Tab strip. Tab1 u2013 First tab. Tab2 u2013 Second tab. In both the tabs I have message areas. On click of a button in Tab1, iu2019m displaying an error message in the message area, but the same message is appearing i

  • Standard Item overview tab to copied in custom tab - VL31N/VL32N/VL32N

    Hi all, I have created a custom tab in tcode VL32N and VL31N and VL33N.This custom tab is displayed after the tab "ITEM OVERVIEW".It has to be exact replica of the tab ITEM OVERVIEW but only with 2 custom fields in the table control for Item details.

  • Blank Page Printer Warning

    I've been working on a simple one page project this morning where I've had to print a few times and adjust margins.  Suddenly, I'm getting the following warning when I try to print: "The pages selected to print are all blank.  If you want to print bl

  • No violations after creating Roles

    Hi Experts, So I have kind of a weird situation that Im hoping I can get some help with.  Around a month ago we decided to upgrade GRC from version 10.0 to 10.1 and before the upgrades all SOD simulations were working fine but now for some reason is