Tyler Wright

Ranch Hand
+ Follow
since Jun 25, 2009
Merit badge: grant badges
For More
Atlanta, Ga. USA
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 Tyler Wright

hmmm...well, you know, I can do that.

I know one of their engineers who work with me to get this whole system to work together.
He may be able to help out...that's worth a try...maybe even if he can't, he may have an in with someone who can help.

Good Idea!
11 years ago
Hi Paul,

Thanks for you help.

I'm pretty sure that it's WSDL's responsibility to do XML escaping and not yours.


That's what I had thought, but I wanted to hear "absolutely" it is the WSDL's job.

I did get them to set it back to the original password and that worked fine.
But, when they set it to "!&*45ty$$", I got the 403 Forbidden SOAP response.

I can't just keep asking them to change their password and then retry. That makes us look like idiots.
Oh, well, I will keep researching the issue.

If you find anything that explicitly says the WSDL is supposed to handle escaping characters, I would appreciate it very much.

Actually, I just looked at the password that it was reset to, I mistyped it in the post. It should be: "/!&*45ty$$".

Thanks for your thoughts...
11 years ago
Let me give you more.

We have a provisioning system that communicates with another system (from another company, they gave us a WSDL we generated the client from it).
For a year everything has worked fine. Then they issued us a new password. The old password had no special characters in it (xml special characters) only characters and ordinals and dots.
eXAMPLE: r8.KLu90tY

The new password has special characters in it. When I tried to use our system to talk to theirs I get a 403 error (Forbidden).
I have called the other company and they confirmed the new password was correct. Multiple tries have failed.
I called them and asked them to set the password to one with no special characters and everything went back to working.

So, my theory is that the client classes generated from a SOAP WSDL do not (by default) do character escaping.

I am trying to confirm this with someone who knows more about the SOAP protocol, WSDLs, and WS than I do.

If soap classes generated from a WSDL are supposed to do character escaping (by some spec), then I can tell the other company about the problem and we don't need to do anything.
We are the only user of their software for this product.
If the strings need to be escaped in our code then OK, I can do that. Actually, I did not write this code, I have was awarded Thursday morning and I have been trying to figure it out.

I do not have a lab to test this in as this is their standby production system.
So, I am trying to determine which side the problem is on so I can not look to stupid to my boss.

I cannot just write a new class an deploy it to our server to test because that is against policy. It would have to be an authorized deployment.
11 years ago
I should have said " do I need to escape special characters or will the client side WS generated class do it for me? "

11 years ago
I guess I did not make my question clear.

Example:

A WS client, generated from a SOAP WSDL, has a generated class:




The code I wrote accepts a string "!&*45ty$$" from another source. My code then instantiates SendMe and then invokes send( "!&*45ty$$" ) and gets the ResponseObject back.

The question is, do I need to do conversion of the special characters in the string "!&*45ty$$" or can I pass it raw and expect the WS generated class SendMe to do the conversion?

I hope this is clearer...

Tyler
11 years ago
Hi All,

I had thought that a SOAP wsdl generated client would be able to handle special character conversions when it sent data to the WebService.
But, I am seeing a problem that makes me think this is not correct.

Example:
A wsdl generated class has a method that takes a string which is a peice of data to be sent to the WebService.
The string is "!&*45ty$$" (without quotes).

Do the special characters need to be converted by me before I pass them to a wsdl generated class?

thanks,
Tyler
11 years ago
Thank you for your help Peter...I will look at MAVEN.
12 years ago
Hi all,

I am new to ant and I am sure someone has solved this point.

I am trying to dynamically add all the jars in my lib dir to my Class-Path variable in my distribution jar.
So, I have all my 3rd party jars in a directory 'lib'. I want to read the directory for the jar file names (simple name with no path).
Then iterate through the list of jars prepending a path that will exist in the runtime environment.

Please if you will be so kind as to given very detailed example of how to do this, that would help me a great deal.

Many thanks in advance.

Tyler
12 years ago
Hi Avi,

I am using the Informix driver. I have looked through the IBM forums and documentation on this driver (such as it is) and could not find anything specific as to how the driver is managing the result set returned; that is wheather it is actually in the database cache and sent one row at a time to the client per invocations of next() on the RS or if the entire match set is returned to the clent.

