RESTful Client #817

CLOSED
Submitted 10 months ago

Hi, this is my second year with your RCP training and I distinctly remember there being a RESTful example. Unfortunately, I cannot find it any longer. I have searched the web without any success. Is there any way you can add it back to the training please? Regards, Kurt

Comments

  10 months ago

Hi,

IIRC I removed the exercise because it was outdated. I try to update it tomorrow and re-add it to the training. Best regards, Lars

  10 months ago

Hi Lars, thank you very much. I have to say that your training has been instrumental in helping me with my program. Without it, the desire to build my program would not have become a reality.

  10 months ago

Hi Kurt,

thanks for the feedback. The new exercise is almost ready. Unfortunately I can only work on it again next Wednesday but I hope I will be able to publish it on this day.

Best regards, Lars

  10 months ago

Yes sir! Looking forward to learning more and thank you very much again!

  9 months ago

Hi,

I added two exercises, one for the usage of the HttpClient (which could also be used parse the Restful service) and another with the usage of the retrofit library.

I hope this help. Please reopen if something is missing / unclear.

  9 months ago
  9 months ago

Thanks again for the super fast support! I’ll attempt these trainings in the next few days and let you know if I run into any issues.

  9 months ago

Hi Lars, this is my first time using Maven in the target description. So, I may have done something incorrectly. However, I had to add the following to get the code to compile/work inside eclipse

<dependency>
	<groupId>com.squareup.okhttp3</groupId>
	<artifactId>okhttp</artifactId>
	<version>4.9.3</version>
	<type>jar</type>
</dependency>
<dependency>
	<groupId>com.squareup.okio</groupId>
	<artifactId>okio</artifactId>
	<version>2.8.0</version>
	<type>jar</type>
</dependency>
<dependency>
	<groupId>org.jetbrains.kotlin</groupId>
	<artifactId>kotlin-stdlib</artifactId>
	<version>1.4.10</version>
	<type>jar</type>
</dependency>
  9 months ago

After adding these dependencies, everything is working in eclipse nicely.

Unfortunately when I try to export the project, the Maven build is throwing the following error: mvn clean verify …​

Here is some eclipse info Eclipse SDK Version: 2021-12 (4.22) Build id: I20211124-1800 JavaSE-11

Regards,

Kurt

  9 months ago

Here is my target definition for the Maven location <location includeDependencyDepth="infinite" includeDependencyScopes="compile" includeSource="true" missingManifest="generate" type="Maven"> <feature id="maven.dependencies" label="Dependencies from Maven Central" version="1.0.0.qualifier"></feature> <dependencies> <dependency> <groupId>com.google.code.gson</groupId> <artifactId>gson</artifactId> <version>2.8.9</version> <type>jar</type> </dependency> <dependency> <groupId>com.squareup.okhttp3</groupId> <artifactId>okhttp</artifactId> <version>4.9.3</version> <type>jar</type> </dependency> <dependency> <groupId>com.squareup.okio</groupId> <artifactId>okio</artifactId> <version>2.8.0</version> <type>jar</type> </dependency> <dependency> <groupId>com.squareup.retrofit2</groupId> <artifactId>converter-gson</artifactId> <version>2.9.0</version> <type>jar</type> </dependency> <dependency> <groupId>com.squareup.retrofit2</groupId> <artifactId>retrofit</artifactId> <version>2.9.0</version> <type>jar</type> </dependency> <dependency> <groupId>org.jetbrains.kotlin</groupId> <artifactId>kotlin-stdlib</artifactId> <version>1.4.10</version> <type>jar</type> </dependency> </dependencies> </location>

  9 months ago

Sorry for the multiple comments. I was getting a SQL error when trying to save the entire response as one.

  9 months ago

Maven build error;

  9 months ago

Invalid syntax in target definition C:\Users\kurt\Documents\workspace\karma\target-platform\target-platform.target: Missing child element 'groupId' → [Help 1]

  9 months ago

Which Tycho release are you using? The old description used Tycho 2.2.0 which did not support yet the new Maven extension. It has been updated to 2.6.0 which supports also the new Maven elements. See https://learn.vogella.com/exercises/rich-client-platform/exercise-building-eclipse-rcp-applications-with-maven-3chf8

  9 months ago

That was the issue. I must have been using the training exercise when I first purchased it and never used the m2e extension until recently.

Anyway, your updated REST training is working for me and now the Tycho build is also working.

Thank you very much!

Feel free to close this ticket.

  9 months ago
  9 months ago

Thanks for the feedback and great to hear that this is working for you.

Please login to write a comment.