Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link

Natalia Lopez

Ranch Hand
+ Follow
since Feb 17, 2005
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 Natalia Lopez

Nitesh,
Thanks a lot for your help, in fact I was trying to find somthing simple, a daemon tool where I can configure the local folder and the ftp folder where will goes to be the last file versions.
Then once a day the daemon detect changes and download if necesary from the ftp.

I go on searching and if not possible to find a simple tool I will go with the code :|

Regards

Natalia
13 years ago
Hi
Thanks for your response!
The application runs several times during day.
So I think the best choice a daemont application on the backgraound checking for updates once a day.
For this reason I'd like what you say

"(This is based on the assumption that your program is not a deamon that always runs in the background. If it is a deamon then it is easier, you can use a Timer within your program to schedule a update check(pull model) OR you can configure your server to be aware of the clients and "push" the updates when available.)"

How I do this?

Thanks a lot again

Naty
13 years ago
Hi!
I did an application in java that is installed on 100 clients, the application is an exe and a config.ini file.
The topic is that this two files need to be updated once per month.
How can I do to check for update this two files. I can't use web start, because is really slowly and the application runs several times during a day.
I need sumething like goodsync but this one is really complex. I need an application that run allways checking for updates on a server about changes on this two files, and when changes become true, download the file that changes.
That all!
If somebody have any idea please let me know how can I do!!!
Regards

Naty
13 years ago
Nice, yes you are right I'm using JBuilder but is the same exist a class called ServiceTestCase with all the code I was needed.
I couldn't remmembered that the last web service I developed was 2 years before!!!
Thanks a lot

Natalia
14 years ago
Hi!
I have a client application in Java and I need to connect to a webservice done in .NET, the service send 2 parameters and return 3 parameters as a response.
I haven't got experience with webservice on .net I was trying without success some examples with axis library. Anybody can send me some tutorials or examples with web services using multiple parameters?
Thanks in advance

Natalia
14 years ago
Hi!
I'm trying to install tomcat5 on fedora

I did

yum install tomcat5
/etc/init.d/tomcat5 start

but when I go to http://myip:8080

The tomcat is not running
I can see on the logs:...

Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.

How can I fix it?
Thanks a lot!
14 years ago
I tried doing this

ws.generated.PruebaSoapBindingStub binding;
try {
binding = (ws.generated.PruebaSoapBindingStub)
new ws.generated.PruebaServiceLocator().getPrueba();
}
catch (javax.xml.rpc.ServiceException jre) {
if(jre.getLinkedCause()!=null)
jre.getLinkedCause().printStackTrace();
throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
}

try {
// Time out after a minute
binding.setTimeout(600000);



// Test operation
String value = null;
value = binding.getMessage("hello");


System.out.println("--> " + value);

}
catch (Exception eb){
eb.printStackTrace();

}

and is the same I obtain


AxisFault
faultCode: {http://xml.apache.org/axis/}HTTP
faultSubcode:
faultString: (0)null
faultActor:
faultNode:
faultDetail:
{}:return code: 0

{http://xml.apache.org/axis/}HttpErrorCode:0

(0)null
at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:744)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2765)


Any idea?
15 years ago
Hi I have the following code to get a response from a web service

ws.generated.Prueba binding;
try {
binding = new ws.generated.PruebaServiceLocator().getSaludar();
}
catch (javax.xml.rpc.ServiceException jre) {
if (jre.getLinkedCause() != null) {
jre.getLinkedCause().printStackTrace();
}
throw new junit.framework.AssertionFailedError(
"JAX-RPC ServiceException caught: " + jre);
}

try {

String value = binding.getMessage("hello");

System.out.println("--> " + value);

}
catch (Exception eb){
eb.printStackTrace();

}


This code is working ok if the response came back in 10 seccond, but when the webservice response delay more than 20 seconds I get the following stack trace exception

AxisFault
faultCode: {http://xml.apache.org/axis/}HTTP
faultSubcode:
faultString: (0)null
faultActor:
faultNode:
faultDetail:
{}:return code: 0

{http://xml.apache.org/axis/}HttpErrorCode:0

(0)null


What can I do to avoid this error and wait for a maximun time of 40 second for example?

Regards

Natalia
15 years ago
Yes it is true, the code can be waiting forever. How did you do de main tread to consider a time out? and where did you set the time out?

Naty
Hi!
I need to send a text to a socket and I should receive the responde in no more than 20 second. The following code send the text ok over the socket but delay sometimes 35 second receiving the response.
It seems that not check the socket all the time and the response arrived too late.
How can I read more quick from the socket?

Here the code


try
{
socket = new Socket(hostname,port);
System.out.println("Connected!!");


String request = "Hola";


InputStream in = socket.getInputStream ();
OutputStream out = socket.getOutputStream();

writeToSocket(socket,request, out);

StringBuffer response = new StringBuffer();

byte[] b = new byte[4096];

for (int n; (n = in.read(b)) != -1 {
response.append(new String(b, 0, n));
}


System.out.println("RESPONSE: "+response.toString());


in.close();
out.close();
socket.close();

}
catch (IOException e)
{


e.printStackTrace();
}


Some body can give me and idea Thanks a lot!
Natalia
I'm agree with you but I wonder if there is a way to wait for a long time from my client Application ? There is a way wait indefinitely indefinitely from client application a webservice response?

Regards
Naty
15 years ago
Yes I did but I'm sure that the problem is with the response delay.
I did a new webservice with this inside

System.out.println("goin to wait");
try {
Thread.sleep(45000);
} catch( InterruptedException sexep ) { }

System.out.println("finish waiting");


If I change 45000 to 20000 there is not problem and the desktop application get response. With The 45000 I received the error
junit.framework.AssertionFailedError: Remote Exception caught ...............

Any idea?
Regards

Naty
15 years ago
Hi!
I did a webservice that is working ok in java, in fact are 3 services each one make a diferent function.
I did a client application too, that connect with webservice 2 are working ok, but one of them delay 35 seconds to answer and the client Application crash with the following error
junit.framework.AssertionFailedError: Remote Exception caught: (0)null
at ws.appClient.Frame.ProcesarCarga_actionPerformed(Frame.java:185)

...
What can I do, is any possibility to set a long time to Application to evoid the exception anda wait more time for the response?
Regards

Natalia
15 years ago
Hi!!
I have a desktop application that connect to internet webapplication with something like
http://mydomain/Petition.do?user=QWWE2&cant=2

I need that action return an xml file to the desktop application, is that�s possible? Where can I find information or examples!
Regards

Naty
15 years ago