Tags
android apache awstats beans clearcase clearquest dev dreamhost dvb eclipse ffmpeg gradle htaccess html http java javascript jni licensing linux mac macfuse mpeg mysql mythtv network networking openoffice php random root ruby samba scripting soap spring sshfs ssh linux sudoers requiretty touch tr ubuntu vpn vsftp WOL xmltv
Tag Archives: jaxb
Unmarshalling JAXB entities from SOAP wrappers
Extracting JAXB entities from inside SOAP wrappers can be done without string-chopping using standard APIs. Example: using standard API. String example = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\"><soapenv:Header /><soapenv:Body><ns2:farm xmlns:ns2=\"http://adamish.com/example/farm\"><horse height=\"123\" name=\"glue factory\"/></ns2:farm></soapenv:Body></soapenv:Envelope>"; SOAPMessage message = MessageFactory.newInstance().createMessage(null, new ByteArrayInputStream(example.getBytes())); Unmarshaller unmarshaller = JAXBContext.newInstance(Farm.class).createUnmarshaller(); Farm … Continue reading