[ https://issues.apache.org/jira/browse/AXIS2-3116?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Davanum Srinivas resolved AXIS2-3116. ------------------------------------- Resolution: Fixed Fixed in svn 633536 -- dims > JAXWS Endpoint API does not work in 1.3 RC2 > ------------------------------------------- > > Key: AXIS2-3116 > URL: https://issues.apache.org/jira/browse/AXIS2-3116 > Project: Axis 2.0 (Axis2) > Issue Type: Bug > Components: jaxws > Affects Versions: 1.3 > Environment: Sun JDK 5, Windows/Linux > Reporter: yogen > Assignee: Davanum Srinivas > Fix For: 1.4 > > > I wrote a main class like this: > import javax.xml.ws.Endpoint; > import org.apache.axis2.jaxws.calculator.CalculatorService; > public class StandaloneServiceStartupUsingEndpointPublish > { > public static void main( String[] args ) > { > System.out.println("Starting Server..."); > Endpoint ep = Endpoint.create( new CalculatorService() ); > ep.publish( "http://localhost:9090/CalculatorService" > ); > } > } > Problems: > 1. Even though I have specified port 9090, the transport is started on 8080. > 2. Trying to get wsdl using http://localhost:9090/CalculatorService?wsdl in > browser results this error: > <Exception> > org.apache.axis2.AxisFault: The service cannot be found for the endpoint > reference (EPR) /services/ > at > org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPhase.java:63) > at org.apache.axis2.engine.Phase.invoke(Phase.java:308) > at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:212) > at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:132) > at > org.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngine(RESTUtil.java:125) > at > org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(RESTUtil.java:119) > at org.apache.axis2.transport.http.HTTPWorker.service(HTTPWorker.java:229) > at > org.apache.axis2.transport.http.server.AxisHttpService.doService(AxisHttpService.java:256) > at > org.apache.axis2.transport.http.server.AxisHttpService.handleRequest(AxisHttpService.java:163) > at > org.apache.axis2.transport.http.server.HttpServiceProcessor.run(HttpServiceProcessor.java:85) > at > edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665) > at > edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690) > at java.lang.Thread.run(Thread.java:595) > </Exception> > I think the problem is bcoz of this code in EndpointImpl class: > public void publish(String s) { > ConfigurationContext ctx = > endpointDesc.getServiceDescription().getAxisConfigContext(); > try { > // For some reason the AxisService has not been added to the > ConfigurationContext > // at this point, so we need to do it for the service to be > available. > AxisService svc = endpointDesc.getAxisService(); > ctx.getAxisConfiguration().addService(svc); > } catch (AxisFault e) { > throw ExceptionFactory.makeWebServiceException(e); > } > // Remove the default "axis2" context root. > ctx.setContextRoot("/"); > WorkerFactory wf = new HTTPWorkerFactory(); > try { > server = new SimpleHttpServer(ctx, wf, 8080); //TODO: Add a > configurable port > server.init(); > server.start(); > } catch (IOException e) { > throw ExceptionFactory.makeWebServiceException(e); > } > published = true; > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]