I guess this is the crux of my question.

thanks for you information...if you can give me anything more, I'd appreciate it.

Tyler
Hi all,
I know this question has probably been asked a thousand times; but, I need to really understand this quickly.

When a resultSet is returned with a fetchsize = 1000, <i>for example</i>, where is the data that matched the query?
1. Is it in the JVM memory (all 1000 rows)?
2. Is it on the database server and retrieved one row at a time by the the next invocation on the ResultSet object?
3. some other mechanism?

Also, if a query produced 10,000 row matches against a specific table and the fetchsize = 1000, how is the next group of 1000 rows acquired by the resultSet...I have read the java docs and a number of other sources and frankly, I am more confused now than when I started.

I thought that the ResultSet was a cursor...and that it was an index into a row oriented collection of data that is in the database memory and that when next is invoked on the ResultSet in the jvm, it moves a row of data from the db server to the JVM memory. I have been told this is NOT true.

Please help.

Your help is much appreciated and if you can state things simply then I can understand better.

Thank you,
Tyler.
Hi all,

In various publications, I have observed that there is discrepancy about the order of these 2 life-cycle methods for both classic and simple tags:


The majority of study guides etc say setParent occurs before setContext; however, just as many guides that say setParent is called after setContext



I have seen practice exams that specifically asked this question...and even the practice exams do not agree on the order of these two methods.

1) Is the order of the setParent and setContext method with respect to each other important for the exam?
2) Is there a correct order to the method invocations?

thanks,
Tyler.
Hi all,

1) JSP scripting elements are very jsp translation to java class oriented.
2) JSP delcarations are class or instance variables
3) JSP scriptlet variables are local vars.
This is clear...if you look at compiles JSPs this is crystal clear.

Now:
JSTL action tags cannot access any JSP declaration or scriptlet variables unless those variables are placed into a scope and of course the default scope is page scope.

So, this means JSTL communicates to other JSTL elements only through scope.
The means by which variables are declared and removed from scope using only JSTL is with <c:set> or <c:remove>.

Is this conceptualization accurate?

I have more to add but, let's see how this flies...

Oh one more thing...looking through the java file for a scriptless JSP page which uses only JSTL, reveals that all of the manipulation of data occurs in the methods that were inserted into the file per the use of JSTL.
Each of these methods, seems to be very self contained and communicate only through the "scoping" mechanism.
Hi all,

Thanks for the quick response...I coded this up based upon your responses:


Which produced this in the browser:
In the browser:
**********************

this is c:out escapeXml="false" :
& %amp;

this is a test

this is c:out escapeXml="true" :
& %amp; <p> <html><table><th>this is a test</th></table></html>


***************************

But, the view source produced:

<p>
this is c:out escapeXml="false" :<br>
& %amp; <p> <html><table><th>this is a test</th></table></html>
</p>

<p>
this is c:out escapeXml="true" :<br>
& %amp; <p> <html><table><th>this is a test</th></table></html>
</p>

*****************************************************
My confusion with this came from the browser's presentation; I forgot about the source....

Thanks for clarifying this...it was really bugging me.

PS: To see what is really going on here, the jsp code should be executed and the results viewed your browser and the source viewed with your view source...in this post the entityReferences are automatically translated to their HTML presentations so the effect is lost.
Hi Folks,

For question 1 on page 378 of Charles Lyon's "SCWCD Study Companion":

The answer is given as C...

Note: I had to put the entityReferences as &_amp; and &_lt; inorder not to have them translated into '&' and '<'
*************************************************
When I ran this in tomcat 5.5.x.x I got:
'Facts & Figures: 5 < 6'

If you try this at home remember to include the taglib directive:
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>


Am I missing something?

Tyler...
Hi Nabila,

You are putting me on the spot...but, that's OK.

I cannot recommend Lyon's book at this time: I am only half-way through it.
Once I have completed it, I will post a review at Amazon and on JavaRanch.

If you have the time, you can use the free study guides found here at JavaRanch to get you started on understanding the basics of Servlets and JSPs.

Also, I have seen a number couple of free and very good tutorials on-line.

One note of caution, besure to confirm that the material you are studying is Servlet 2.4, JSP 2.0, and JSTL 1.1.

regards,
Tyler