Alexandre Folgueras

Ranch Hand
+ Follow
since Jan 22, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Alexandre Folgueras

Hi all, I'm using jDeveloper 10.1.3 to generate a web service proxy. Everything works great when I run the proxy from jDev... However, I deployed all the classes to a jar file and when I try to run the proxy on a server, I get a classNotFound Exception on a class that doesn't even exist in my project!

My project name: WebDialer
The stacktrace:

javax.xml.rpc.ServiceException: java.lang.ClassNotFoundException: com.capitale.techdspc.thread.logiphone.sw.proxy.WebdialerSoapLocator
at org.apache.axis.client.ServiceFactory.createService(ServiceFactory.java:321)
at org.apache.axis.client.ServiceFactory.loadService(ServiceFactory.java:237)
at com.capitale.techdspc.thread.logiphone.sw.proxy.WebdialerSoapServiceClient.<init>(WebdialerSoapServiceClient.java:18)
at com.capitale.techdspc.thread.logiphone.WebDialerThread$CallSWThread.run(WebDialerThread.java:175)



As I said, the class WebdialerSoapLocator does not exist in my project. It must be a "generated on the fly" type of class? Anyway, I'm probably missing something in my jar file ( But all the classes from my project are in it ). Maybe I'm missing a lib? But again, all the libs that jDev lists in the project are on the classpath when I try to run the proxy from the server.

So anybody knows what my problem is?

Thanks!
17 years ago
Hello, I need to develop a web service proxy that must run with a jdk 1.3. The reason for that is that I want the proxy to be loaded into the database as a stored procedure.

I use jDeveloper 10.1.3, I set the jdk to 1.3.1 in my project and generated the proxy. The problem is that, to make it work, jDeveloper has added libs such as xml.jar... Those libs are not compatible with jdk 1.3.1, I tried loading them into the database and got errors. I tried to do the same thing with Eclipse and it's the exact same thing: The libs added are not compatible with jdk 1.3.1.

So my question is, is it even possible to generate a web service proxy that will be run into an Oracle 9i database that uses jdk 1.3.1 ?

Thanks
17 years ago
Hello everyone, I'm new to web services so my question is general and may seem vague to some of you:

I need to code a ws client to access a secured web service over ssl ( https ). I have the wsdl file so I was able to generate a proxy ( with Oracle jDeveloper 10.1.3 )

Now, I do not want this client to run on apache/tomacat, Oracle Application server or whatever. I want to run it on a simple jvm that I will run with the java -classpath ... command.

So, keeping in mind that it is a secured web service the client is communicating with, is it achievable? If so, I guess I will need to add to the classpath different jar files that WS needs. And what about the certs I need?

If you have any anwsers and/or documentation on this, please dont hesitate.

Thanks in advance!
17 years ago
The server's doc actually says that I must encode the data, including the XML. But after reading your post, I tried not to encode it but it still does not work...

But if I copy the exact same encoded String that I am sending to the OutputStreamWriter and send it to the browser, it works!

Anymore ideas?

Thank you!!!
18 years ago
Thank you all for your replys, it is very appreciated!

First, I've tried to set the method to GET, but it still does not work... Second, for the securedURL variable that does not seem to be instantiated, it actually is, the method is part of a thread and all necessary variables were initialized before starting the thread...

The requests actually "talks" to the server because I'm able to read the error message the server gives me on the BufferedReader. It says ( Invalid input segments". The company who owns the server cannot offer me any support, but they told me that if I get this error, it's that I am not posting the request correctly ( the error is not the content of the request but the way I send it )

If you guys have anymore ideas, it would be greatly appreciated!

Thank you,
Alex
18 years ago
Hello all, I have an application that posts requests through an https connection to a web server. When everything goes well, the server is supposed to send me an xml file. Once my String is encoded and ready to be sent, it looks something like this:


InputSegments=%3c%3fxml+version%3d%221.0%22+encoding%3d%22UTF-8%22%3f%3e%3cCNCustTransmitToEfx+



So when I send it, I receive an error from the server saying that the request is incorrect. But when I copy paste the request String to the browser, it works great!!! So I can't figure out what is wrong here... I am posting my function hoping that somebody will be able to help me:




Your help will be greatly appreciated!

Alex

[ UD: added code tags ]
[ January 20, 2006: Message edited by: Ulf Dittmer ]
18 years ago
Hi all, I have an application that receives in parameter the path and name of scripts to execute. Untill now, I have 3 types of scripts: sh, csh and tclsh. All script files have all the permissions ( 0777 ).

Here is my code so far:


Runtime wShell = Runtime.getRuntime();
Process wProc = wShell.exec(cmd_unix_final);
wProc.waitFor();

extractMessagesFromStream(new BufferedReader( new InputStreamReader(wProc.getInputStream())), Server.outputFile);
extractMessagesFromStream(new BufferedReader( new InputStreamReader(wProc.getErrorStream())), Server.errorFile);

return wProc.exitValue();



The variable 'cmd_unix_final' contains only the path of the script and the name of the script + its parameters.

This seems to work correctly for sh and csh scripts. But when the application trys to run a tclsh script, I get the following exception:


