How to call serlvet using ftp protocal
Hai,
How to call servlet using ftp protocal . if any one having please send that program . because generic servlet will receive any protocal request .
The basics are to have your Server listen to port 21.
You would then have to parse the request information to determine what is being asked for and generate an appropriate response.
Similar Messages
-
How to call webservice using jdev9i
Hi gurus and experts,
i need to consume a webservice using oaf. with great effort finally i created stub using axis s/w.
now i dont know how to use the stub in jdev.where to write the code and what to write.iam strucked :-( .
since there were no sample tutorial about how to call webservice from jdev9i, iam struggling to make.iam jus a starter.
and while googling i came to know that stubs can be created using jdev9i .but when i see new-->webservices--web service stub it is greyed out.
i have 2 questions now:
1)if stub created using axis can it be used in jdev9i? if yes ,please tell me how? any tutorial links also helps me.
2)if the stubs should be created only by jdev9i so that webservices can be called using jdev,then please guide me how to make it.
i need some helping hands from u guys.
Thanks a lot
Edited by: 881533 on Oct 25, 2011 2:34 AM
Edited by: 881533 on Oct 25, 2011 2:37 AMHello sir,
i got following reply:
<returnRecordResponse xmlns="http://xyz" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<returnResult>Error_request</returnResult>
</returnRecordResponse>
but correct response is
<returnRecordResponse xmlns="http://xyz" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<returnResult>Success</returnResult>
</returnRecordResponse>
can you tell me correction in the code which i have put on the forum?or tell me other way to call webservice? -
HOW to read file using ftp???
Hi to all,
I have problem with reading file using ftp connection, i want to read only 1024 bytes for one time, and i have
next code wich read this:
byte buffer[] = new byte[1024];
while( (readCount = input.read(buffer)) > 0) {
bos.write(buffer, 0, readCount);
but I dont know how to put all read data in one byte[] if i dont know length of file.
I can't do some like: byte file[] = new file[1000000];
Thanks for all sugestions!* Download a file from a FTP server. A FTP URL is generated with the following syntax:
* <code>ftp://user:password@host:port/filePath;type=i</code>.
* @param ftpServer FTP server address (incl. optional port ':portNumber').
* @param user Optional user name to login.
* @param pwd Optional password for <i>user</i>.
* @param fileName Name of file to download (with optional preceeding relative path, e.g. one/two/three.txt).
* @param destination Destination file to save.
* @throws MalformedURLException, IOException on error.
public void download(String ftpServer, String user, String pwd, String fileName, File destination) throws MalformedURLException, IOException {
if (ftpServer != null && fileName != null && destination != null) {
StringBuffer sb = new StringBuffer("ftp://");
if (user != null && pwd != null) { //need authentication?
sb.append(user);
sb.append(':');
sb.append(pwd);
sb.append('@');
}//else: anonymous access
sb.append(ftpServer);
sb.append('/');
sb.append(fileName);
sb.append(";type=i"); //a=ASCII mode, i=image (binary) mode, d= file directory listing
BufferedInputStream bis = null;
BufferedOutputStream bos = null;
try {
URL url = new URL(sb.toString());
URLConnection urlc = url.openConnection();
bis = new BufferedInputStream(urlc.getInputStream());
bos = new BufferedOutputStream(new FileOutputStream(destination.getName()));
int i;
while ((i = bis.read()) != -1) { //read next byte until end of stream
bos.write(i);
}//next byte
} finally {
if (bis != null) try { bis.close(); } catch (IOException ioe) { /* ignore*/ }
if (bos != null) try { bos.close(); } catch (IOException ioe) { /* ignore*/ }
}//else: input unavailable
}//download()If you don't want to strore the data into a file, use ByteArrayOutputStream instead of a FileOutputStream. -
How to Call Webservicer using Visuval composure Ce 7.1 server
Hi ,
We are created in ABAP , they r exposed in WSDL , if i have to call That web services using visuval composure please ASAP can u send , how to call WSDL In CE 7.1 Serve
Thnks & Regards,
SureshHi
you can try this links:
http://help.sap.com/saphelp_nwce10/helpdata/en/9f/9985f72084483cb316a3c2322fb090/content.htm
(here look for the therm Creating Web Service Physical Destinations that points to :
http://help.sap.com/saphelp_nwce10/helpdata/en/45/635dd614d73bdbe10000000a1553f7/content.htm
best regards,
v s
Edited by: v s on Dec 4, 2008 12:22 PM -
How to download file using ftp in bash script
Hi! I'm runnig a bash script in solaris i want within the script to dowload file using ftp
How can i do it?
Tanks a lothello,evgchech
please try this way:
1. In the bash script, try following command:
ftp -n < ftpcmdfile2 in the ftpcmdfile (which is a file),coding the interactive commands of FTP such as:
user anonymous [email protected]
cd /var/sun/download
bi
mget *.*
bye
try it and good luck!
Wang Yu
Developer Technical Support
Sun Microsystems
http://sun.com/developers/support -
How to call BOMUIPrimaryPage using configurator extension
Hi
I am new to the configurator. I am working on the following requirement.
From the Standard guided sales ui ( OA.jsp?page=/oracle/apps/cz/runtime/oa/webui/pages/CZMainPage) we have to call the (OA.jsp?page=/oracle/apps/cz/runtime/oa/webui/pages/BOMUIPrimaryPage) when user will click a custom button.
I have created the custom button using configurator extension which is using the java class.
Issue - I need to know how to call the OA.jsp?page=/oracle/apps/cz/runtime/oa/webui/pages/BOMUIPrimaryPage page from the java class.
If any one is having sample code please pass it to me.
Thanks in advance.
KausikThe basics are to have your Server listen to port 21.
You would then have to parse the request information to determine what is being asked for and generate an appropriate response. -
How to call forms using Hierarchical Tree in Forms 10g?
I know how to call forms from menu that attached to a top form.
I would like to call forms using Hierarchical Tree. Does any one know how where I can find some instructions on using Hierarcical Tree to call other forms? Any discussion is welcome. Thanks.Thanks to Francois.
The exampe with clear instructions and I can build tree that calls forms now.
I add a OPEN_FORM statement in WHEN-TREE-NODE-ACTIVATED trigger
Declare
LN$I Pls_integer ;
Begin
:Ctrl.Node_Activated := Ftree.Get_Tree_Node_Property('BL_TREE.MENU', :SYSTEM.TRIGGER_NODE, Ftree.NODE_VALUE) ;
If :Ctrl.Node_Activated IS NOT NULL Then
Set_Alert_Property( 'AL_CALL_FORM', ALERT_MESSAGE_TEXT, 'Calling module : ' || :Ctrl.Node_Activated ) ;
LN$I := Show_Alert( 'AL_CALL_FORM' ) ;
open_form(:Ctrl.Node_Activated);
End if ;
End ;
Or call physical form path by:
open_form('c:\tree\'||:Ctrl.Node_Activated ||'.fmx');
I enter the VALUE of MENU as the Form fmx name and it works very well.
Thanks so much. -
How to call window programs FTP from oracle 8i
Hi every one
Dear friends
I have to export a small dmp file from onse db server to another db server via our privtare network using ftp. How can i automate this program using pl/sql
I am trying the flow
Server 1
export a table (selected records)
make file name with some convention
ftp the exported fle to Server 2
after successful transfer on server 2
delete exported file
delete table for selected records
Please help
Prashantprashant13 wrote:
Hi every one
Dear friends
I have to export a small dmp file from onse db server to another db server via our privtare network using ftp. How can i automate this program using pl/sql
I am trying the flow
Server 1
export a table (selected records)
make file name with some convention
ftp the exported fle to Server 2
after successful transfer on server 2
delete exported file
delete table for selected records
Please help
PrashantEven if you could (doubtful), looks to me like you have a big exposure of deleting the selected records without being able to confirm that it is truly safe to do so. -
How to call webservice using flex?
Hello,
i want to call webservice in flex.i tryied following code.but it is not giving correct response.what is wrong with this code?
can anybody tell me ,how to call webservice in flex?
Code:
<mx:Script>
<![CDATA[
public function button1_clickHandler(event):void
ws.returnRecord(para1,para2);//i am sending two parameter to returnRecord service here
public function remotingCFCHandler(event:ResultEvent):void
trace(event.result);
]]>
</mx:Script>
<mx:WebService
id="ws"
wsdl="http://localhost:8500/flexapp/returnusers.cfc?wsdl">
<mx:operation name="returnRecords" resultFormat="object"
fault="mx.controls.Alert.show(event.fault.faultString)"
result="remotingCFCHandler(event)"/>
<mx:Button label="Go" fontWeight="bold" click="button1_clickHandler(event)"/>Hello sir,
i got following reply:
<returnRecordResponse xmlns="http://xyz" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<returnResult>Error_request</returnResult>
</returnRecordResponse>
but correct response is
<returnRecordResponse xmlns="http://xyz" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<returnResult>Success</returnResult>
</returnRecordResponse>
can you tell me correction in the code which i have put on the forum?or tell me other way to call webservice? -
How to call a text FTP proxy service from a Java client ?
Greetings,
I've configured a text FTP proxy service which downloads files from a FTP server. It pols a directory on the FTP server and, as soon as a file respecting a given pattern apears it is downloaded. I tested the service in the test console and by putting some test files onto the FTP server. Now, I need to be able to test it from a Java client. How may I do that ? I need to write a Java client to connect to the OSB and to tell to it to use the FTP proxy in order to download a given file, from a given location and to put it in a given location on the client machine. Many thanks in advance for any help. A sample would be great !
Kind regards,
NicolasOk, I understand. The crucial question here is "what is a caller that you refer to?"
Don't get me wrong, but the problem here is that you probably don't understand, what OSB is good for. OSB is an event-driven system. The event in your case is a new message in remote FTP server. You have to define what should happen when that event is fired. And that's all. You don't have to involve other client (or caller) for this case.
You should define your FTP proxy to retrieve all relevant files from FTP server and then you should route them based on their name/content/encoding/whatever to different consumers. You can also have many proxies if you want - one for each name. It's up to you. But you don't have any "callers" in either case. -
How to call RFC using EJB module.
hi,
I want to call the RFC using EJB module in java. how to do it.
if someone having the code plz post it.
regards,
Shanthakumar./***Start of JRA specific code***//
// Retrive connection factory
InitialContext initialcontext = new InitialContext();
connectionfactory = (ConnectionFactory) initialcontext.lookup("java:comp/env/ConnFactory");
//Request a connection handle:
connection = connectionfactory.getConnection();
//Create a RecordFactory object to get a metadata description
// of the RFC SALERT_CREATE
RecordFactory recordFactory = connectionfactory.getRecordFactory();
// Create Record objects containing all
// necessary information about the RFM.
MappedRecord input = recordFactory.createMappedRecord("SALERT_CREATE");
//Fill in the import parameters and the import table structure data here
input.put("IP_CAT", "ALRT_CAT"); // alert category
// Refer to the SW_CONT structure of the table of RFC SALERT_CREATE
ResultSet inputITContainer = (ResultSet) input.get("IT_CONTAINER");
int tabIndex = 0;
inputITContainer.moveToInsertRow();
inputITContainer.updateString("ELEMENT", "CONT_1");
inputITContainer.updateString("TAB_INDEX", "" + tabIndex++);
inputITContainer.updateString("ELEMLENGTH", "250");
inputITContainer.updateString("TYPE", "C");
inputITContainer.updateString("VALUE","Container_1 value");
inputITContainer.insertRow();
inputITContainer.moveToInsertRow();
inputITContainer.updateString("ELEMENT", "CONT_N");
inputITContainer.updateString("TAB_INDEX", "" + tabIndex++);
inputITContainer.updateString("ELEMLENGTH", "250");
inputITContainer.updateString("TYPE", "C");
inputITContainer.updateString("VALUE","Container_N value");
inputITContainer.insertRow();
interaction = connection.createInteraction();
// execute the call with the input parameters.
interaction.execute(null, input);
}catch(Exception e){
// Error handling code goes here
}finally{
try {
if (interaction != null)
interaction.close();
if (connection != null)
connection.close();
} catch (Exception ignored) {
// Do nothing
// Pass on module data to the next module in chain, unaltered
return moduleData; -
How to call webservice using java client
Hi,
I am new to webservice related stuff.Can any body help me.
How can i call the webservice using simple java programing using jdeveloper tool is very useful for me.
Thanks
venujuser10394151 wrote:
Hi,
I am new to webservice related stuff.Can any body help me.
How can i call the webservice using simple java programing using jdeveloper tool is very useful for me.
Thanks
venujTry this simple webservice client.
You will need apache-axis.jar in your classpath. The following client is apache axis based. A similiar client can be built also using the JAX-WS only[without apache-axis.jar].
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import javax.xml.namespace.QName;
public class WEBSERVICE_CLIENT{
public static void main(String [] args) {
try {
String endpoint ="<YOUR WS ENDPOINT>";
Service service = new Service();
Call call = (Call) service.createCall();
// YOU CAN SET VARIOUS PROPERTIES IN THE "CALL" OBJECT...LIKE
// USERNAME,PASSWORD,PROPERTIES OF HTTP HEADER. SEE "CALL" OBJECT'S API FOR MORE PROPERTIES.
call.setTargetEndpointAddress( new java.net.URL(endpoint) );
call.setOperationName(new QName("<YOUR WS SERVICE NAMESPACE>", "<WS SERVICE TO BE INVOKED>"));
String msg = (String) call.invoke( new Object[] { "data" } );
System.out.println("RETURNED MESSAGE : "+msg);
} catch (Exception e) {
System.err.println(e.toString());
} -
[Win Ill 10] How to Call Javscript using Plugin code?
Hi All,
IDE:Microsoft VC++ 6.0
Illustrator :Version 10
I want to call a javascript from Vc++ code using SDK .I found a sample code to do this in "ASScripting.h" header.
Here is the code:
How to use the Scripting suite:
/*To execute a JavaScript script inside a host application, you must acquire
and use a JavaScript engine instance.
A typical use of the engine:*/
ASJavaScriptEngineRef jsEngineRef = NULL;
ASAPI err = kSpNoError;
err = sScriptingSuite->CreateJavaScriptEngine( &jsEngineRef );
if ( err == kSPNoError )
const char scriptText[] = "documents.add();" // Script to create a new document
const char * result = NULL;
err = sScriptingSuite->ExecuteJavaScript( jsEngineRef, scriptText, &result );
if ( err == kASScriptExecutionError )
// If error during execution, display a dialog containing returned error information string.
ErrorAlert( result );
err = sScriptingSuite->DeleteJavaScriptEngine( jsEngineRef );
jsEngineRef = NULL;
But this does not work!I think the "CreateJavascriptEngine" method fails to work.Pls advice on this.Any help is highly appreciated.
Regards
myRiazAh, Illustrator 10? I'm afraid I can't help you then, there isn't an ASScripting.h header anymore, at least not in the CS3 SDK (nor in the CS2 SDK I believe).
If you're trying to use it in AI10 or CS it should still work I think. Beyond that, I have no idea. I'm not sure what the replacement is supposed to be. -
How to call pakage using Unix script
Hi,
I have created one package in Oracle(contains2 funcation and 4 procedure) which is in in xxx14database.
Now i can execute the package and its working fine at database level.
As per requirement ,i need to create on Unix script to trigger the package.
I have no idea how to create the Unix script to execute the package.
The Unix script need to created in xxxx001 Server.
Can anyone please let me know the template or any link which I can refer to create the same.
Or anyway i can create a script/batch on window and test first in my laptop and use the same script for my project work with required modification
Secondly the application owner asked me to give them both database and Unix script to them so that their database team will test the Package which i developed.
Database script meand the Package body and spec i should save as file.pkb format and send them or i can save them in .sql file and send them
Thanking you all in advance please help its urgent.Now that you know how to do it ... reconsider whether doing so is a good idea.
There is almost nothing you can do calling from a shell script that can't be done more easily from DBMS_SCHEDULER other than compromise security. Shell scripts connecting to the database are, as shown in the demo code, inherently insecure and, if you get enough of them, make it difficult to cycle passwords on a regular basis. -
How to call javascript using applescript in InDesign cs2 Mac
Hi,
I need to integrate javascript with my apple script??? how to use it???please help me...i need it immediately..........Hi Andrew,
Here is an example for you – a snippet from my script:
global myBridgeLabel
-- function that runs on clicking the button in adobe script studio project
on clicked theObject
if name of theObject is "b1" then
set processName to "Started working"
set myBridgeLabel to "Red"
set myLabel to 1
else if name of theObject is "b2" then
set processName to "Started doing this"
set myBridgeLabel to "Green"
set myLabel to 2
else if name of theObject is "b3" then
set processName to "Started doing that"
set myBridgeLabel to "Yellow"
set myLabel to 3
else if name of theObject is "b4" then
set processName to "Finished doing this"
set myBridgeLabel to "Blue"
set myLabel to 4
else if name of theObject is "b5" then
set processName to "Finished doing that"
set myBridgeLabel to "Purple"
set myLabel to 5
end if
tell application "Adobe InDesign CS2"
set mydocument to active document
set myDocumentPath to full name of mydocument
set workerName to "Kasyan"
tell metadata preferences of mydocument
set theDate to current date
set myWeekday to weekday of theDate as string
set myDenNedeli to my convertWeekday(myWeekday)
set myRecord to (processName & " – " & workerName & " – ") & myDenNedeli & " " & text 1 thru -4 of time string of theDate & " \r"
set myHistory to get property namespace "http://ns.adobe.com/photoshop/1.0/" path "History"
set property namespace "http://ns.adobe.com/photoshop/1.0/" path "History" value myHistory & myRecord
end tell
set myJavaScript to "var myLabel =\"" & myBridgeLabel & "\"; app.activate(); var bt = new BridgeTalk; bt.target = \"bridge\"; myScript = 'app.displayDialogs = \"none\"; var t = new Thumbnail (File (\"" & myDocumentPath & "\")); var mdata = t.metadata; mdata.namespace = \"http://ns.adobe.com/xap/1.0/\"; mdata.Label = \"' + myLabel + '\";'; bt.body = myScript; bt.send();"
do script myJavaScript language javascript
In this javascript I use pares of single and double quotes.
The main java script – myJavaScript – (inside double quotes) contains another java script – myScript – (inside single quotes) which runs in Bridge via BridgeTalk.
I also put variables from AppleScript into JavaScript by using two pares of double quotes – the outside pare I escape with slashes:
set myBridgeLabel to "Red" -- a variable I defined in AppleScript
set myJavaScript to "var myLabel =\"" & myBridgeLabel & "\"; app.activate();
-- the contents of myBridgeLabel variable now becomes part of the JavaScript
Kasyan
Maybe you are looking for
-
How to share an associative array throughout the entire instance?
Hi all, I have an associative array with much data, and it would barely change, I want to keep it in the memory and share it throughout the entire instance, and make sure all sessions of all users get the same associative array, is it possible? Thank
-
OBJECT SKIPPED while transporting the objects from DEV to QA.
Hi All, While transporting the objects to Quality, I'm getting a warning saying Objects are skipped. Can anyone please explain how to get rid of this error? We are facing this issue almost for all the transports which we are moving and the objects do
-
Dear Friends it is too urgent, I have to build a query where i want to select records from the tables dynamically from different users. i.e Suppose I have many users 'USER1' , 'USER2' , 'USER3'... AND SO ON. All users have same tables. suppose 'Emplo
-
Error credit control while using SAPMV50S in batch
Hi at all, I have a strange behaviour on the system (ERP 6.0 EHP4). I have an order to a customer, to the customer has been assigned a credit limit. Already at order entry appears a warning message, that the credit limit is overdrawn, So far, so good
-
Error 34506 in iDVD - same as many others
I have 127GB free space on the hard drive. All software is fully updated. I too am having problems burning DVDs in iDVD. I have confirmed that the drive works Ok by creating a small project of a few slides in iMovie, and burning it successfully in iD