利用Cordys插件 上传文件到 Cordys服务器目录

来源:互联网 发布:上海周边温泉知乎 编辑:程序博客网 时间:2024/05/19 05:34
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!-- ?2003 Cordys R&D B.V. All rights reserved. The computer program(s) is the proprietary information of Cordys R&D B.V. and provided  under the relevant License Agreement containing restrictions on use and disclosure.  Use is subject to the License Agreement.                                                                                                                                                                                                                              Project: Cordys WCPFile Name: uploadtoserver.htmDescription : uploads to server. In order to use this demo page the user needs a java call serviceconfigured with the required java class exposed to the front end in the form ofa method called Upload which is implemented in the namespace http://schemas.cordys.com/1.0/devtools.--><html><head><title>File Upload</title><meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"><meta http-equiv="Content-Script-Type" content="text/javascript"><script type="text/javascript" src="/cordys/wcp/application.js"></script><script type="text/javascript">function uploadFile(){uploader.request = requestString.XMLDocument;if ( !system.isIE ){ if(document.getElementById("file1").value != "")uploader.uploadFile(document.getElementById("uploadForm1"));elsealert("Choose a file to upload");}else{if(document.getElementById("chosenFile").value != "")uploader.uploadFile();elsealert("Choose a file to upload");}   }function onLoad(){  if ( !system.isIE ){ document.getElementById("choose").style.display="none";document.getElementById("choose1").style.display="none";}else{document.getElementById("file1").style.display="none";}}function onUploadHandler(){if(window.application.event.status)alert(cordys.getXML(window.application.event.response));}</script><script type="cordys/xml" id="requestString">    <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">      <SOAP:Body>        <UpLoad xmlns="http://schemas.cordys.com/LVWSAppServerPackage" preserveSpace="no" qAccess="0" qValues="">          <leavingID />          <createName />          <createDate />          <fileName>Upload:FileName1</fileName>          <fileContent>Upload:FileContent1</fileContent>          <comment>PARAMETER</comment>        </UpLoad>      </SOAP:Body>    </SOAP:Envelope></script></head><body onLoad=onLoad()><div cordysType="wcp.library.util.Upload" id="uploader" encode="true" style="display:none" onupload="onUploadHandler()" xmlcontent="true"></div><center><h4>File Decode Demo</h4></center><center>Select a file to upload:<input id ="choose1" type=text name="chosenFile"><input type=button value="Choose File" id="choose" onclick="chosenFile.value = uploader.browse(1)"><form action="com.lv.lvattachment.upLoad.wcp" id="uploadForm1" name="uploadForm1" enctype="multipart/form-data" method="post"><INPUT type="file" id="file1" name="file1" /></form></center><br><center><input type="button"  value="Upload" name="Upload" onClick="uploadFile()"></input></center></body></html>

0 0
原创粉丝点击