axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Franck Michel (JIRA)" <j...@apache.org>
Subject [jira] Updated: (AXIS2-4247) JAX-WS API fails to build an endpoint reference (IllegalStateException) when service is published with Endpoint.publish()
Date Mon, 23 Feb 2009 11:09:02 GMT

     [ https://issues.apache.org/jira/browse/AXIS2-4247?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Franck Michel updated AXIS2-4247:
---------------------------------

    Attachment: Axis2Test.java

> JAX-WS API fails to build an endpoint reference (IllegalStateException) when service
is published with Endpoint.publish()
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4247
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4247
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: jaxws
>    Affects Versions: nightly
>         Environment: JDK 1.6.0_06, WinXP
>            Reporter: Franck Michel
>         Attachments: Axis2Test.java, LaunchA2xis2Test.java
>
>
> Hi, I'm facing a trouble using the Enpoint.publish() JAXWS API. I've checked several
issues that may be related, with no success until now :
> https://issues.apache.org/jira/browse/AXIS2-3116?page=com.atlassian.jira.plugin.ext.subversion:subversion-commits-tabpanel
> https://wso2.org/jira/browse/CARBON-738
> I'm using the last nightly build as some issues were fixed on this kind of thing recently.
> I publish a very basic WS Endpoint.publish(String url) API: the service seems to be published
(isPublished() returns true), but it fails to return an endpoint reference. My code does this
(the code of the web service is at the end of this post):
>             Endpoint endPoint = Endpoint.create(new Axis2Test());
>             endPoint.publish("http://localhost:8081/services/Test");
>             logger.debug("isPublished: " + endPoint.isPublished());
>             logger.debug("getProperties: " + endPoint.getProperties());
>             logger.debug("getMetadata: " + endPoint.getMetadata());
>             logger.debug("getEndpointReference: " + endPoint.getEndpointReference());
> This fails on endPoint.getEndpointReference(), an returns:
> 2009-02-23 11:28:37,242 [main] DEBUG fr.anr.techlog.neurolog.server.LaunchStandaloneWebServices:18
- isPublished: true
> 2009-02-23 11:28:37,242 [main] DEBUG fr.anr.techlog.neurolog.server.LaunchStandaloneWebServices:19
- getProperties: null
> 2009-02-23 11:28:37,242 [main] DEBUG fr.anr.techlog.neurolog.server.LaunchStandaloneWebServices:20
- getMetadata: null
> 2009-02-23 11:28:37,492 [main] FATAL fr.anr.techlog.neurolog.server.LaunchStandaloneWebServices:24
- Unable to create server
> java.lang.IllegalStateException: Unable to locate a deployed service that maps to the
requested endpoint, Service: {http://mypackage/}Axis2TestService, Port: {http://mypackage/}Axis2TestPort
>         at org.apache.axis2.jaxws.addressing.factory.impl.Axis2EndpointReferenceFactoryImpl.createEndpointReference(Axis2EndpointReferenceFactoryImpl.java:66)
>         at org.apache.axis2.jaxws.addressing.factory.impl.Axis2EndpointReferenceFactoryImpl.createEndpointReference(Axis2EndpointReferenceFactoryImpl.java:97)
>         at org.apache.axis2.jaxws.addressing.util.EndpointReferenceUtils.createAxis2EndpointReference(EndpointReferenceUtils.java:133)
>         at org.apache.axis2.jaxws.server.endpoint.EndpointImpl.getEndpointReference(EndpointImpl.java:244)
>         at org.apache.axis2.jaxws.server.endpoint.EndpointImpl.getEndpointReference(EndpointImpl.java:261)
>         at mypackage.LaunchA2xis2Test.main(LaunchA2xis2Test.java:21)
> Also, accessing the service using Firefox returns this :
> 2009-02-23 11:52:46,184 [HttpConnection-8081-2] ERROR org.apache.axis2.engine.AxisEngine:212
- The service cannot be found for the endpoint reference (EPR) /services/Test?wsdl
> org.apache.axis2.AxisFault: The service cannot be found for the endpoint reference (EPR)
/services/Test?wsdl
>         at org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPhase.java:65)
>         at org.apache.axis2.engine.Phase.invoke(Phase.java:333)
>         at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:264)
>         at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:163)
>         at org.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngine(RESTUtil.java:136)
>         at org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(RESTUtil.java:130)
>         at org.apache.axis2.transport.http.HTTPWorker.service(HTTPWorker.java:257)
>         at org.apache.axis2.transport.http.server.AxisHttpService.doService(AxisHttpService.java:281)
>         at org.apache.axis2.transport.http.server.AxisHttpService.handleRequest(AxisHttpService.java:187)
>         at org.apache.axis2.transport.http.server.HttpServiceProcessor.run(HttpServiceProcessor.java:82)
>         at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061)
>         at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:575)
>         at java.lang.Thread.run(Thread.java:619)
> In addition, a quite curious behaviour is this: when I get this URL, http://localhost:8081/services/Axis2TestService.Axis2TestPort,
I get a proper service page with a correct list of available operations. However the link
to the wsdl (http://localhost:8081/services/Axis2TestService.Axis2TestPort?wsdl) returns another
error : 
> 2009-02-23 11:55:31,728 [HttpConnection-8081-4] WARN  org.apache.axis2.description.AxisService:1003
- Unable to generate EPR for the transport : http
> My web service code is the most simple that could be:
> import javax.jws.WebService;
> @WebService
> public class Axis2Test
> {
>     public Axis2Test() {}
>     public int getNumber() {
>         return 0;
>     }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message