Andre Kuntze

Greenhorn
+ Follow
since Jun 29, 2011
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
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Andre Kuntze

It was a persistence problem as I did not create any EJB or similar to keep the data. So it always shows false instead of true.

Greetings
André
12 years ago
Hi Wouter Oet,

thanks for the answer. I really like the Blackbelt Factory and it is a nice way to learn Java. But I think my approach is a bit different as the Blackbelt factory focuses on the theoretical knowledge as far as I can tell by now - even if you have to analyze code.

It is more like this concept: Coding Kata - but on a more basic level like Kihons which you later combine as Katas.

But thanks for the reminder. I just saw that there is a table of content for many of the courses and I think I can get some inspiration there.

Greetings
André
12 years ago
Hi everybody,

I spend some time doing AikiDo and Jiu Jitsu. Some concept we had to describe some skill levels was Shu Ha Ri@AikiDo FAQ.

The point of Shu, is that a sound technical foundation can be built most efficiently by following only a single route to that goal.



I think that this could be applied to coding skill also. Let's see coding as an activity which needs practice and repetition to improve. In Jiu Jitsu there are the different belts and if you wanted to reach the next level you had to repeat techniques again and again till they become second nature like driving a bicycle. After each belt you combined the basic techniques from the lower levels and add some new stuff to defend again different attacks.

Let's say this could be applicable to coding - which still has to proven in my opinion but I would like to try it out - what would be the techniques you could use?

Here are some ideas / examples which came into my mind after a little brainstorm:

Level 0:
- Printing a plaintext file
- Drawing a line in 2D
- Open up another thread
- ...

Level 1:
- Get a webpage from the Internet and print it out
- Open up a database
- Synchronize threads
- ...

...

Level n:
- Create a REST webservice online and let it put some code into a EJB and database which will be run later
- Write a little 3D game
- ...

So let's say the method is applicable, what could be some code and methods that help you advance from the Shu level to the Ha level? What would be needed to get from the white to the yellow belt? If the idea will prove itself I will start to write some of that stuff together. Especially interesting for me would be the beginner ideas and not necessarily the full-flex-complete-application-stuff.

I hope I made myself clear enough and you could see my point here. Even if you don't like the idea let me know and if you have any questions please tell me.

Thanks in advance
André
12 years ago
Hey,

found the mistake about the PUT method - I always called the GET through the browser to test that the application is running... In my little world i understand: It created the ressource so PUT makes no sense anymore and wassn't called on the server.

Did I interpret that right?

Still I don't get why GET is not returning the changed state when ccalling PUT or POST - hope to figure that out soon. Maybe a little hint?

Greetings
André
12 years ago
I finally tried the HTTP POST method:

HelloAndroid.java




HelloWorld.java



So, this gives a "204" message but finally shows up in the logs - see attachment. BUT: The GET method through the browser still gives me the "Hello, World false" content - you can see that in the logs attachment also - and I don't get why!?

Can you help? The Post method was called and the variables changed. Any ideas about that? Do I have to write a bean for that or something? Or do I have to save that in a special way - through a ressource on the website - as this is a Rest Webservice? Really like to understand even if Imay get the code up and running now.

Do you think the POST method did not work because the ressource was already there? I read it is only for not existing stuff.

Greetings - and thanks so far as I think I learned a lot through that already... but still have a long way to go...
André
12 years ago
Hi,

I investigated the problem a bit further and decided to try the different HTTP methods:

First I tried "GET" and changed HelloAndroid.java:



The results are documented in the atttachments. This works and shows up in the log files.

I have some more attachments so I open another reply for further information.

Greetings
André
12 years ago
TCPMon with a deactivated firewall gives the same results. So I exclude the firewall as a posible reason.
12 years ago
Hi Ulf,

I tried TCP Mon and it works better for me than wireshark - even if I still will inspect wirshark as it looks pretty interesting.

TCPMon does not show what I expected: I used port 7070 and when I so the HTTP GET with http://localhost:7070/HelloWorldApplication/resources/helloworld it shows up niccely - see screenshot.

Executing the Android code gives unexpected results:



This results in an empty request followed by an empty response if I interpret TCPMon right - see screenshot #2.

Any idea why that is?

Thanks for the help so far
André
12 years ago
Deactivating the Windows Firewall did not do the trick. Will try TCPMon now. Reporting back soon...

Greetings
André
12 years ago
Discussing with some firends of mine I got the same idea about the http request and Wireshark today. I will try tcpmon also. But before that: I am on Windows 7 and did not check the firewall so far - I did not install one but forgot that there is one from Microsoft already installed which may block the connection.

I will post the results later.

Thanks for clearing things up as I already started to run in the wrong direction
André
12 years ago
Watching the wireshark introduction from their site right now. Hope to understand the filtering soon.
12 years ago
Hi,

as you suggested I added some Sysouts to the code so I can see which methods are called. That gives me:

HelloAndroid.java




and HelloWorld.java:



Result: I can now see in the protocols on the Admin Console that HTTP GET was executing but HTTP PUT is still missing. I attached two screenshots showing that the method on the Android was executed but that only a GET request send from the browser shows up in the logs.

I installed wireshark. It looks really interesting but I am new to it and it gives me way too much information so I am having a hard time filtering and looking for the right stuff. I did not find the HTTP PUT but I am not sure if I am doing it right. Could you point me to the proper way of filtering so it only shows the java HTTP PUT if it is there? Maybe you know how to filter that and can give me an advice? That would be highly appreciated as I tinkered around with it for an hour but could not get the results I wanted.

Altogether I think the call from the Android is not reaching the server at all but I don't get why Would be nice if you could give me some more hints?

Greetings
André
12 years ago
Hi,

I will try that when I am back home. Thanks for the advice.

Greetings
André
12 years ago
Hi,

I did not monitor so far. How would I do that with Glassfish? Do I have to add a plugin or is this an already installed feature? Can I find it in Netbeans or in the admin console?

Sorry, Glassfish is new for me.

Greetings
André
12 years ago
Hi Ulf,

thanks again for the quick answer. I tried both ways - the connect statement and the outputstream - but both did not work :-(

These was the Eclipse code i executed:

1. Adding the conenct statement:



and 2. the Output Stream:



Still I only get "Hello, World false". Is there something else I can try or any log I can provide?

Thanks again
André
12 years ago