Anthony Smith

Ranch Hand
+ Follow
since Sep 10, 2001
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 Anthony Smith

If so, is it something that you are willing to share? I'm trying to get some ideas for my company. This is for your internal developers, not for your 3rd party tools that your company may have for the outside developers.
10 years ago
Any ideas? I am using python to make the web service call.



Traceback (most recent call last):
File "C:\SOAPpy-0.12.0\tests\simpleWSDL.py", line 19, in ?
temp = proxy.getCurrPrimAssignRoles('411161')
File "c:\python24\Lib\site-packages\SOAPpy\Client.py", line 470, in __call__
return self.__r_call(*args, **kw)
File "c:\python24\Lib\site-packages\SOAPpy\Client.py", line 492, in __r_call
self.__hd, self.__ma)
File "c:\python24\Lib\site-packages\SOAPpy\Client.py", line 406, in __call
raise p
SOAPpy.Types.faultType: <Fault env:Server: Exception during processing: javax.xml.soap.SOAPException: Found SOAPElement [<v1 xsi:type="xsd:string">411161</v1>]. But was not able to find a Part that is registered with this Message which corresponds to this SOAPElement. The name of the element should be one of these[string] (see Fault Detail for stacktrace): <SOAPpy.Types.structType detail at 16468448>: {'stacktrace': 'javax.xml.soap.SOAPException: Found SOAPElement [<v1 xsi:type="xsd:string">411161</v1>]. But was not able to find a Part that is registered with this Message which corresponds to this SOAPElement. The name of the element should be one of these[string]\n\tat weblogic.webservice.core.DefaultMessage.toJava(DefaultMessage.java:478)\n\tat weblogic.webservice.core.handler.InvokeHandler.handleRequest(InvokeHandler.java:93)\n\tat weblogic.webservice.core.HandlerChainImpl.handleRequest(HandlerChainImpl.java:143)\n\tat weblogic.webservice.core.DefaultOperation.process(DefaultOperation.java:535)\n\tat weblogic.webservice.server.Dispatcher.process(Dispatcher.java:204)\n\tat weblogic.webservice.server.Dispatcher.doDispatch(Dispatcher.java:176)\n\tat weblogic.webservice.server.Dispatcher.dispatch(Dispatcher.java:96)\n\tat weblogic.webservice.server.WebServiceManager.dispatch(WebServiceManager.java:98)\n\tat weblogic.webservice.server.servlet.WebServiceServlet.serverSideInvoke(WebServiceServlet.java:297)\n\tat weblogic.webservice.server.servlet.ServletBase.doPost(ServletBase.java:485)\n\tat weblogic.webservice.server.servlet.WebServiceServlet.doPost(WebServiceServlet.java:267)\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:760)\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:853)\n\tat weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:998)\n\tat weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)\n\tat weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)\n\tat weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6508)\n\tat weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)\n\tat weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)\n\tat weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3717)\n\tat weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2630)\n\tat weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)\n\tat weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)\n'}>
14 years ago
Anyone know of one? I user WSDL2Java in Eclipse and it is awesome, but I would like the same ability for an XSD.
I have a class that implements Runnable. The main method of this class just starts threads. When any of the threads complete, I want the program to stop. How do I do this?
I was reading about the non-blacking IO and ran into the nio classes. I am still a bit confused by it.

I started off with learning the EchoServlet that floats around on the net, but I am not sure how to make it non-blocking. I do understand the EchoServlet though

Any good resources someone can point me to.

import java.io.*;
import java.net.*;

public class EchoServer
{
private static final int port = 8080;

public static void main(String args[])
{
ServerSocket serverSocket = null;
String input;
DataInputStream is;
PrintStream os;
Socket clientSocket = null;

try
{
serverSocket = new ServerSocket(port);
}
catch (Exception e)
{
//Ideally a better message
e.printStackTrace();
}

while (true)
{
try
{
//Single Treaded
System.out.println("EchoServer started. Now accepting connections.");
clientSocket = serverSocket.accept();
is = new DataInputStream(clientSocket.getInputStream());
os = new PrintStream(clientSocket.getOutputStream());

while (true)
{
input = is.readLine();
//Use StringBuffer's reverse method
StringBuffer inputBuffer = new StringBuffer(input);
StringBuffer reversedInput = inputBuffer.reverse();
os.println(reversedInput.toString());
}
}
catch (IOException e)
{
//Ideally a better message
System.out.println(e);
}
}
}
}
package intltech.autopay.utils;

import java.util.Collections;

public class MyCollection extends Collections
{


}

What can I do to get this to compile?
14 years ago
I have 2 nu.xom.Elements. How do I combine them into 1 nu.xom.Element?
Thanks.

setDaemon
Marks this thread as either a daemon thread or a user thread. The Java Virtual Machine exits when the only threads running are all daemon threads.

So I should make it a daemon thread so that I can shut my application server (Tomcat) down whenever I want?
14 years ago
I have a process that will take a long time. Longer than the browser timeout feature. I was thinking that I could just spawn a thread to handle the process. Is that possible/acceptable? I don't recall ever seeing this done.

Is there a better way?
14 years ago
This is the Jakarta Commons Threadpool
I am not sure how to make my program exit after all the threads have been completed.

I have a way of know when they are all complete.

ThreadPool threadPool = new DefaultThreadPool(25);
//There is a static variable called size size = myObjects.size()
for (a = 0; a!= myObjects.size(); a++)
{
threadPool.invokeLater(new FancyObject(a));
//a just tells which obj from the array
}

in my run method (My class extends Runnable)

public void run()
{
//Do your job

//Now check to see if you are the last thread... if so... terminate
if (i = (size - 1)
{
//quit
}

}


//Now if 5 finishes before 4 and 5 is the last object, the program will terminate before 4 finsihes. I just want the program to shutdown when all threads are finished.
Is this possible in ANT?


Right now my snippet looks like this:

<input message="Enter Password" addproperty="password"/>

I would like the input masked or just not showing up. I don't want it to be shown on the screen.
14 years ago
What is the best way?

String amt = el.getAttributeValue("amt");
double amtVal = 0.0;

amtVal = Double.parseDouble(amt.trim());


amt.trim() needs to be replaced with something like:

amt.trim().replace("," , ""); //This won't compile...

I have heard something about the DecimalFormat, but I don't know if this applies..
14 years ago
I just wanted you all to know that I did look in previous posts for this topic, but I never found what I was looking for design wise...

I was reading some stuff about the Factory Pattern and creating objects. I have this object... called school.

Well right now it is a class that other classes extend... HighSchool, MiddleSchool, PreSchool, etc...

We all schools have a principal, address, etc.. members. They all have the getters and setters to go along with those members. That tells me that I don't need a abstract class or an interface because 1) I want to be able to pass the School object around. I cannot do that if it is an abstract class. If the School object is an interface, I dont want to write a getPrincipal and setPrincipal for each subclass. But I do want certain methods that each subclass should provide the details for... Like enrollStudent method. What do I do in my SchoolClass? Create an empty enrollStudent? Now if I do that, I take a chance of someone not implementing their own enrollStudent method.

What are my options?
14 years ago
Anyone done this before? It seems as if Monster, Yahoo, and Careerbuilder have designed their sites to prohiit alot of this.
14 years ago