Hi,
I have exposed a POJO class as webservice programatically using axis2 and i
tested the same using SimpleHTTPServer in Axis2, and im getting the wsdl
correctly.
But when i tried to deploy the same in Jetty its throwing error as EPR not
found. I dont have an axis .aar file .I just have the location of my class file.
Server server = new Server(8081);
ConfigurationContext context =
ConfigurationContextFactory.createConfigurationContextFromFileSystem(null,
null);
AxisConfiguration cfg = context.getAxisConfiguration();
AxisService service =
AxisService.createService(SampleServiceImpl.class.getName(), cfg, null, "",
"http://samples", SampleServiceImpl.class.getClassLoader());
service.setScope("application");
context.setContextRoot("");
cfg.addService(service);
WebAppContext webapp = new WebAppContext();
webapp.setContextPath("/");
webapp.setServer(server);
FileResource basePath = new FileResource(new
URL("file:E:\\Nuwaza\\workspace\\webservertest\\target\\test-classes"));//the
place where my class is present
webapp.setBaseResource(basePath);
ServletHolder holder=new ServletHolder(new AxisServlet());
holder.setInitParameter("axis2.repository.path",
"C:\\Parvathy\\ServiceContainer\\axis2-1.6.2-bin\\axis2-1.6.2\\repository");
//the default repository with axis library
webapp.addServlet(holder, "/services/*");
server.setHandler(webapp);
server.start();
server.join();
Please guide
Regards,
Parvathy J A
This electronic mail (including any attachment thereto) may be confidential and
privileged and is intended only for the individual or entity named above. Any
unauthorized use, printing, copying, disclosure or dissemination of this
communication may be subject to legal restriction or sanction. Accordingly, if
you are not the intended recipient, please notify the sender by replying to
this email immediately and delete this email (and any attachment thereto) from
your computer system...Thank You.