You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Ivan <xh...@gmail.com> on 2011/05/02 14:21:25 UTC

Re: Is there a place from where I can see the deployed web services?

Hmm, it looks to me that, Geronimo did not have a central point for listing
all the webservice endpoints in the deployed applications, and think that we
need to improve this somewhere, maybe have a portlet and log some messages
in the log files.
In the Geronimo 2.2, suppose you are using JAX-WS web services in the web
applications, one possible way is that all the web sevices endpoint classes
should be in the final web.xml file. If you could find the deployed web
application in the repository directory according to the artifact id.
The WSDL address for the endpoint follows the rules of add a query parameter
with the access address. e.g. If the web service access address is that :
http://localhost:8080/test/a, then the wsdl address is
http://localhost:8080/test/a?WSDL
And actually, if the POJO webservices are configured in the web.xml, the
access addressing is also there in the servlet-mapping element. Or, the the
context follows the rules : /webapplicationcontext/service name (configured
in the WebService or WebServiceProvider annotation) or simple class name of
the SEI class.
Hope it helps.

2011/4/30 sim085 <si...@hotmail.com>

> Hello, I created a sample webservice, packaged it and deployed it
> successfully on Geronimo (I am using version;
> geronimo-tomcat6-javaee5-2.2.1). Now I would like to see the wsdl file of
> this webservice. Is there a place from the Geronimo console from where I
> can
> see all the deployed webservices and the address to access the wsdl file of
> these webservices?--
> View this message in context:
> http://apache-geronimo.328035.n3.nabble.com/Is-there-a-place-from-where-I-can-see-the-deployed-web-services-tp2882925p2882925.html
> Sent from the Users mailing list archive at Nabble.com.
>



-- 
Ivan

Re: Is there a place from where I can see the deployed web services?

Posted by Ivan <xh...@gmail.com>.
The EJB based webservice has some similar rules,
/@WebService.serviceName/@WebService.name

If you would like, the special access URL could be configured in the
deployment descriptor. e.g.

<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.1">
  <dep:environment xmlns:dep="
http://geronimo.apache.org/xml/ns/deployment-1.1">
    <dep:moduleId>
      <dep:groupId>default</dep:groupId>
      <dep:artifactId>myear</dep:artifactId>
      <dep:version>1.0</dep:version>
      <dep:type>car</dep:type>
    </dep:moduleId>
    <dep:dependencies/>
    <dep:hidden-classes/>
    <dep:non-overridable-classes/>
  </dep:environment>
  <module>
    <ejb>myejb.jar</ejb>
    <openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.1">
      <dep:environment xmlns:dep="
http://geronimo.apache.org/xml/ns/deployment-1.1">
        <dep:moduleId>
          <dep:groupId>default</dep:groupId>
          <dep:artifactId>myejb</dep:artifactId>
          <dep:version>1.0</dep:version>
          <dep:type>car</dep:type>
        </dep:moduleId>
      </dep:environment>
      <enterprise-beans>
        <session>
          <ejb-name>TestBean</ejb-name>

          <web-service-address>TestBean/TestService</web-service-address>
        </session>
      </enterprise-beans>
    </openejb-jar>
  </module>
</application>

Hope it helps.

2011/5/4 sim085 <si...@hotmail.com>

> Thanks for your reply. My problem is that I am implementing EJB web
> services
> (using EJB3.0 annotations). I am packaging this EJB/WebService as a jar
> file
> which in turn is packaged as part of an EAR file. I deploy the EAR file and
> this gets deployed successfully. From Geronimo console > Server > EJB
> Server
> I can see that my EJB is deployed. However I do not know if it has been
> deployed as a WebService, nor do I know exactly how to access it;
>
> I thought I would have had to access it as follows;
> http://localhost:8080/<ear name>/<bean name>?WSDL
>
> However this is not working.
>
> --
> View this message in context:
> http://apache-geronimo.328035.n3.nabble.com/Is-there-a-place-from-where-I-can-see-the-deployed-web-services-tp2882925p2896359.html
> Sent from the Users mailing list archive at Nabble.com.
>



-- 
Ivan

