<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:Georgia;
        panose-1:2 4 5 2 5 4 5 2 3 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
code
        {mso-style-priority:99;
        font-family:"Courier New";}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Courier New";
        mso-fareast-language:NL;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="NL" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<pre style="background:#2B2B2B"><span lang="EN-US">I can&#8217;t make REST endpoint work, I&#8217;m using exactly code supplied in example, I tried also to check how standard endpoints in keycloak code are created, all looks similar:<br><br><span style="color:#A9B7C6"><br></span><i><span style="color:#629755">/**<br> * <b>@author </b></span><span style="color:#77B767">&lt;a href=&quot;mailto:<a href="mailto:sthorger@redhat.com" target="_blank">sthorger@redhat.com</a>&quot;&gt;</span><span style="color:#629755">Stian Thorgersen</span><span style="color:#77B767">&lt;/a&gt;<br> </span><span style="color:#629755">*/<br></span></i><span style="color:#CC7832">public class </span><span style="color:#A9B7C6">HelloResourceProvider </span><span style="color:#CC7832">implements </span><span style="color:#A9B7C6">RealmResourceProvider {<br><br>&nbsp;&nbsp;&nbsp; </span><span style="color:#CC7832">private </span><span style="color:#A9B7C6">KeycloakSession </span><span style="color:#9876AA">session</span><span style="color:#CC7832">;<br><br>&nbsp;&nbsp;&nbsp; public </span><span style="color:#FFC66D">HelloResourceProvider</span><span style="color:#A9B7C6">(KeycloakSession session) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color:#CC7832">this</span><span style="color:#A9B7C6">.</span><span style="color:#9876AA">session </span><span style="color:#A9B7C6">= session</span><span style="color:#CC7832">;<br>&nbsp;&nbsp;&nbsp; </span><span style="color:#A9B7C6">}<br><br>&nbsp;&nbsp;&nbsp; </span><span style="color:#BBB529">@GET<br>&nbsp;&nbsp;&nbsp; @Produces</span><span style="color:#A9B7C6">(MediaType.</span><i><span style="color:#9876AA">TEXT_HTML</span></i><span style="color:#A9B7C6">)<br>&nbsp;&nbsp;&nbsp; </span><span style="color:#BBB529">@Path</span><span style="color:#A9B7C6">(</span><span style="color:#6A8759">&quot;/{action}&quot;</span><span style="color:#A9B7C6">)<br>&nbsp;&nbsp;&nbsp; </span><span style="color:#CC7832">public </span><span style="color:#A9B7C6">String </span><span style="color:#FFC66D">get</span><span style="color:#A9B7C6">(</span><span style="color:#BBB529">@PathParam</span><span style="color:#A9B7C6">(</span><span style="color:#6A8759">&quot;action&quot;</span><span style="color:#A9B7C6">) String action) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color:gray">//String requestUri = session.getContext().getUri().getRequestUri().toString();<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color:#A9B7C6">String title = </span><span style="color:#6A8759">&quot;APP_REQUEST&quot;</span><span style="color:#CC7832">;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if </span><span style="color:#A9B7C6">(action.equals(</span><span style="color:#6A8759">&quot;auth&quot;</span><span style="color:#A9B7C6">)) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; title = </span><span style="color:#6A8759">&quot;AUTH_RESPONSE&quot;</span><span style="color:#CC7832">;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color:#A9B7C6">} </span><span style="color:#CC7832">else if </span><span style="color:#A9B7C6">(action.equals(</span><span style="color:#6A8759">&quot;logout&quot;</span><span style="color:#A9B7C6">)) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; title = </span><span style="color:#6A8759">&quot;LOGOUT_REQUEST&quot;</span><span style="color:#CC7832">;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color:#A9B7C6">}<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; StringBuilder sb = </span><span style="color:#CC7832">new </span><span style="color:#A9B7C6">StringBuilder()</span><span style="color:#CC7832">;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color:#A9B7C6">sb.append(</span><span style="color:#6A8759">&quot;&lt;html&gt;&lt;head&gt;&lt;title&gt;&quot; </span><span style="color:#A9B7C6">&#43; title &#43; </span><span style="color:#6A8759">&quot;&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&quot;</span><span style="color:#A9B7C6">)</span><span style="color:#CC7832">;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color:#A9B7C6">UriBuilder base = UriBuilder.<i>fromUri</i>(</span><span style="color:#6A8759">&quot;<a href="http://localhost:8180/auth" target="_blank">http://localhost:8180/auth</a>&quot;</span><span style="color:#A9B7C6">)</span><span style="color:#CC7832">;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color:#A9B7C6">sb.append(</span><span style="color:#6A8759">&quot;&lt;a href=</span><span style="color:#CC7832">\&quot;</span><span style="color:#6A8759">&quot; </span><span style="color:#A9B7C6">&#43; RealmsResource.<i>accountUrl</i>(base).build(</span><span style="color:#6A8759">&quot;test&quot;</span><span style="color:#A9B7C6">).toString() &#43; </span><span style="color:#6A8759">&quot;</span><span style="color:#CC7832">\&quot;</span><span style="color:#6A8759"> id=</span><span style="color:#CC7832">\&quot;</span><span style="color:#6A8759">account</span><span style="color:#CC7832">\&quot;</span><span style="color:#6A8759">&gt;account&lt;/a&gt;&quot;</span><span style="color:#A9B7C6">)</span><span style="color:#CC7832">;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color:#A9B7C6">sb.append(</span><span style="color:#6A8759">&quot;&lt;/body&gt;&lt;/html&gt;&quot;</span><span style="color:#A9B7C6">)</span><span style="color:#CC7832">;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return </span><span style="color:#A9B7C6">sb.toString()</span><span style="color:#CC7832">;<br>&nbsp;&nbsp;&nbsp; </span><span style="color:#A9B7C6">}<br><br>&nbsp;&nbsp;&nbsp; </span><span style="color:#BBB529">@Override<br>&nbsp;&nbsp;&nbsp; </span><span style="color:#CC7832">public </span><span style="color:#A9B7C6">Object </span><span style="color:#FFC66D">getResource</span><span style="color:#A9B7C6">() {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color:#CC7832">return this;<br>&nbsp;&nbsp;&nbsp; </span><span style="color:#A9B7C6">}<br><br>&nbsp;&nbsp;&nbsp; </span><span style="color:#BBB529">@Override<br>&nbsp;&nbsp;&nbsp; </span><span style="color:#CC7832">public void </span><span style="color:#FFC66D">close</span><span style="color:#A9B7C6">() {<br>&nbsp;&nbsp;&nbsp; }<br><br>}</span><o:p></o:p></span></pre>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">&nbsp;<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-US">&nbsp;<o:p></o:p></span></p>
