Michael Valentino

Ranch Hand
+ Follow
since Nov 01, 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 Michael Valentino

You can certainly attempt it with no experience, but as Peer said, it'll be much more difficult as it covers so many topics and standards. I wouldn't attempt it if you never worked with it and are just reading from a book, because most of it will not make sense. Practice it too! Get tomcat and Axis, get JBoss, or download a free trial of WebSphere from IBM and work with all those web services engines. Create, use, deploy, and modify all the web services that you can, and you will have a great head start. Then go back and read all you can about web services from the RMH book. Not only will you have a good understanding of web services, but now you have put them to use and should be more than ready for the exam.

Originally posted by Sonu TheKool:

QUOTED : "Remember that a WSDL document can define several different port and binding definitions that may share a common portType. Without a JAX-RPC mapping file it can be difficult to determine which WSDL port a J2EE endpoint is associated with."

I have always been confused about this statement ? Could anyone please let me know under what situations we would have multiple port and binding definitions sharing a common portType ?



Your portType is like your interface. It describes what the web service can do. The binding defines the operations that are available and the protocol used to access them. It's possible that you can have a web service that has multiple operations, but some are invoked using SOAP/HTTP at one endpoint, and others are invoked using SOAP/JMS at a completely different endpoint. Since you use the binding element to tell the service element how to bind your service to a protocol, if you're using two different transport methods (i.e. SOAP/HTTP and SOAP/JMS) at different endpoints, you'll definitely need two different bindings to describe that.
[ June 15, 2006: Message edited by: Michael Valentino ]
I don't fully understand exactly what you're trying to do, but it sounds like you have one application that uses a database, and you want to access that data from another application. Web Services is certainly an option, but others do exist; You could expose a stateless session bean to do the business logic of accessing the database. This would allow you to implement security based on who is accessing the database, rather than "all or nothing". A web service call may introduce unnecessary overhead and performance issues instead of going with an EJB.
2 things:
The mock questions in K&B's book are very similar to the real exam questions for good reason: they helped write the exam questions

Second, Don't mention the score to your employer. You don't have to release that to anyone, so why bother? if you got 100% on the exam, you aren't any more certified than someone that got a 54% and still passed. The fact that you didn't get a perfect score leaves room for the employer to prod on what you didn't get correct. This leads to negative tones in an interview/career discussion. You always want to put yourself in a positive light. Brag to your friends about the score, not to your boss/interviewer. Just say "I'm certified" which makes you sound competent while "I got an 80% on the exam" says "Yeah I passed, but I lack in some areas". While we know that's a good score, the employer may not care.

Think of it as a Pass/Fail course - if you received a Pass, why let anyone know whether you passed by 1 point, or 41 points? Doesn't matter.

I hope I drove that point home well enough
Log into the Sun certification database.
http://i7lp.integral7.com/sun

If you have never logged in before you'll need to create an account and you will need your Prometric ID number and I believe the Test center number. Both will be on the exam results printout that you received from the testing center.

Once logged in there's a link for "get logos". In there, you should find a link regarding the use regulations for the logos.
From my experience, on the exam whenever you don't physically SEE anything, it is assumed to be correct. Therefore, I would guess that if you see an assertion question to assume the program is being run with assertions enabled. It's been a while since i took the SCJP exam, but i believe it was stated when assertions were enabled/disabled, but i may be wrong on that.

As for your second question, on the exam, all code will have numbered lines. If the class definition for the first class is numbered 1 through 7 and the class definition for the second class is numbered 1 - 21 then they are assumed to be in different files.

Mock exams are great practice, but I find many errors or ambiguities in them. The REAL exams will always be crystal clear in what to do. I have not found a problem with clarity in any of the 4 exams which I've taken yet.
[ June 14, 2006: Message edited by: Michael Valentino ]
Since bitwise operators work with bits... not knowing the binary number system and trying to understand binary operations makes no sense. Quick answer: XOR returns 1 if the bits are different, and 0 if the bits are the same, so

8^7: 1000 XOR 0111
1000
^0111
------
1111 = 15 or 0xF

You should really learn the binary and Hexadecimal number systems if you even want to consider working with bitwise operators, or else the above will never make sense.

A quick tutorial on decimal to binary conversion:
to convert a number to binary, you're summing up the powers of 2 that make up that number.
Start dividing the number in question by 2 and write out the remainders from RIGHT to LEFT. continue until you get to 0.
take 8 for example... 8 % 2 = 0, divide by 2 for next step 8 / 2 = 4.
number so far: 0

4 % 2 = 0, 4 / 2 = 2.
Number so far: 00

2 % 2 = 0, 2 / 2 = 1.
Number so far: 000

1 % 2 = 1, 1 / 2 = 0 (integer division ....)
Number so far 1000

Lets do it for 7.
7 % 2 = 1, 7 / 2 = 3 (integer division...)
Number so far 1

3 % 2 = 1, 3 / 2 = 1 (integer division...)
Number so far: 11

1 % 2 = 1, 1 / 2 = 0 (integer division...)
Number so far: 111

Padding the left hand side of a positive number with 0 doesn't change the value so 111 == 0111.

So now you have the binary numbres, and to do the XOR, line then up one on top of another:

