9i HOST() DEMO not working

HI. I downloaded the 9iDS HOST() sample code, compiled the class file and
when I try to run the form, the host90.fmx runs fine but nothing happens
when I type in a command and push HOST button. ie I type DIR C:\
and nothing is displayed in console output window????
I see know errors. I put in formsweb.cfg envFile=forms90demo.env
Help...Jon

Hi Frank,
I followed the signing directions creating a certificate and signed the host.jar file. I
added host.jar to ARCHIVE_JINI entry. Java console shows it being loaded, but, I am
still not being prompted to trust code. Java console shows error:
Loading http://jonjon:8889/forms90/java/f90all_jinit.jar from JAR cache
Loading http://jonjon:8889/forms90/java/local.jar.sig from JAR cache
Downloading http://jonjon:8889/forms90/java/host.jar to JAR cache
connectMode=HTTP, native.
Forms Applet version is : 90290
java.lang.ClassNotFoundException: java.io.IOException: open HTTP connection failed.
at sun.applet.AppletClassLoader.getBytes(Unknown Source)
Host.fmx still displays but nothing seems to happen when I type in command and push Host.
Any other ideas will be appreciated
Jon

Similar Messages

  • Client "HOST()" demo not working in 9iAS webforms

    HI...
    I am trying to do the equivalent of a client/server HOST() by using the HOST demo for
    9iDS. I followed all directions from host90.html, but, when I get to second from last
    step (enter URL http://<yourmachine>:8888/forms90demo/f90servlet?config=pjc_demos, I
    get "page cannot be displayed" error. The form does run however, but nothing seems to happen. I
    enter in command line DIR C:\ and nothing is displayed.
    Also, I do not have a directory called forms90dem, should I ? And I cannot find a cfg file called
    pjc_config??
    In java console I get errors:
    java.lang.ClassNotFoundException: java.io.IOException: open HTTP connection failed.
    at sun.applet.AppletClassLoader.getBytes(Unknown Source)
    at sun.applet.AppletClassLoader.access$100(Unknown Source)
    at sun.applet.AppletClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    Thanks in advance
    Jon

    ooops, Shay, you are correct. I mis-typed. What I meant was
    URL http://jonjon:8888/formsdemo/f90servelt?config=pjc_demos.
    Jon

  • HOST command not working

    Oracle AS Version 10.1.2.0.2, Oracle Forms Version 10.1.2.0.2, Windows XP.
    I am using HOST command to read a files from the directory (on the server). But HOST does not working. When i click the button to read the file, it just hangs on and no error on the console.
    Does host work on forms 10g?
    actually i was using client_host of webutil and its working fine. But it pick the directory from the client. Whereas i need to pick it from the server where AS is. That why i went for HOST command.
    Any suggestion.

    Hi,
    Try this.
    1. Create a batch file (which would first set the required variables as when you do the "set".)
    2. Add the following to the batch file.
    C:\javasoft10g\jre\bin\javaw -classpath C:\javasoft10g\jre\lib\rt.jar;C:\javasoft10g\paths;;C:\javasoft10g\paths\dusjava.jar; %1 %2 %3 %4 %5 %6 %7Save the batch file in some location (say c:\mybatchscript.bat).
    From forms, call it like
    host('cmd /c c:\mybatchscript.bat > c:\temp\testlog.log' );Now, does it work?
    -Arun
    P.S : Looks to me like, you are setting some variables (or calling another batch file - set , which sets up the variables). So, make sure you set all the required variables in the batch script itself.
    -Arun

  • JMS Demo Not working!!!Very poor samples from Oracle.

    Hi i have installed the CHat JMS Sample into Oc4j.
    Everything was OK until i wanted to log into the chat application.
    Then on my oc4j consol the following occured:
    03/10/04 14:49:08 javax.jms.JMSException: TopicConnection[Oc4jJMS.Connection.bak
    desktop.e06940:f807230602:-8000.9]: cannot invoke method "setClientID" within th
    e J2EE container.
    03/10/04 14:49:08 at com.evermind.server.jms.JMSUtils.make(JMSUtils.java:1
    920)
    03/10/04 14:49:08 at com.evermind.server.jms.JMSUtils.toJMSException(JMSUt
    ils.java:2003)
    03/10/04 14:49:08 at com.evermind.server.jms.JMSUtils.toJMSException(JMSUt
    ils.java:1969)
    03/10/04 14:49:08 at com.evermind.server.jms.JMSUtils.assertNotContainer(J
    MSUtils.java:2427)
    03/10/04 14:49:08 at com.evermind.server.jms.EvermindConnection.setClientI
    Can anyone help? It is very sad because i experienced that most samples will not work if you only follow the install manual.
    regads,
    attila

    Hello Attila,
    It seems that you are using OC4J 10G to run the sample. The sample has been tested on OC4J 904 Developers preview. Please use this to run the sample application.
    This demo uses JMS 1.0 and OC4J 10G supports JMS 1.1. In JMS 1.1, you cannot call setClientID() directly within the J2EE container. Due to this inherent change in the spec, the Chat Demo does not work properly in OC4J 10G.
    This is a known problem and we are working on rectifying this.
    Thanks,
    Rajat

  • Host Builtin Not Working in Linux

    I'm trying to convert a file using the linux command dos2unix through forms HOST builtin. I've set the path variable in the environment file to /usr/bin, where the dos2unix command resides. I've had no luck converting this file. I've also tried:
    host('/usr/bin/dos2unix file.txt');
    with no luck. If I log on as the same user that started the forms server and issue the dos2unix command through the terminal, the file is successfully converted.
    What else do I need to do to get the host builtin to work on Linux?

    You already have said the answer - the Forms server has been started with permissions that allow access to that file..if you are not logged in as that use you don't have the permissions to execute the file....
    Regards
    Grant Ronald

  • Webutil demo not working ?

    Hello experts,
    recently i install and configure according to steps:
    1. Run create_webutil_db.sql
    a. CREATE USER webutil IDENTIFIED BY webutil
    b. Grant connect, resource to webutil
    c. Connect webutil/webutil
    d. @[ORACLE_HOME]/forms/create_webutil_db.sql
    e. Create public synonym webutil_db for webutil.webutil_db;
    f. Connect sys as sysdba
    g. Grant execute on webutil_db to public;
    2. Copy and download Jacob from
    http://sourceforge.net/projects/jacob-project/files/jacob-project/1.14.3/jacob-1.14.3.zip/download
    a. Unzip the jacob download and place jacob.jar in the
    ORACLE_HOME/forms/java directory
    b. backup sign_webuitl.bat script in [ORACLE_INSTANCE]/bin/sign_webutil.sh
    c. search for <Your KEYSTORE password> and replace it with welcome1 (or
    something like this)
    d. search for <Your private key password> and replace it with welcome1 (or
    something like this)
    e. Save the script and use it to sign jacob.jar as below
    f. [ORACLE_INSTANCE]/bin/sign_webutil.sh
    [ORACLE_HOME]/forms/java/jacob.jar
    3. Place jacob.dll in the ORACLE_HOME/forms/webutil/ directory
    4. Jacob.dll in r2 – file names must be verified against webutil.cfg file
    a. Place jacob-1.14.3-x86.dll in the ORACLE_HOME/forms/webutil/win32
    directory.
    b. Place jacob-1.14.3-x64.dll in the ORACLE_HOME/forms/webutil/win64
    directory
    5. Using weblogic EM console, Add ORACLE_HOME/forms/java/frmall.jar to the
    CLASSPATH in the default.env
    6. Update formsweb.cfg webutil section with the following if not already
    done:
    a. Add frmwebutil.jar and jacob.jar to the WebutilArchive parameter in the
    [webutil] configuration section. For some versions of 11g, this is already
    added.
    b. Specify webutil_demo as the form to be run in the [webutil]
    configuration section
    7. Download webutil demo from link below, extract and put the contents in
    a folder
    http://www.oracle.com/ocom/groups/public/@otn/documents/webcontent/196249.zip
    8. Copy ffisamp.dll to the <ORACLE_HOME>\forms\webutil directory.
    9. Open your webutil.cfg file and add the following line
    install.syslib.0.user.1=ffisamp.dll|40960|1.0|true
    10. If not already done do the following in webutil.cfg
    a. transfer.appsrv.workAreaRoot=c:\temp
    b. transfer.appsrv.accessControl=TRUE
    c. transfer.database.enabled=TRUE
    d. transfer.appsrv.enabled=TRUE
    11. Add the folder in FORMS_PATH in enterprise manager
    12. Replace db and run the following command:
    a. frmcmp.sh module=webutil_demo.fmb module_type=form
    userid=webutil/webutil@<db> compile_all=yes
    b. FORMS_PATH variable and make sure webutil.pll folder is available in the
    path or run the above command from command shell in the folder where webutil.pll
    is available
    13. Restart opmnctl and wls_forms weblogic instance
    14. Run the webutil
    running the url:
    http://server:port/forms/frmservlet?form=webutil_demo&config=webutil
    logon window appear, after login following mess comes:
    frm-40735: when-custom-item-event trigger raised
    unhendled exception ora: 06502
    thanks
    yash
    Edited by: yash_08031983 on Mar 8, 2013 12:12 AM

    There are a few things you did not mention or were unclear about.
    1. Exactly which Forms version are you using? In order to do what you described, you should be using 11.1.2.x. Forms 11.1.1 or older will not work using the instructions you referred to.
    2. I assume you just copied and pasted the instructions in your post because you included steps like this: "+ 3. Place jacob.dll in the ORACLE_HOME/forms/webutil/ directory+ ". If you downloaded the correct Jacob, you won't have a jacob.dll file.
    3. You said, " +b. FORMS_PATH variable and make sure webutil.pll folder is available + ". At runtime, FORMS_PATH will need access to webutil.plx and webutil_demo.fmx. The pll and fmb are for design time only. In the past, we permitted the use of ungenerated libraries (pll) at runtime, but this is no longer the case. You should always use the "X" file.
    4. You did not mention any of the client information. OS, browser and version, JRE and version, etc. If the client OS is 64bit and you are running Forms 11.1.2, you have the option of using either the 32bit or 64bit Internet Explorer versions. However, you must have a matching JRE. In other words, if you are using 32bit IE, you must also use the 32bit JRE. For 64bit IE you must use the 64bit JRE.
    5. If you are attempting to use Java 7 on the client, you must be running Forms 11.1.2.1.
    6. Someone asked if you compiled webutil.plx. Did you do this before or after you generated the form (webutil_demo.fmx)? If you generated the form before the library, I would recommend regenerating the form. Again, be sure to include the compile_all=yes option.

  • Jdeveloper PJC wizard demo not working and how to debug?

    Hi,
    Has anyone try the follow the steps in PJC wizard demo in http://www.oracle.com/technology/sample_code/products/forms/index.html?
    And is it working?
    I tried created the demo.securefield jar file in Jdeveloper in add the package in implementation class in the form text item but the function is not working.
    How I can debug whether the jave code is fired or not?
    And does anyone has the source code that is working can be shared.
    Regards,
    Anna

    Hello,
    You can put some System.out.println("the text i want to output"); functions anywhere in the java code, then see the output in the java console.
    Francois

  • Pause key during recording Video demo not work

    Hello everybody, I dont know why, but Pause key during recording Video demo project not work. I tried all others keys what I see in the Preferences dialog box and all works corectly, only Pause key not. Can somebody help me? Win 7, Captivate 6.
    Yarik

    Hi there and thank you for reaching Adobe Community.
    Unfortunately, this feature is not there in Captivate 6 Video demo.
    Thanks!

  • Simple ws-policy demo not working

    Hi Gurus,
    It's been quite awhile, I could not work it out though. I guess your help would be the last change to stop it from driving me crazy~
    The goal is to implement a simple ws-seurity enabled webservice demo using only username/password token as the policy. username/password in the ones listed in "myrealm" (might have SQL Authentication provider as well),and X509 is not the thing to be considered in this simple test.
    Env:
    WebLogic Server Version: 10.3.0.0
    JVM: Sun one installed with weblogic
    WebLogic Eclipse plugin: 1.0.0.2008.0808135653
    Windows XP sp3
    After reading that much docs, it came to below procedure and code:
    1. Eclipse -> new Dynamic web project "WSTest3"
    2. create file: example.ws.HelloW1.java
    package example.ws;
    import javax.jws.WebService;
    import weblogic.jws.Policy;
    import weblogic.jws.Policies;
    @WebService(serviceName="HelloW1")
    @Policies( { @Policy(uri = "policy:usernametoken.xml") } )
    public class HelloW1 {
         public String sayHi(String hi){
              System.out.println("Already here: " + hi);
              return "Welcome, you said: " + hi;
    3. add "weblogic.jar" to build path
    4. create WEB-INF/policies/usernametoken.xml
    <?xml version="1.0"?>
    <wsp:Policy
    xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
    xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200512"
    >
    <sp:SupportingTokens>
    <wsp:Policy>
    <sp:UsernameToken
    sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200512/IncludeToken/AlwaysToRecipient">
    <wsp:Policy>
    <sp:WssUsernameToken10/>
    </wsp:Policy>
    </sp:UsernameToken>
    </wsp:Policy>
    </sp:SupportingTokens>
    </wsp:Policy>
    5. Publish the project WSTest3 to weblogic server
    6. Test the webservice within weblobic admin console, get below response which is expected since there is no input for user/pass in the simple test web page:
    ~~~~~~~~~~~~~~~~~~~
    <faultcode>wsse:InvalidSecurity</faultcode>
    <faultstring>Error on verifying message against security policy Error code:1000</faultstring>
    ~~~~~~~~~~~~~~~~~~~
    7. create the WSTest3Client project
    8. new "web service client"
    9. input the WSDL "http://127.0.0.1:7001/WSTest3/HelloW1?WSDL" and have the webservice related stub files created.
    10. create java file: example.ws.client.Main.java
    package example.ws.client;
    import java.rmi.RemoteException;
    import java.util.ArrayList;
    import java.util.List;
    import java.util.Map;
    import java.security.cert.X509Certificate;
    import javax.xml.rpc.ServiceException;
    import org.apache.axis.client.Stub;
    import example.ws.HelloW1_PortType;
    import example.ws.HelloW1_Service;
    import example.ws.HelloW1_ServiceLocator;
    import weblogic.jws.jaxws.ClientPolicyFeature;
    import weblogic.jws.jaxws.policy.InputStreamPolicySource;
    import weblogic.security.SSL.TrustManager;
    import weblogic.wsee.security.unt.ClientUNTCredentialProvider;
    import weblogic.xml.crypto.wss.WSSecurityContext;
    import weblogic.xml.crypto.wss.provider.CredentialProvider;
    public class Main {
         public static void main(String[] args)
         throws ServiceException, RemoteException{
              String username = "weblogic";
              String password = "weblogic";
              CredentialProvider cp = new ClientUNTCredentialProvider(username.getBytes(), password.getBytes());
              List credProviders = new ArrayList();
              credProviders.add(cp);
              HelloW1_Service service = new HelloW1_ServiceLocator();
              HelloW1_PortType port = service.getHelloW1Port();
         Stub stub = (Stub)port;
         stub._setProperty(WSSecurityContext.CREDENTIAL_PROVIDER_LIST, credProviders);
    //Map rc = ((BindingProvider)port).getRequestContext();
    //rc.put(WSSecurityContext.CREDENTIAL_PROVIDER_LIST, credProviders);
         System.out.println(port.sayHi("nihao"));
    11. add weblogic.jar to build path and let it go.
    The expected output string was not coming, but still the exception there:
    ~~~~~~~~~~~~~~~
    Exception in thread "main" AxisFault
    faultCode: {http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}InvalidSecurity
    faultSubcode:
    faultString: Error on verifying message against security policy Error code:1000
    faultActor:
    faultNode:
    faultDetail:
         {http://xml.apache.org/axis/}stackTrace:Error on verifying message against security policy Error code:1000
         at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
         at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
    {WITH MANY OTHER LINES BELOW}
    ~~~~~~~~~~~~~~~~~~
    use below code suggested from reference link (2)
    Map rc = ((BindingProvider)port).getRequestContext();
    rc.put(WSSecurityContext.CREDENTIAL_PROVIDER_LIST, credProviders);
    to replace stub._setProperty, but I was told can not make the CAST from stub to BindingProvide, seems it's something in Jdeveloper11, not for my env.
    if I comment "@Policies( { @Policy(uri = "policy:usernametoken.xml") } ) " off and republish the webservcie, the test would be running good, but defniately there is no anthentication, which is not what I want.
    reference link (1): http://e-docs.bea.com/wls/docs103/webserv_sec/message.html
    reference link (2): http://kingsfleet.blogspot.com/2008/12/simple-custom-policy-example-using-jax.html
    I am grateful to have your input, thanks in advance and wish you a good day!
    Regards,

    Hi, it comes to episode2.
    Now the WS client's very smoothly working in my Jdev10.1.3, the code is very alike, but it uses
    stub._setProperty(Stub.USERNAME_PROPERTY, "weblogic");
    stub._setProperty(Stub.PASSWORD_PROPERTY, "weblogic");
    // This source file is generated by Oracle tools and is subject to change
    // It is a utility client for invoking the operations of the Web service port.
    // For reporting problems, use the following
    // Version = Oracle WebServices (10.1.3.1.1, build 070111.22769)
    package proj2.proxy;
    import oracle.webservices.transport.ClientTransport;
    import oracle.webservices.OracleStub;
    import javax.xml.rpc.ServiceFactory;
    import javax.xml.rpc.Stub;
    public class HelloW1PortClient {
    private proj2.proxy.HelloW1_PortType _port;
    public HelloW1PortClient() throws Exception {
    ServiceFactory factory = ServiceFactory.newInstance();
    port = ((proj2.proxy.HelloW1Service)factory.loadService(proj2.proxy.HelloW1_Service.class)).getHelloW1Port();
    * @param args
    public static void main(String[] args) {
    try {
    proj2.proxy.HelloW1PortClient myPort = new proj2.proxy.HelloW1PortClient();
    System.out.println("calling " + myPort.getEndpoint());
    // Add your own code here
    myPort.setUsername("weblogic");
    myPort.setPassword("weblogic");
    System.out.println( myPort.sayHi("Hello") );
    } catch (Exception ex) {
    ex.printStackTrace();
    * delegate all operations to the underlying implementation class.
    public String sayHi(String arg0) throws java.rmi.RemoteException {
    return _port.sayHi(arg0);
    * used to access the JAX-RPC level APIs
    * returns the interface of the port instance
    public proj2.proxy.HelloW1_PortType getPort() {
    return _port;
    public String getEndpoint() {
    return (String) ((Stub) port).getProperty(Stub.ENDPOINT_ADDRESS_PROPERTY);
    public void setEndpoint(String endpoint) {
    ((Stub) port).setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, endpoint);
    public String getPassword() {
    return (String) ((Stub) port).getProperty(Stub.PASSWORD_PROPERTY);
    public void setPassword(String password) {
    ((Stub) port).setProperty(Stub.PASSWORD_PROPERTY, password);
    public String getUsername() {
    return (String) ((Stub) port).getProperty(Stub.USERNAME_PROPERTY);
    public void setUsername(String username) {
    ((Stub) port).setProperty(Stub.USERNAME_PROPERTY, username);
    public void setMaintainSession(boolean maintainSession) {
    ((Stub) port).setProperty(Stub.SESSION_MAINTAIN_PROPERTY, Boolean.valueOf(maintainSession));
    public boolean getMaintainSession() {
    return ((Boolean) ((Stub) port).getProperty(Stub.SESSION_MAINTAIN_PROPERTY)).booleanValue();
    * returns the transport context
    public ClientTransport getClientTransport() {
    return ((OracleStub) _port).getClientTransport();
    the weird thing is when I moved "
    stub._setProperty(Stub.USERNAME_PROPERTY, "weblogic");
    stub._setProperty(Stub.PASSWORD_PROPERTY, "weblogic");
    into Eclipse, it still complains the same error: "Error on verifying message against security policy Error code:1000", meanwhile the server outputs:
    <WSEE:18>Trying to validate identity assertion token http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#UsernameToken<SecurityMessageInspector.inspectIdentity:629>
    Thanks,

  • Oracle Forms Demo Not working -- Attn. Oracle Customer Service

    Hi,
    I try to see Multiselect T-List Demo in the following page.It's not working.
    http://www.oracle.com/technology/sample_code/products/forms/index9i.html
    -Murali

    Hello,
    have you read the <ORACLE_HOME>\forms90\demos\multiselect\doc\multiselect90.html doc file ?
    this is a part of the content:
    "Enabling and Using the Multi-Select capabilities of the PJCBy default the enhanced TList continues to operate just like a normal TList, in order to enable the multi-select capability you must set a custom property on the item ENABLE_LIST_MULTISELECT to the string value 'true' e.g.
    SET_CUSTOM_PROPERTY('PJC.MULTISELECT_LIST',1,'ENABLE_LIST_MULTISELECT','true');"
    Francois

  • Standard Enhanced PCI to USB host Controller not working

    Plz help me its suck i can't find any driver for this USB port its suck all my usb ports are not working they not accepting any usb or some thing or intel managment interface also not working plz help me . Thankyou
    Us Device PCI
    Device PCI\VEN_8086&DEV_1E26&SUBSYS_17F8103C&REV_04\3&11583659&0&E8 was configured.
    Driver Name: usbport.inf
    Class GUID: {36FC9E60-C465-11CF-8056-444553540000}
    Driver Date: 06/21/2006
    Driver Version: 6.2.9200.16384
    Driver Provider: Microsoft
    Driver Section: EHCI.Dev.NT
    Driver Rank: 0xFF2005
    Matching Device ID: PCI\CC_0C0320
    Outranked Drivers:
    Device Updated: false
    Intel Mangagment interface
    Device PCI
    Device PCI\VEN_8086&DEV_1E3A&SUBSYS_17F8103C&REV_04\3&11583659&0&B0 was configured.
    Driver Name: null
    Class GUID: {00000000-0000-0000-0000-000000000000}
    Driver Date:
    Driver Version:
    Driver Provider:
    Driver Section:
    Driver Rank: 0x0
    Matching Device ID:
    Outranked Drivers:
    Device Updated: false

    What is the installed operating system?
    In which region of the world are you located?
    Try the following Intel Management Engine software
    http://h10025.www1.hp.com/ewfrf/wc/softwareDownloadIndex?softwareitem=ob-113870-1&cc=us&dlc=en&lc=en...
    ****Please click on Accept As Solution if a suggestion solves your problem. It helps others facing the same problem to find a solution easily****
    2015 Microsoft MVP - Windows Experience Consumer

  • HOST command not working in forms 10g

    Hi,
    I have migrated forms 6i to forms 10g, and having a requirement to open sqlplus prompt using a form menu. I have used the below command: -
    "host('sqlplus '||user_name||'/'||pass||'@'||sid, no_screen);"
    But I am not able to get the sqlplus window, and the main form is still in process for long time, till i bounce the server.
    The forms are deployed on Oracle Applications Server 10g and i want to run it on server side.
    Please help me with the problem.
    Thanks,
    Ankit

    The deployment architecture is different between forms 10g and forms 6i.
    In Forms 6i HOST built-in command will run on the client machine since you are running as client/server, but in WebForms (Forms10g) the HOST built-in command will run on the middle tier which is your application server machine.
    In order to run hosts commands in WebForms you need to use webutil and use CLIENT_HOST in the webutil.
    check the [Forms 10g R2 Demo|http://download.oracle.com/otndocs/demos/Forms_Demos_10gr2.zip] for sample codes of webutil.
    You are using NO_SCREEN in your example, this will hide the window.
    Tony
    Edited by: Tony Garabedian on Nov 26, 2009 2:43 PM

  • Issue with REST POST call: CopyTo in a SharePoint hosted App not working

    Hi Community
    I have been really struggling to get a cross domain copy to work both in an App or even using REST Tools such as Postman or Google Advanced REST Client. 
    Ok there are various blog posts by Scott G et al.  that shows how you can post say in a single domain.  Now that's fairly straight forward
    in my case I took a .apsx page and added the following lines of code - Checkin - refresh and great the file gets copied via  the document ready function
    (document).ready(function () {
    alert('ready!');
    var src = "/appsdev/Shared Documents/SrcDoc.docx";
    var dst = "/appsdev/Shared Documents/DestDocCopiedByRestTestASPXPage.docx";
    jQuery.ajax({
    type: "POST",
    contentType: "application/json;odata=verbose",
    headers: {
    "accept": "application/json;odata=verbose",
    "X-RequestDigest": jQuery("#__REQUESTDIGEST").val()
    url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/getfilebyserverrelativeurl('" + src + "')/copyto(strnewurl='" + dst + "',boverwrite=true)",
    success: function (data, errorCode, errorMessage) {
    alert('Success: copied the damn file');
    var jsonObject = JSON.parse(data.body);
    var jsonObjectText = JSON.stringify(jsonObject);
    error: errorHandler
    Now I make the call in my SharePoint hosted App and I simple can' t  get this to work. Fiddler doesn't exactly help a lot
      var src = "/appsdev/Shared Documents/SrcDoc.docx";
      var dst = "/appsdev/Shared Documents/DestDocCopiedByMyApp.docx";
        var urlWriteLocalFileDebug = appweburl +
       "/_api/SP.AppContextSite(@target)/web/Getfilebyserverrelativeurl('" + src + "')/copyTo(strNewUrl='" + dst + "', bOverWrite=true)?@target='" + hostweburl + "'";
    executor.executeAsync(
    method: "POST",
    contentType: "application/json;odata=verbose",
    headers: {
    "accept": "application/json;odata=verbose",
    "X-RequestDigest": jQuery("#__REQUESTDIGEST").val()
    url: urlWriteLocalFileDebug,
    success: function (data, errorCode, errorMessage) {
    alert('Success: copied the damn file');
    var jsonObject = JSON.parse(data.body);
    var jsonObjectText = JSON.stringify(jsonObject);
    error: errorHandler
    I can happily run a GET and see the properties of my file but POST no way.   Curriously, when I try to run the same command for say Google Advanced Rest Client I get nowhere
    Is this a new mensa test!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
    Freelance consultant

    Hi
    I have now tested against a trail Office  365 Developer site and I had to make a few adjustments
    - change the url
    - change the target to SharePoint Onlne
    - change the url 
    I still wasn't happy so I created a new SharePoint Hosted app and pointed at the above developer site.  I copied my CrossDomainExec.js and stripped all my code except my CopyItemInSameLIbrary method which hasn't changed since I created this post. 
    - changed the App Manifest permissions to Web -full Control ( was previously tenant)
    I still got errors which is really painful as you don't even see the POST request in Fiddler
    The URL used for my POST is as follows ( note host URL is fictitious)
    "https://myapphell-547d8061d39e38.sharepoint.com/sites/appsdev/RESTTestSHA/_api/SP.AppContextSite(@target)/web/Getfilebyserverrelativeurl('/sites/appsdev/Shared Documents/SrcDoc.docx')/copyTo(strNewUrl='/sites/appsdev/Shared Documents/DestDoc.docx', bOverWrite=true)?@target='https://myapphell.sharepoint.com/sites/appsdev'" String
    Ran the app a second time and now I see......Wow it WORKS!!!!!! ..Can't be true can it?
    .... next I will switch the target url to my on prem farm to see if this still works so watch this space!
    Daniel
    Freelance consultant

  • FTP from cRIO to host PC not working

    Hello,
    I have a VI that writes files to my cRIO 9074. I then need to get those files onto my PC. I want to do this running on cRIO (as opposed to from my computer) so that I can have a 'export file' button in the VI. I'm therefore using the 'Put File' FTP function, and have set up FileZilla as the FTP server on my PC, as delineated here: http://digital.ni.com/public.nsf/allkb/9A004CF5241​F3CB68625779E004EE159
    However, the file does not copy and I get an error message.
    Details and annotated screen captures below.
    Thank you for your help!
    Elizabeth
    I can do the reverse (running VI on computer, get or put files from/to the cRIO). However, I'd like to run this from the cRIO
    If there's a way to call a VI on the computer from a VI running on the cRIO, that's also an acceptable solution
    I can tell the cRIO is connected because I can access it via FTP from my computer
    I've set up the FTP server with the default server (127.0.0.1), and user LABVIEW with the appropriate home directory etc., with read/write permissions
    In the Put FIle VI, I have the host set as my computer's IP address, and the user again as LABVIEW
    The error code I get is Error 1: TCP Write in NI_InternetTK_FTP_VIs.lvlib:FTP Command.vi:6->NI_InternetTK_FTP_VIs.lvlib:FTP [QUIT].vi->NI_InternetTK_FTP_VIs.lvlib:FTP Close Session.vi:3->NI_InternetTK_FTP_VIs.lvlib:FTP Put Multiple Files and Buffers.vi:2->NI_InternetTK_FTP_VIs.lvlib:FTP Put File.vi:1->RIO_FileExport.vi
    Attachments:
    cRIO File Export FTP.jpg ‏310 KB

    Just a guess but try changing the active/passive setting. Have you tried FTPing to the PC from another PC? Does that work?
    CLA, LabVIEW Versions 2010-2013

  • Xfa.host.gotoURL not working

    Hi all,
    I'm running Designer 7.1 and the function xfa.host.gotoURL("some Url") doesn't seem to be working anymore. It worked in previous versions. Is it me or am I missing something?

    I'm using Designer 7.1 with Acrobat 7.0.8 and the following code works just fine for me (in both FormCalc and JavaScript):
    xfa.host.gotoURL("http://www.adobe.com");
    Note that this is a
    client only method. Make sure that the Run At property is set to
    Client.
    If setting the Run At property to
    Client doesn't fix the problem, it would be useful if you could give me a little more context with regards to your particular scenario: How is the xfa.host.gotoURL function being called? What version of Acrobat are you using? Is the form loaded in stand-alone Acrobat or within the browser plug-in when xfa.host.gotoURL doesn't work?
    Stefan
    Adobe Systems

Maybe you are looking for