<pre style="margin:6.0pt"><span lang="EN-US">But I&#8217;m still getting:<o:p></o:p></span></pre>
<pre style="mso-margin-top-alt:0cm;margin-right:6.0pt;margin-bottom:6.0pt;margin-left:0cm"><span lang="EN-US">&nbsp;<o:p></o:p></span></pre>
<pre style="margin:6.0pt"><code><span lang="EN-US" style="font-family:Consolas;color:black">RESTEASY003815: Subresource for target class has no jax-rs annotations.: nl.vi.keycloak.providers.rest.HelloResourceProvider</span></code><span lang="EN-US"><o:p></o:p></span></pre>
<pre style="margin:6.0pt"><code><span lang="EN-US" style="font-family:Consolas;color:black">&nbsp;</span></code><span lang="EN-US"><o:p></o:p></span></pre>
<pre style="margin:6.0pt"><code><span lang="EN-US" style="font-family:Consolas;color:black">Can you please help me? Thanks</span></code><o:p></o:p></pre>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<table class="MsoNormalTable" border="0" cellpadding="0" width="461" style="width:345.65pt;margin-left:-3.0pt">
<tbody>
<tr style="height:11.15pt">
<td style="padding:0cm 0cm 0cm 0cm;height:11.15pt">
<p class="MsoNormal" style="line-height:12.0pt"><span style="font-size:10.0pt;font-family:&quot;Georgia&quot;,serif;color:black;mso-fareast-language:NL">Kind Regards,</span><span style="font-size:10.0pt;font-family:&quot;Georgia&quot;,serif;color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt"><span style="font-size:10.0pt;font-family:&quot;Georgia&quot;,serif;color:black;mso-fareast-language:NL"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt"><span style="font-size:10.0pt;font-family:&quot;Georgia&quot;,serif;color:black;mso-fareast-language:NL">Mariusz Chruscielewski</span><span style="font-size:10.0pt;font-family:&quot;Georgia&quot;,serif;color:black"><o:p></o:p></span></p>
</td>
</tr>
<tr style="height:11.15pt">
<td style="padding:0cm 0cm 15.0pt 0cm;height:11.15pt">
<p class="MsoNormal" style="line-height:12.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Georgia&quot;,serif;color:black;mso-fareast-language:NL">Software Engineer &nbsp;|&nbsp;&nbsp;<a href="mailto:mariusz@info.nl"><span style="color:blue">mariusz@info.nl</span></a>&nbsp;<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt"><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Georgia&quot;,serif;color:black;mso-fareast-language:NL">&#43;31 (0)20 530 91 13 | &#43;48 695 555 292
</span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Georgia&quot;,serif;color:black"><o:p></o:p></span></p>
</td>
</tr>
<tr style="height:15.3pt">
<td style="padding:0cm 0cm 3.0pt 0cm;height:15.3pt">
<p class="MsoNormal" style="line-height:16.0pt"><span style="font-size:10.0pt;font-family:&quot;Georgia&quot;,serif;color:black;mso-fareast-language:NL"><a href="http://www.info.nl/"><span lang="EN-US" style="font-size:14.0pt;color:white;background:black">info.nl</span><span lang="EN-US" style="color:blue">&nbsp;&nbsp;&nbsp;&nbsp;</span></a><a href="http://www.info.nl/nl?utm_source=e-mail_sig&amp;utm_medium=e-mail&amp;utm_term=connecting_the_dots&amp;utm_campaign=info_sig"><i><span lang="EN-US" style="color:black">making
 platforms work</span></i></a></span><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Georgia&quot;,serif;color:black"><o:p></o:p></span></p>