1000
0111
----

Compare the top and bottom bits, if they're the same, the value is 0, if they are different, the value is 1. So the result is 1111 for the above.

Now to convert back to decimal, understand that the binary value represent the powers of 2. The rightmost (least significant) bit represents 2^0. The next bit represents 2^1... and so on. To convert 1111, we sum up these powers of 2.

1111
(1 * 2^3) + (1 * 2^2) + (1 * 2^1) + (1 * 2^0) =
1 + 2 + 4 + 8 = 15
[ June 14, 2006: Message edited by: Michael Valentino ]
That's good to see another book on the SCJP. I use many books when studying for certifications, so it's nice to see some more options. Though... one thing does bug me a bit... if you are a true beginner to the language and can't even write a simple HelloWorld... why would you even think you're read to be certified? Not knocking the book though, I'm sure it's great
Before you do that, read the rules and regulations regarding the use of the logo. You may put the logo on your resume if you find that it is in compliance with those usage guidelines.

After that, how you do it is a matter of which word processor you're using... You could also have a special letter head made up at a local office store such as Staples or OfficeMax or Kinkos (provided you follow the rules and regulations on using the logo on "personal stationary").
class GFC500 {private String name;}
class GFC501 {
private String name;
private void setName(String name) {this.name = name;}
private String getName() {return name;}
}
class GFC502 {
private String name;
public void setName(String name) {this.name = name;}
public String getName() {return name;}
}

Which class is not tightly encapsulated?
a. GFC501
b. GFC502
c. GFC503
d. None of the above

GFC500 totally encapsulated because you can't access the member 'name' at all.

GFC501 totally encapsulated because you can't access the private member 'name' with a private method. No different than GFC500

GFC502, while it is encapsulated, it's not a good encapsulation because the set method allows any value to be set for name. It's as if the member 'name' were public.

Tight encapsulation will not only protect direct acess to data members, but will also prevent those members from being set to improper values. Signs of tight encapsulation might be: Read-only members (only has a getter), or setters that look like:

where the integrity of the new value is checked in some way.

Hope that helps you
<hr></blockquote>

first loop:
in the first iteration, i is assigned the value of arr[0], which is 1. the line arr[i] = 0 is executed, so now arr[1] = 0. arr is now {1, 0, 3, 4 }. The output to the screen is: 1 0

Second iteration, i = arr[1], so i = 0. arr[i] = 0 executes so now arr[0] = 0. arr is now {0, 0, 3, 4 }. The output to the screen is: 0 0

Third iteration: i = arr[2] so i = 3. arr[i] = 0 executes so now arr[3] = 0. arr is now {0, 0, 3, 0}. The output to the screen is: 3 0

Last iteration: i = arr[3] so i = 0. arr[i] = 0 executes so arr[0] = 0. arr is now {0, 0, 3, 0}. The output to the screen is: 0 0


Finally, the second for loop executes and prints out the modified array. In the code, at each iteration, i is assigned the next value of arr[]. If you followed the first loop, the values in the array at this point should be clear: 0030.

So the final output should look like this:


Make sense?
[ June 13, 2006: Message edited by: Michael Valentino ]

Originally posted by Justin Fox:




Well, it's the wrong way to do it but, with a few adjustments, this will work....

1) Your constructor can't return anything... don't return int (and the Node references should be Node instead of "node".
2) You don't need getters and setters if your members are public.. as they are in your Node class.

That being said, I MUST say this:
It's a poor implementation of something that is already provided to you by the Java API. It's fine if you want to "tinker" with the language, but if you're actually writing a program to be used anywhere but on your personal machine, this is not the way to do it. Refer to the Java API on Lists and ListIterators. All the work is done for you... you just call the methods. Simple.

Hope that helps
15 years ago
Whether the exam is updated for Java EE 5 or not, I still think this is one of the best certifications to obtain. Though the JEE 5 web service API will be much different than the J2EE 1.4 API, most srvices for a good while will be developed in J2EE 1.4 due to the fact that The industry will take a long while to convert to JEE 5. Not only that, but with the differences in SOAP 1.1 and 1.2, and WSDL 1.1 and 1.2, You're looking at HUGE interoperability problems even between 2 java apps: one running 1.4 and the other running JEE 5.
Web services and SOA is moving at the speed of light, while platform and enterprise upgrades are moving at the speed which business allows. I think it will be a while before Java EE 5 based Web Services will even play a part in this arena. With that, I'm in no rush to see a SCDJWS for Java EE 5. It would be useless as no one would be using it.
Hi Justin,
I'm not exactly sure what you're trying to do... Could you repost and explain your problem a little bit better? If you're referring to Windows Dynamic Link Libraries... Java doesn't support them. If you're talking about a doubly linked list you can create any List type object (i.e ArrayList, LinkedList) from the java.util package and use a ListIterator to iterate through the list, forward and backward. See the API docs for more information on how to use java.util.List and java.util.ListIterator
Java 5 API Documentation
15 years ago
In regards to the original question: The question asks if you can configure the stub returned by getPort() - which is generally a stub to a service endpoint intereface. The answer to that is definitely no - you shouldn't try to configure this stub. The documentation you pointed us to talks about configuring a Call interface, which you certainly can configure.