<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>Hi Vicky,</div>
<div><br>
</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>
</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>
</div>
<div>Andy Newton,</div>
<div>Chief Engineer, ARIN</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<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 href="mailto:vickyzheng@yahoo.com">vickyzheng@yahoo.com</a>><br>
<span style="font-weight:bold">Reply-To: </span>Vicky Zheng <<a href="mailto:vickyzheng@yahoo.com">vickyzheng@yahoo.com</a>><br>
<span style="font-weight:bold">Date: </span>Wednesday, March 26, 2014 at 3:03 PM<br>
<span style="font-weight:bold">To: </span>Andrew Newton <<a href="mailto:andy@arin.net">andy@arin.net</a>>, "<a href="mailto:arin-tech-discuss@arin.net">arin-tech-discuss@arin.net</a>" <<a href="mailto:arin-tech-discuss@arin.net">arin-tech-discuss@arin.net</a>><br>
<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>
</div>
<div><br>
</div>
<blockquote id="MAC_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>
HTTP Status 500 - Could not find JAXBContextFinder for media type: text/html<br>
The server encountered an internal error (Could not find JAXBContextFinder for media type: text/html) that prevented it from fulfilling this request<br>
<br>
<br>
Thanks,<br>
Vicky<br>
<div><span></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 2:33:41 PM, Vicky Zheng <<a href="mailto:vickyzheng@yahoo.com">vickyzheng@yahoo.com</a>> wrote:<br>
</font></div>
<div class="y_msg_container">
<div id="yiv2764686998">
<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 href="https://reg.arin.net/rest/poc/"+pocHandle+"?apikey="+getAPIkey()">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="yiv2764686998yqt8566868254" id="yiv2764686998yqt61491">
<div class="yiv2764686998yahoo_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 href="mailto:andy@arin.net">andy@arin.net</a>> wrote:<br clear="none">
</font></div>
<div class="yiv2764686998y_msg_container">
<div id="yiv2764686998">
<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="yiv2764686998OLK_SRC_BODY_SECTION"></span>
<div class="yiv2764686998yqt8795740544" id="yiv2764686998yqt70028">
<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="yiv2764686998MAC_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>
<br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</span>
<div><br>
</div>
<div><br>
</div>
</body>
</html>