[arin-tech-discuss] How to solve the exception with "Could not find JAXBContextFinder for media type: textml"

Andy Newton andy at arin.net
Wed Mar 26 14:09:27 EDT 2014


Hi Vicky,

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”.

I hope this helps.

Andy Newton,
Chief Engineer, ARIN

From: Vicky Zheng <vickyzheng at yahoo.com<mailto:vickyzheng at yahoo.com>>
Reply-To: Vicky Zheng <vickyzheng at yahoo.com<mailto:vickyzheng at yahoo.com>>
Date: Wednesday, March 26, 2014 at 1:52 PM
To: "arin-tech-discuss at arin.net<mailto:arin-tech-discuss at arin.net>" <arin-tech-discuss at arin.net<mailto:arin-tech-discuss at arin.net>>
Subject: [arin-tech-discuss] How to solve the exception with "Could not find JAXBContextFinder for media type: textml"

Hello,
    I created java function to call Arin service to add Poc payload.  The XML string come from Arin web sample.
    I'm receiving the response from Arin service with "Could not find JAXBContextFinder for media type: text[X]ml.
JBoss Web/7.0.10.Final
The server encountered an internal error (Could not find JAXBContextFinder for media type: text[X]ml) that prevented it from fulfilling this request.
".
    Could any one please give me a hint what's the root cause?
    Here is the java function
public void addPoc()
{
        config = new DefaultClientConfig();
        client = Client.create(config);
        webResource = client.resource("https://reg.arin.net/rest/poc;makeLink=true"+"?apikey="+getAPIkey());
        response = webResource.type(MediaType.APPLICATION_XML).post(ClientResponse.class, pocPayload);
        String rePocPayLoad = response.getEntity(String.class);
        return rePocPayLoad;
}


Thanks!
Vicky


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.arin.net/pipermail/arin-tech-discuss/attachments/20140326/4a497ac2/attachment.html>


More information about the arin-tech-discuss mailing list