While using EntireX for communicating with Natural I have the following Exception:
Jul 06, 2015 9:54:59 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Allocate exception for servlet EntireXXMLServlet
javax.servlet.ServletException: 2000 0028 Specified XMLAdapter not found. ( adapter Ias230n1XmlAdapter )
at com.softwareag.entirex.xml.rt.XMLServlet.init(Unknown Source)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:864)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:134)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2476)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2465)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
java.io.IOException: Server returned HTTP response code: 500 for URL: http://localhost:8080/Webservices/soapinxml
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1838)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1439)
at utilities.WebServiceDataCall.getData(WebServiceDataCall.java:130)
at personnel.employee.IAP285N1b.updateTraining(IAP285N1b.java:123)
at personnel.employee.EmployeeTrainingServlet.doPost(EmployeeTrainingServlet.java:200)
at personnel.employee.EmployeeTrainingServlet.doGet(EmployeeTrainingServlet.java:39)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
My questions are:
1.What it is wrong
2.How can be fixed
3.Is the missing XMLAdapter supposed to be generated
The Code that Throws Exception is here:
/**
* Transports the data to/from the XML/soap server
*
* @throws java.net.ConnectException
* @throws javax.xml.bind.JAXBException
* @throws java.net.MalformedURLException
* @throws java.io.IOException
*/
public void getData() throws java.net.ConnectException, JAXBException,
MalformedURLException, IOException {
m = context.createMarshaller();
m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
URL url = new URL(webServiceUrl);
HttpURLConnection con = (HttpURLConnection) url.openConnection();
con.setDoOutput(true);
con.setDoInput(true);
con.setRequestMethod("POST");
con.setRequestProperty("content-type", "text/xml");
con.setRequestProperty("Accept", "text/xml");
OutputStream out = con.getOutputStream();
OutputStreamWriter wout = new OutputStreamWriter(out, "iso-8859-1");
m.marshal(inElement, wout);
wout.flush();
Unmarshaller u = context.createUnmarshaller();
outElement = (Element) u.unmarshal(new StreamSource(con
.getInputStream()));
out.close();
con.disconnect();
}
And the instruction that throws Exception is this:
outElement = (Element) u.unmarshal(new StreamSource(con
.getInputStream()));