java.io.IOException: /z/opus/pprd/jqmat100.tcl: cannot execute
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:62)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.execInternal(Compiled Code)
at java.lang.Runtime.exec(Compiled Code)
at java.lang.Runtime.exec(Compiled Code)
at java.lang.Runtime.exec(Runtime.java:151)
at com.capitale.opus.switcher.HandleRequestThread.executeUnixTar(HandleRequestThread.java:170)
at com.capitale.opus.switcher.HandleRequestThread.executeCmd(HandleRequestThread.java:104)
at com.capitale.opus.switcher.HandleRequestThread.run(HandleRequestThread.java:62)



Please let me know what you think and thank you very much for your help!
18 years ago
Hi there, anyone of you worked with Oracle Forms Services before? I'm looking for users comments. Oracle says that there are no performance issues running the forms as applets but I was wondering if any one of you guys tried it.

Also, I was wondering what kind of web applications Oracle Forms Services was made for? I'm under the impression that it's more for private uses ( Inside a company ). Is it safe to run those applets on the web in commercial sites? Is it appropriate?

My impression is that the applets generated by Oracle FDorms Services are not meant for the worl wide web.

Please give me your thoughts on this.
Thanks!
Hi there, anyone of you worked with Oracle Forms Services before? I'm looking for users comments. Oracle says that there are no performance issues running the forms as applets but I was wondering if any one of you guys tried it.

Also, I was wondering what kind of web applications Oracle Forms Services was made for? I'm under the impression that it's more for private uses ( Inside a company ). Is it safe to run those applets on the web in commercial sites? Is it appropriate?

My impression is that the applets generated by Oracle FDorms Services are not meant for the worl wide web.

Please give me your thoughts on this.
Thanks!
18 years ago
Turns out that the problem was only that the command line was bad because of the special characters. Works well now.

Thank you very much for your help!
18 years ago
Just to let you know... I made a few changes to my code and got and something interesting happened... Here is the change I made ( just declared my process differently ):
Process wProc = wShell.exec("/bin/csh "+cmd_unix_final);

Meanwhile, I've modified my script ( intfu001.csh ) so that it would print all the arguments it receives...

I caught the output of my script the following way:

BufferedReader err = new BufferedReader( new InputStreamReader(wProc.getInputStream()));
String line = null;

while ((line = err.readLine()) != null)
System.out.println("OUTPUT: "+line);


To my surprise, the arguments are ok. Even the characters '^' printed fine. But what was an even bigger surprise is that the 'normal' output also printed ( the normal output is what I get when the script runs successfully, the script first prints a few things and then does stuff that takes at least 2 or 3 seconds ).

So is it possible that my return code is sent before the script finishes his job? I did use waitFor() so it shouldn't...

Anyhow, here is my complete code, please let me know what you think:

...
Runtime wShell = Runtime.getRuntime();
Process wProc = wShell.exec("/bin/csh "+cmd_unix_final);
wProc.waitFor();

BufferedReader err = new BufferedReader( new InputStreamReader(wProc.getInputStream()));
String lineErr = null;

while ((lineErr = err.readLine()) != null)
System.out.println("OUTPUT: "+lineErr);


return wProc.exitValue();
}
18 years ago
I tried quoting the arguments and it did not work either...

But is it ok to run a csh script using sh like your first post suggested?

Really appreciate your help by the way!
18 years ago
Thank you for your response. I tried the code you suggested me. I'm still getting errors but they are different this time...

These are the errors I am getting ( not sure if it helps printing them here ):
/bin/sh: DEBUG: not found
/bin/sh: SINISIMU: not found
/bin/sh: STATPROD: not found
/bin/sh: DECTIDANC: not found
/bin/sh: 81: not found
/bin/sh: 503: not found
/bin/sh: 4080: not found
/bin/sh: 86: not found
/bin/sh: 87: not found
/bin/sh: 151: not found
/bin/sh: 97: not found
/bin/sh: 98: not found
/bin/sh: 99: not found
/bin/sh: N: not found
/bin/sh: N: not found
/bin/sh: SPRI: not found
/bin/sh: 0: not found
/bin/sh: 13: not found
/bin/sh: 19: not found
/bin/sh: 24: not found
/bin/sh: 3: not found
/bin/sh: J: not found
/bin/sh: 05: not found
/bin/sh: N: not found
/bin/sh: 19: not found
/bin/sh: 19: not found

Is it possible that I am getting these errors because I'm using sh in my command line and that the script is written in csh??? If so, must I use csh while executing the script from java? If so, is there an equivalent to -c, because if there is I cant seem to find it in the documentation.

Thank you very much for your help, it is greatly appreciated!
18 years ago
Forgot to mention that the script I'm trying to run is written in csh...
18 years ago
Thank you for your reply.

First of all, I dont get any error messages... All I get is the exitValue from the process. Success should return 0 but I always get 1 or 2.

cmd_unix_final is in deed a string and it contains the following:
/z/opus/dcap/intfu001.csh 'NODEBUG^NOTKPROF^NOSTACK' opus dcap JACQUES JACQUES '2625781' 'ORA$PIPE$001D00D70001' JOB^DEBUG^SINISIMU^STATPROD^DECTIDANC^81^503^4080^86^87^151^97^98^99 BUT^N^N^SPRI^0^13^24^3^J^05^N^19^19^19 >> /tmp/switcher8.999.null.pgm.test

I also tried eliminating the redirection but it does not do any goog, I still get an error.

Thanks a lot!
18 years ago