Re: Is there a place from where I can see the deployed web services?

Posted by sim085 <si...@hotmail.com>.
I am using the following annotations; 

@WebService(serviceName="WebServiceExample", name="Echo")
@SOAPBinding(style = SOAPBinding.Style.DOCUMENT)
@Stateless(name = "Echo")

This means that the WSDL file should be located at the following url right;

http://localhost:8080/WebServiceExample/Echo?wsdl 

However when I enter the address above I get an HTTP Status 404 -
/WebServiceExample/Echo
I can't figure out what is wrong! As much as I know I should not need to
define any XML files since the annotations should take care of this. 

--
View this message in context: http://apache-geronimo.328035.n3.nabble.com/Is-there-a-place-from-where-I-can-see-the-deployed-web-services-tp2882925p2900411.html
Sent from the Users mailing list archive at Nabble.com.

Re: Is there a place from where I can see the deployed web services?

Posted by KHAksnes <kh...@gmail.com>.
My tests have been with the Jetty version so we might hit different bugs.
I am using Jetty and CXF you are probably using Tomcat and Axis2.
 

--
View this message in context: http://apache-geronimo.328035.n3.nabble.com/Is-there-a-place-from-where-I-can-see-the-deployed-web-services-tp2882925p2902488.html
Sent from the Users mailing list archive at Nabble.com.

Re: Is there a place from where I can see the deployed web services?

Posted by KHAksnes <kh...@gmail.com>.
Personally I have only tested this with  a separate interface as I find it
cleaner. The default values (According to JSR-181) should be
<ClassName>Service as service name and <ClassName> as port name, where
ClassName is the "Simple Class Name" of the class (no package component). I
would have considered creating a separate interface anyway as this is
somewhat cleaner as this would be required anyway if you deceide to
implement multiple port interfaces for the same service at a later stage
(Administration interface etc.)

--
View this message in context: http://apache-geronimo.328035.n3.nabble.com/Is-there-a-place-from-where-I-can-see-the-deployed-web-services-tp2882925p2902463.html
Sent from the Users mailing list archive at Nabble.com.

Re: Is there a place from where I can see the deployed web services?

Posted by sim085 <si...@hotmail.com>.
I found the problem; After deployment I was not recieving any error. I then
checked the console and found the following exception;

[start]
2011-05-06 09:42:07,376 WARN  [JAXWSTools] Missing C:\Program Files
(x86)\Java\l
ib. This may be required for wsgen to run.
2011-05-06 09:42:09,404 ERROR [WsdlGeneratorUtils] Process failed: JDK's
tools.j
ar was not found in C:\Program Files (x86)\Java\lib\tools.jar. Usually this
mean
s you are running JRE, not JDK. Please use the java command in JDK 5.0 or
later
(not JRE.)
[/start]

Note that this exception only comes up in the cmd box when trying to load
the wsdl file. Geronimo does not pin-point any other problem during the
deployment of the ear file. I now removed JRE_HOME from the environment
variables and placed JAVA_HOME instead and it worked fine. 

 

--
View this message in context: http://apache-geronimo.328035.n3.nabble.com/Is-there-a-place-from-where-I-can-see-the-deployed-web-services-tp2882925p2907222.html
Sent from the Users mailing list archive at Nabble.com.

Re: Is there a place from where I can see the deployed web services?

Posted by Ivan <xh...@gmail.com>.
Hi, I just tried your application with a 2.2.1 Geronimo tomcat assembly, it
looks to me that I could access
http://localhost:8080/WebServiceExample/Echo?wsdl  without any problem. Do
you get any error message in the deployment process ?

2011/5/6 sim085 <si...@hotmail.com>

