<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt">Hi Andy,<br>   You are right. I do use accept() for other method call.  The reason I use type() instead of accept() because the type call return another error message "Your payload must be sent with the media type: application/xml</message></additionalInfo><code>E_BAD_REQUEST</code><components/><message>Cannot consume content type".<br>   Here is the code:  response = webResource.accept(MediaType.APPLICATION_XML).post(ClientResponse.class, pocPayload);<br>   Please advise.<br><br>Thanks,<br>Vicky <br><div><span><br></span></div><div style="display: block;" class="yahoo_quoted"> <br> <br> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 12pt;"> <div
 style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 12pt;"> <div dir="ltr"> <font face="Arial" size="2"> On Wednesday, March 26, 2014 4:37:26 PM, Andy Newton <andy@arin.net> wrote:<br> </font> </div>  <div class="y_msg_container"><div id="yiv4387147106"><div>
<div>Hi Vicky,</div>
<div><br clear="none">
</div>
<div>That error appears to be generated because our servers are receiving the request with an Accept header of “text/html” and not “application/xml”.</div>
<div><br clear="none">
</div>
<div>While I am not familiar with the toolkit you are using, my guess is that the working code is using webResource.accept( MediaType.APPLICATION_XML ) and the other code is using webResource.type( MediaType.APPLICATION_XML ).</div>
<div><br clear="none">
</div>
<div>Andy Newton,</div>
<div>Chief Engineer, ARIN</div>
<div><br clear="none">
</div>
<span id="yiv4387147106OLK_SRC_BODY_SECTION">
</span><div class="yiv4387147106yqt2635053528" id="yiv4387147106yqt58331"><div style="font-family:Calibri;font-size:11pt;text-align:left;color:black;BORDER-BOTTOM:medium none;BORDER-LEFT:medium none;PADDING-BOTTOM:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;BORDER-TOP:#b5c4df 1pt solid;BORDER-RIGHT:medium none;PADDING-TOP:3pt;">
<span style="font-weight:bold;">From: </span>Vicky Zheng <<a rel="nofollow" shape="rect" ymailto="mailto:vickyzheng@yahoo.com" target="_blank" href="mailto:vickyzheng@yahoo.com">vickyzheng@yahoo.com</a>><br clear="none">
<span style="font-weight:bold;">Reply-To: </span>Vicky Zheng <<a rel="nofollow" shape="rect" ymailto="mailto:vickyzheng@yahoo.com" target="_blank" href="mailto:vickyzheng@yahoo.com">vickyzheng@yahoo.com</a>><br clear="none">
<span style="font-weight:bold;">Date: </span>Wednesday, March 26, 2014 at 3:03 PM<br clear="none">
<span style="font-weight:bold;">To: </span>Andrew Newton <<a rel="nofollow" shape="rect" ymailto="mailto:andy@arin.net" target="_blank" href="mailto:andy@arin.net">andy@arin.net</a>>, "<a rel="nofollow" shape="rect" ymailto="mailto:arin-tech-discuss@arin.net" target="_blank" href="mailto:arin-tech-discuss@arin.net">arin-tech-discuss@arin.net</a>" <<a rel="nofollow" shape="rect" ymailto="mailto:arin-tech-discuss@arin.net" target="_blank" href="mailto:arin-tech-discuss@arin.net">arin-tech-discuss@arin.net</a>><br clear="none">
<span style="font-weight:bold;">Subject: </span>Re: [arin-tech-discuss] How to solve the exception with "Could not find JAXBContextFinder for media type: textml"<br clear="none">
</div>
<div><br clear="none">
</div>
<blockquote id="yiv4387147106MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" style="BORDER-LEFT:#b5c4df 5 solid;PADDING:0 0 0 5;MARGIN:0 0 0 5;">
<div>
<div>
<div style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt;">
Sorry, the error message should be:<br clear="none">
HTTP Status 500 - Could not find JAXBContextFinder for media type: text/html<br clear="none">
The server encountered an internal error (Could not find JAXBContextFinder for media type: text/html) that prevented it from fulfilling this request<br clear="none">
<br clear="none">
<br clear="none">
Thanks,<br clear="none">
Vicky<br clear="none">
<div><span></span></div>
<div class="yiv4387147106yahoo_quoted" style="display:block;"><br clear="none">
<br clear="none">
<div style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt;">
<div style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt;">
<div dir="ltr"><font face="Arial" size="2">On Wednesday, March 26, 2014 2:33:41 PM, Vicky Zheng <<a rel="nofollow" shape="rect" ymailto="mailto:vickyzheng@yahoo.com" target="_blank" href="mailto:vickyzheng@yahoo.com">vickyzheng@yahoo.com</a>> wrote:<br clear="none">
</font></div>
<div class="yiv4387147106y_msg_container">
<div id="yiv4387147106">
<div>
<div style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt;">
Thanks Andy for the response.  My confuse is in my code, I did put the type is "MediaType.APPLICATION_XML".<br clear="none">
Don't get why the server get this exception.<br clear="none">
I used the following code to get Poc and it is working fine.<br clear="none">
public String getPOC(String pocHandle)throws Exception{<br clear="none">
        config = new DefaultClientConfig();<br clear="none">
        client = Client.create(config);<br clear="none">
        String pocPayLoad = null;<br clear="none">
        try{<br clear="none">
            webResource = client.resource("<a rel="nofollow" shape="rect" target="_blank" href="https://reg.arin.net/rest/poc/">https://reg.arin.net/rest/poc/"+pocHandle+"?apikey="+getAPIkey()</a>);<br clear="none">
            pocPayLoad = webResource.accept(MediaType.APPLICATION_XML).get(String.class);<br clear="none">
        }catch(Exception e){<br clear="none">
            logger.info("Exception:"+e.getMessage());<br clear="none">
        }<br clear="none">
        return pocPayLoad;<br clear="none">
    }<br clear="none">
<br clear="none">
Thanks,<br clear="none">
Vicky<br clear="none">
<div><span><br clear="none">
</span></div>
<div class="yiv4387147106yqt8566868254" id="yiv4387147106yqt61491">
<div class="yiv4387147106yahoo_quoted" style="display:block;"><br clear="none">
<br clear="none">
<div style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt;">
<div style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt;">
<div dir="ltr"><font face="Arial" size="2">On Wednesday, March 26, 2014 2:09:51 PM, Andy Newton <<a rel="nofollow" shape="rect" ymailto="mailto:andy@arin.net" target="_blank" href="mailto:andy@arin.net">andy@arin.net</a>> wrote:<br clear="none">
</font></div>
<div class="yiv4387147106y_msg_container">
<div id="yiv4387147106">
<div>
<div>Hi Vicky,</div>
<div><br clear="none">
</div>
<div>By looking at your code snippet, my guess is that the media type is not being registered properly with JAXB. “textml” is not a valid media type as far as I know. The media type to use with Reg-RWS is “application/xml”.</div>
<div><br clear="none">
</div>
<div>I hope this helps.</div>
<div><br clear="none">
</div>
<div>Andy Newton,</div>
<div>Chief Engineer, ARIN</div>
<div><br clear="none">
</div>
<span id="yiv4387147106OLK_SRC_BODY_SECTION"></span>
<div class="yiv4387147106yqt8795740544" id="yiv4387147106yqt70028">
<div style="font-family:Calibri;font-size:11pt;text-align:left;color:black;BORDER-BOTTOM:medium none;BORDER-LEFT:medium none;PADDING-BOTTOM:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;BORDER-TOP:#b5c4df 1pt solid;BORDER-RIGHT:medium none;PADDING-TOP:3pt;">
<span style="font-weight:bold;">From: </span>Vicky Zheng <<a rel="nofollow" shape="rect" ymailto="mailto:vickyzheng@yahoo.com" target="_blank" href="mailto:vickyzheng@yahoo.com">vickyzheng@yahoo.com</a>><br clear="none">
<span style="font-weight:bold;">Reply-To: </span>Vicky Zheng <<a rel="nofollow" shape="rect" ymailto="mailto:vickyzheng@yahoo.com" target="_blank" href="mailto:vickyzheng@yahoo.com">vickyzheng@yahoo.com</a>><br clear="none">
<span style="font-weight:bold;">Date: </span>Wednesday, March 26, 2014 at 1:52 PM<br clear="none">
<span style="font-weight:bold;">To: </span>"<a rel="nofollow" shape="rect" ymailto="mailto:arin-tech-discuss@arin.net" target="_blank" href="mailto:arin-tech-discuss@arin.net">arin-tech-discuss@arin.net</a>" <<a rel="nofollow" shape="rect" ymailto="mailto:arin-tech-discuss@arin.net" target="_blank" href="mailto:arin-tech-discuss@arin.net">arin-tech-discuss@arin.net</a>><br clear="none">
<span style="font-weight:bold;">Subject: </span>[arin-tech-discuss] How to solve the exception with "Could not find JAXBContextFinder for media type: textml"<br clear="none">
</div>
<div><br clear="none">
</div>
<blockquote id="yiv4387147106MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" style="BORDER-LEFT:#b5c4df 5 solid;PADDING:0 0 0 5;MARGIN:0 0 0 5;">
<div>
<div>
<div style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt;">
<div>Hello,</div>
<div>    I created java function to call Arin service to add Poc payload.  The XML string come from Arin web sample. 
<br clear="none">
</div>
<div style="color:rgb(0, 0, 0);font-size:16px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;">
    I'm receiving the response from Arin service with "Could not find JAXBContextFinder for media type: text<img>ml.</div>
<div>JBoss Web/7.0.10.Final <br clear="none">
The server encountered an internal error (Could not find JAXBContextFinder for media type: text<img>ml) that prevented it from fulfilling this request.<br clear="none">
</div>
<div style="color:rgb(0, 0, 0);font-size:16px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;">
".</div>
<div style="color:rgb(0, 0, 0);font-size:16px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;">
    Could any one please give me a hint what's the root cause?</div>
<div style="color:rgb(0, 0, 0);font-size:16px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;">
    Here is the java function</div>
<div style="color:rgb(0, 0, 0);font-size:16px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;">
public void addPoc()<br clear="none">
</div>
<div style="color:rgb(0, 0, 0);font-size:16px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;">
{</div>
<div style="color:rgb(0, 0, 0);font-size:16px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;">
        config = new DefaultClientConfig();<br clear="none">
        client = Client.create(config);<br clear="none">
        webResource = client.resource("<a rel="nofollow" shape="rect" target="_blank" href="https://reg.arin.net/rest/poc;makeLink=true">https://reg.arin.net/rest/poc;makeLink=true"+"?apikey="+getAPIkey()</a>);<br clear="none">
        response = webResource.type(MediaType.APPLICATION_XML).post(ClientResponse.class, pocPayload);<br clear="none">
        String rePocPayLoad = response.getEntity(String.class);<br clear="none">
        return rePocPayLoad;<br clear="none">
</div>
<div style="color:rgb(0, 0, 0);font-size:16px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;">
}</div>
<div style="color:rgb(0, 0, 0);font-size:16px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;">
<br clear="none">
</div>
<div style="color:rgb(0, 0, 0);font-size:16px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;">
<br clear="none">
</div>
<div style="color:rgb(0, 0, 0);font-size:16px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;">
Thanks!</div>
<div style="color:rgb(0, 0, 0);font-size:16px;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;background-color:transparent;font-style:normal;">
Vicky<br clear="none">
</div>
</div>
</div>
</div>
</blockquote>
</div>
<div><br clear="none">
</div>
<div><br clear="none">
</div>
</div>
</div>
<br clear="none">
<br clear="none">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br clear="none">
<br clear="none">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote></div>

<div><br clear="none">
</div>
<div><br clear="none">
</div>
</div></div><br><br></div>  </div> </div>  </div> </div></body></html>