</td>
</tr>
<tr style="height:11.15pt">
<td style="padding:0cm 0cm 15.0pt 0cm;height:11.15pt">
<p class="MsoNormal" style="line-height:12.0pt"><span style="font-size:10.0pt;font-family:&quot;Georgia&quot;,serif;color:black;mso-fareast-language:NL">Sint Antoniesbreestraat 16 &nbsp;| &nbsp;1011 HB Amsterdam &nbsp;| &nbsp;&#43;31 (0)20 530 91 11</span><span style="font-size:10.0pt;font-family:&quot;Georgia&quot;,serif;color:black;mso-fareast-language:NL"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt"><span style="font-size:10.0pt;font-family:&quot;Georgia&quot;,serif;mso-fareast-language:NL"><a href="https://www.facebook.com/infonl"><span style="color:blue">Facebook</span></a> |
<a href="https://twitter.com/infonl"><span style="color:blue">Twitter</span></a> |
<a href="https://www.linkedin.com/company/info-nl"><span style="color:blue">LinkedIn</span></a> |
<a href="https://plus.google.com/&#43;infonl/"><span style="color:blue">Google&#43;</span></a></span><span style="font-size:10.0pt;font-family:&quot;Georgia&quot;,serif"><o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><span style="mso-fareast-language:NL"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</body>
</html>