> Hi, I uploaded my sample application here;
> http://dl.dropbox.com/u/27542229/webservice-example.zip
>
> I built that with maven, but included the generated ear file just in case.
> The packaging is quite simple; an ear file that contain a jar file that in
> turn contains the ejb bean. Once deployed Geronimo shows the bean
> successfully from Console > Server > EJB Server (EJB Containers > Stateless
> Containers > Default Stateless Container). I also tried including an
> interface but this still did not work out :(
>
>
> --
> View this message in context:
> http://apache-geronimo.328035.n3.nabble.com/Is-there-a-place-from-where-I-can-see-the-deployed-web-services-tp2882925p2904219.html
> Sent from the Users mailing list archive at Nabble.com.
>



-- 
Ivan

Re: Is there a place from where I can see the deployed web services?

Posted by sim085 <si...@hotmail.com>.
Hi, I uploaded my sample application here;
http://dl.dropbox.com/u/27542229/webservice-example.zip

I built that with maven, but included the generated ear file just in case.
The packaging is quite simple; an ear file that contain a jar file that in
turn contains the ejb bean. Once deployed Geronimo shows the bean
successfully from Console > Server > EJB Server (EJB Containers > Stateless
Containers > Default Stateless Container). I also tried including an
interface but this still did not work out :(


--
View this message in context: http://apache-geronimo.328035.n3.nabble.com/Is-there-a-place-from-where-I-can-see-the-deployed-web-services-tp2882925p2904219.html
Sent from the Users mailing list archive at Nabble.com.

Re: Is there a place from where I can see the deployed web services?

Posted by Ivan <xh...@gmail.com>.
So, you still could not access the WSDL ? If possible, could you attach your
sample somewhere, then I could try it.

2011/5/5 sim085 <si...@hotmail.com>

> > the name parameter in the @WebService annotation on this interface
>
> btw - forgot to mention this in my previous reply. In the book I am reading
> there is written that using @WebService on the bean class will force the
> application server to automatically generate the interface. I am mentioning
> this because many examples on the net do not seem to take note of this and
> still define an interface with @WebService annotion.
>
>
>
> --
> View this message in context:
> http://apache-geronimo.328035.n3.nabble.com/Is-there-a-place-from-where-I-can-see-the-deployed-web-services-tp2882925p2902401.html
> Sent from the Users mailing list archive at Nabble.com.
>



-- 
Ivan

Re: Is there a place from where I can see the deployed web services?

Posted by sim085 <si...@hotmail.com>.
> the name parameter in the @WebService annotation on this interface

btw - forgot to mention this in my previous reply. In the book I am reading
there is written that using @WebService on the bean class will force the
application server to automatically generate the interface. I am mentioning
this because many examples on the net do not seem to take note of this and
still define an interface with @WebService annotion.



--
View this message in context: http://apache-geronimo.328035.n3.nabble.com/Is-there-a-place-from-where-I-can-see-the-deployed-web-services-tp2882925p2902401.html
Sent from the Users mailing list archive at Nabble.com.

Re: Is there a place from where I can see the deployed web services?

Posted by KHAksnes <kh...@gmail.com>.
If you are using an annotated EJB with a separate SEI interface defined the 
endpoint name will be the value of the name parameter in the @WebService
annotation on this interface.
The service name will be the value of the serviceName parameter on the
@WebService annotation on the bean itself. The URL to the wsdl description
will then be:
http://<host>:<port>/<seviceName>/<endpointName>?wsdl


--
View this message in context: http://apache-geronimo.328035.n3.nabble.com/Is-there-a-place-from-where-I-can-see-the-deployed-web-services-tp2882925p2897697.html
Sent from the Users mailing list archive at Nabble.com.

Re: Is there a place from where I can see the deployed web services?

Posted by sim085 <si...@hotmail.com>.
Thanks for your reply. My problem is that I am implementing EJB web services
(using EJB3.0 annotations). I am packaging this EJB/WebService as a jar file
which in turn is packaged as part of an EAR file. I deploy the EAR file and
this gets deployed successfully. From Geronimo console > Server > EJB Server
I can see that my EJB is deployed. However I do not know if it has been
deployed as a WebService, nor do I know exactly how to access it; 

I thought I would have had to access it as follows;
http://localhost:8080/<ear name>/<bean name>?WSDL

However this is not working.

--
View this message in context: http://apache-geronimo.328035.n3.nabble.com/Is-there-a-place-from-where-I-can-see-the-deployed-web-services-tp2882925p2896359.html
Sent from the Users mailing list archive at Nabble.com.