Lawrence Gatson

Greenhorn
+ Follow
since Oct 25, 2010
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
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Lawrence Gatson



Thanks for the reply.

I downloaded SoapUI, unfortunately I'm getting a "BadContextToken" returned in the response from the server.

The error log on the client is empty and the SoapUI log just amplifies the soap message.

I couldn't figure out how to configure SoapUI to capture/view server logs (I submitted a request to get a copy of the server logs).

I'm not sure that I configured the request properties correctly (I've tried different combinations of them all):

Properties:
Authentication Type (preemptive, ntlm, ...)
WSS-Password Type (Password Text, Password Digest, None)
The request must contain an encrypted username/password


Any suggestions?

Thanks,
llg

10 years ago

I'm new to webservices and I'm getting a read timed out error (see stacktrace below). I'm stumped, if someone can please assist me!!


Here's my configuration:
Using Eclipse IDE
Downloaded and installed Axis2
Running in Axis2 as a stand alone server (i.e. I'm not using Tomcat)
Used the WSDL2Java utility to generate client stubs
Java 1.6_27 (I did import my certificate in the Java cacerts file using the java keytool utility)


Here's my Main test driver:






The stacktrace:

Mar 19, 2014 11:09:31 AM org.apache.axis2.transport.http.HTTPSender sendViaPost
INFO: Unable to sendViaPost to url[https://tstpatlookup.thechildrenshospital.org/Interconnect-PatLookup/Wcf/Epic.EMPI.GeneratedSErvices/Patient.svc]
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at com.sun.net.ssl.internal.ssl.InputRecord.readFully(InputRecord.java:293)
at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:331)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:798)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:755)
at com.sun.net.ssl.internal.ssl.AppInputStream.read(AppInputStream.java:75)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:78)
at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:106)
at org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1116)
at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.readLine(MultiThreadedHttpConnectionManager.java:1413)
at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1973)
at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1735)
at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1098)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:621)
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:193)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:404)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:231)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:443)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:406)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
at org.tempuri.PatientStub.patientLookup(PatientStub.java:781)
at org.tempuri.WebServiceMain.doLookup(WebServiceMain.java:49)
at org.tempuri.WebServiceMain.buildHeader(WebServiceMain.java:30)
at org.tempuri.WebServiceMain.main(WebServiceMain.java:77)


Thanks,
llg

10 years ago
Thank you for the response; I'll continue down this path with your suggestions...I agree, I wish I could get my hands on the build script. -llg
12 years ago
I've been doing core java for awhile. I'm kind of new to web environment...

To be more specific new to generating WAR files.

My development environment is Windows, Eclipse and Tomcat.
Target environment is Unix and WebLogic.

I've updated and successfully tested 3 java classes and 1 JSP in an existing web application. Now I'm ready to build the war file and deploy it on the test environment on Unix.

The [grumpy] systems administrator instructed me to build the WAR file as follows (he is unaware if a Build.XML file exists):
1. In Windows, use the 7zip application to "browse/explore" into the [existing] WAR file
2. Drag and drop the updated class files and jsp file from Tomcat into the WAR file

The WAR file deployed on Weblogic, and the web app did came up, but the [JSP] page that I updated is not rendering. The sys admin is blaming my code, but I don't think that is the problem.

My question is: Is this a valid way update a WAR file?

Thanks, I just need validation. If this is a valid way to update a WAR file then I'll continue down this path.


12 years ago
not sure, how can i tell?

I'm using Java 1.6, my import list is:

import javax.xml.parsers.*;
import org.w3c.dom.*;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
13 years ago
Interesting, however nowhere in the code do I explicitly call file.open().

However, before the call to "move", I need to parse the XML file to determine the correct destination; I do this by creating a DOM object to read the needed data.

Could this DOM object be holding on to the files somehow? I'm not aware of a need to "close" a DOM object, should I? Also, the move call is working, it copies the file to the destination directory AND removes it from the source directory. Unfortunately it also throws the IOException.

Some additional info...my code runs inside of a thread that wakes up every TBD seconds (currently set to 20), reads the contents of a source directory and moves all files to different destination directories. I don't see how this could be causing the IOException.

Thanks for your response.

lg
13 years ago
Hello,

I am using ApacheCommons "FileUtils.moveFile (<file>, <file>) to move an XML file to a destination directory...

The call to "MOVE" seems to be working; however for each call to move the file I'm getting an IOException thrown with the following message...

Failed to delete original file 'C:\Temp\sourceDir\print\<filename>' after copy to 'C:\TEMP\destinationPolicy\<filename>

Does anybody have any idea why this is happening and how to prevent the exception?

Thanks
lg
13 years ago
I'm attempting to implement logging with Java 1.6; my past experience has been with Apache's Log4j.

Statement: Log4j allow's for a "rolling log file" created on a daily basis.
Questions: Does java logging also provide this capability (i.e. rolling to a new log file at midnight)? If it does, might you have a code example that I can look at?


Thanks!
13 years ago
I'm a newbie to Java/JDBC, I'm having trouble connecting to MSSQL Server...hopefully someone can assist:

I downloaded the jtds JDBC driver from Sourceforge.net (type 4 driver)

Key parts of the code follow:



I've also configured the eclipse build path to include all the jars contained in the JDBC
driver zip file (I also tried to configure the build path with just the JDBC driver zip file).

I'm getting following SQLException:
java.sql.SQLException: No suitable driver found for jdbc:jtds:sqlserver://<ip_address>:<port>/<database_name>

I've exhausted my background and knowledge...can someone please help!!!