You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by la...@opensource.lk on 2006/10/18 21:04:51 UTC

Session Bean as a Web Service - V2

Hi All,

In one of previous mails I asked how can I deploy session bean as a web
service. Now with the help of David and others I can deploy it in G 1.1.1
without errors. But it gives following error when I try to access it
through a web client in same ear. I can't view the WSDL of the WS from a
browser too.

Any obvious thing I am missing here?

########### Error when accessing WS from a client #####################

javax.xml.rpc.ServiceException: no port for class
org.apache.geronimo.samples.calc.CalculatorService
        at
org.apache.geronimo.axis.client.ServiceImpl.internalGetPortFromClassName(ServiceImpl.java:160)
        at
org.apache.geronimo.axis.client.ServiceImpl.getPort(ServiceImpl.java:78)
        at
org.apache.geronimo.samples.calc.web.CalculatorClientServlet.callService(Unknown
Source)
        at
org.apache.geronimo.samples.calc.web.CalculatorClientServlet.doGet(Unknown
Source)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        at
org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(DefaultSubjectValve.java:56)
        at
org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:342)
        at
org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:31)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
        at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
        at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Thread.java:595)

################### CalculatorServiceEJB.wsdl ##############################

<?xml version="1.0" encoding="UTF-8"?>

<definitions name="CalculatorServiceEJB"
targetNamespace="urn:geronimo-samples" xmlns:tns="urn:geronimo-samples"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
  <types/>
  <message name="CalculatorService_addition">
    <part name="int_1" type="xsd:int"/>
    <part name="int_2" type="xsd:int"/>
  </message>
  <message name="CalculatorService_additionResponse">
    <part name="result" type="xsd:int"/>
  </message>
  <portType name="CalculatorService">
    <operation name="addition" parameterOrder="int_1 int_2">
      <input message="tns:CalculatorService_addition"/>
      <output message="tns:CalculatorService_additionResponse"/>
    </operation>
  </portType>
  <binding name="CalculatorServiceBinding" type="tns:CalculatorService">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="rpc"/>
    <operation name="addition">
      <soap:operation soapAction=""/>
      <input>
        <soap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
use="encoded" namespace="urn:geronimo-samples"/>
      </input>
      <output>
        <soap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
use="encoded" namespace="urn:geronimo-samples"/>
      </output>
    </operation>
  </binding>
  <service name="CalculatorServiceEJB">
    <port name="CalculatorServicePort"
binding="tns:CalculatorServiceBinding">
      <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
    </port>
  </service>
 </definitions>

###################### jaxrpc-mapping.xml #########################

<?xml version="1.0" encoding="UTF-8"?>
<java-wsdl-mapping xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee   
http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd">
  <package-mapping>
    <package-type>org.apache.geronimo.samples.calc</package-type>
    <namespaceURI>urn:geronimo-samples</namespaceURI>
  </package-mapping>
  <package-mapping>
    <package-type>org.apache.geronimo.samples.calc</package-type>
    <namespaceURI>urn:geronimo-samples</namespaceURI>
  </package-mapping>
  <service-interface-mapping>
	<service-interface>
		org.apache.geronimo.samples.calc.CalculatorService
	</service-interface>
    <wsdl-service-name
xmlns:serviceNS="urn:geronimo-samples">serviceNS:CalculatorServiceEJB</wsdl-service-name>
    <port-mapping>
      <port-name>CalculatorServicePort</port-name>
      <java-port-name>CalculatorServicePort</java-port-name>
    </port-mapping>
  </service-interface-mapping>
  <service-endpoint-interface-mapping>
    <service-endpoint-interface>org.apache.geronimo.samples.calc.CalculatorService</service-endpoint-interface>
    <wsdl-port-type
xmlns:portTypeNS="urn:geronimo-samples">portTypeNS:CalculatorService</wsdl-port-type>
    <wsdl-binding
xmlns:bindingNS="urn:geronimo-samples">bindingNS:CalculatorServiceBinding</wsdl-binding>
    <service-endpoint-method-mapping>
      <java-method-name>addition</java-method-name>
      <wsdl-operation>addition</wsdl-operation>
      <method-param-parts-mapping>
        <param-position>0</param-position>
        <param-type>int</param-type>
        <wsdl-message-mapping>
          <wsdl-message
xmlns:wsdlMsgNS="urn:geronimo-samples">wsdlMsgNS:CalculatorService_addition</wsdl-message>
          <wsdl-message-part-name>int_1</wsdl-message-part-name>
          <parameter-mode>IN</parameter-mode>
        </wsdl-message-mapping>
      </method-param-parts-mapping>
      <method-param-parts-mapping>
        <param-position>1</param-position>
        <param-type>int</param-type>
        <wsdl-message-mapping>
          <wsdl-message
xmlns:wsdlMsgNS="urn:geronimo-samples">wsdlMsgNS:CalculatorService_addition</wsdl-message>
          <wsdl-message-part-name>int_2</wsdl-message-part-name>
          <parameter-mode>IN</parameter-mode>
        </wsdl-message-mapping>
      </method-param-parts-mapping>
      <wsdl-return-value-mapping>
        <method-return-value>int</method-return-value>
        <wsdl-message
xmlns:wsdlMsgNS="urn:geronimo-samples">wsdlMsgNS:CalculatorService_additionResponse</wsdl-message>
        <wsdl-message-part-name>result</wsdl-message-part-name>
      </wsdl-return-value-mapping>
    </service-endpoint-method-mapping>
  </service-endpoint-interface-mapping>
</java-wsdl-mapping>

######################### ejb-jar.xml ######################################

<?xml version="1.0" encoding="UTF-8"?>

<ejb-jar  xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd" version="2.1">
   <description><![CDATA[Calc Application]]></description>
   <display-name>Generated by XDoclet</display-name>
   <enterprise-beans>
      <!-- Session Beans -->
      <session >
         <description><![CDATA[]]></description>

         <ejb-name>CalculatorServiceBean</ejb-name>

      	 <service-endpoint>org.apache.geronimo.samples.calc.CalculatorService</service-endpoint>
         <ejb-class>org.apache.geronimo.samples.calc.ejb.CalculatorServiceBean</ejb-class>
         <session-type>Stateless</session-type>
         <transaction-type>Container</transaction-type>

      </session>

</ejb-jar>

############################ openejb-jar.xml
#################################

<?xml version="1.0" encoding="UTF-8"?>
<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>org.apache.geronimo.samples</dep:groupId>
			<dep:artifactId>CalculatorEJB</dep:artifactId>
			<dep:version>1.0</dep:version>
			<dep:type>car</dep:type>
		</dep:moduleId>
		<dep:dependencies>
		     <dep:dependency>
			<dep:groupId>geronimo</dep:groupId>
			<dep:artifactId>geronimo-webservices</dep:artifactId>
			<dep:type>jar</dep:type>
		     </dep:dependency>
		     <dep:dependency>
		        <dep:groupId>geronimo</dep:groupId>
               		<dep:artifactId>geronimo-axis</dep:artifactId>
               		<dep:type>jar</dep:type>
             	     </dep:dependency>
		     <dep:dependency>
               		<dep:groupId>geronimo</dep:groupId>
               		<dep:artifactId>tomcat</dep:artifactId>
               		<dep:type>car</dep:type>
            	     </dep:dependency>
		</dep:dependencies>
		<dep:hidden-classes/>
		<dep:non-overridable-classes/>
	</dep:environment>
	<enterprise-beans>
		<session>
			<ejb-name>CalculatorServiceBean</ejb-name>
			<web-service-address>/Calculator/calc-ejb</web-service-address>
		</session>
	</enterprise-beans>

</openejb-jar>

####################### geronimo-web.xml
#####################################

<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1"
xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.1">
  <dep:environment
xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
    <dep:moduleId>
      <dep:groupId>org.apache.geronimo.samples</dep:groupId>
      <dep:artifactId>CalculatorWeb</dep:artifactId>
      <dep:version>1.0</dep:version>
      <dep:type>car</dep:type>
    </dep:moduleId>
    <dep:dependencies>
	<dep:dependency>
           <dep:groupId>geronimo</dep:groupId>
           <dep:artifactId>geronimo-webservices</dep:artifactId>
           <dep:type>jar</dep:type>
        </dep:dependency>
	<dep:dependency>
           <dep:groupId>geronimo</dep:groupId>
           <dep:artifactId>geronimo-axis</dep:artifactId>
           <dep:type>jar</dep:type>
        </dep:dependency>
    </dep:dependencies>
    <dep:hidden-classes/>
    <dep:non-overridable-classes/>
  </dep:environment>
  <context-root>/Calculator</context-root>

  <service-ref>
	<service-ref-name>services/Calculator</service-ref-name>
	<port>
		<port-name>CalculatorServicePort</port-name>
		<protocol>http</protocol>
		<host>localhost</host>
		<port>8080</port>
		<uri>/Calculator/calc-ejb</uri>
	</port>
  </service-ref>

</web-app>

############################# web.xml
###############################################

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:calc="urn:geronimo-samples"
		xmlns="http://java.sun.com/xml/ns/j2ee"
		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
		xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
		version="2.4">
	<servlet>
		<display-name>CalculatorServiceServlet</display-name>
		<servlet-name>CalculatorServiceServlet</servlet-name>
		<servlet-class>
			org.apache.geronimo.samples.calc.web.CalculatorServiceServlet
		</servlet-class>
	</servlet>
	<servlet>
		<display-name>CalculatorClientServlet</display-name>
		<servlet-name>CalculatorClientServlet</servlet-name>
		<servlet-class>
			org.apache.geronimo.samples.calc.web.CalculatorClientServlet
		</servlet-class>
	</servlet>

	<servlet-mapping>
		<servlet-name>CalculatorServiceServlet</servlet-name>
		<url-pattern>/calc-servlet</url-pattern>
	</servlet-mapping>

	<servlet-mapping>
		<servlet-name>CalculatorClientServlet</servlet-name>
		<url-pattern>/calc-client</url-pattern>
	</servlet-mapping>


	<service-ref>
		<service-ref-name>services/Calculator</service-ref-name>
		<service-interface>javax.xml.rpc.Service</service-interface>
	</service-ref>

</web-app>

Thanks,
Lasantha Ranaweera



Re: Session Bean as a Web Service - V2

Posted by Manu George <ma...@gmail.com>.
Forgot to mention that you need to replace
http://localhost:8080/TestEJB/Hello with the url of your web service

Thanks
Manu

On 10/25/06, Manu George <ma...@gmail.com> wrote:
> Hi lasantha,
>
>          Is the problem you are facing related to
> http://issues.apache.org/jira/browse/GERONIMO-1597. You can verify by
> entering http://localhost:8080/TestEJB/Hello?wsdl in the browser. If
> this changes to http://localhost:8080/TestEJB/Hello/?wsdl then its the
> same problem.
>
>  To work around this you can give the url for the service as
> http://localhost:8080/TestEJB/Hello instead of
> http://localhost:8080/TestEJB/Hello?wsdl. You can thus invoke the
> service but you will not be able to see the WSDL.
>
> This problem occurs because when the Context name and the url name are
> same tomcat adds a forward slash. The context name and the url name
> are coming as same always as the axis integration code creates a
> separate context with the service URL for EJB web services. I am not
> sure what is the best way to fix this JIRA. David Jenks expertise is
> required for that as you rightly mentioned :-)
>
> Thanks
> Manu
>
> On 10/25/06, Lasantha Ranaweera <la...@opensource.lk> wrote:
> >
> >  Hi Dirk,
> >
> >  It gives the same problem for Jetty too. So we might missing something
> > here. Even I can't access WSDL from my web browser.
> >
> >  David Jenks would you be able to lend some of your expertise  in  resolving
> > this matter.  :-)
> >
> >  Thanks,
> >  Lasantha Ranaweera
> >
> >  Kaeto23 wrote:
> >  -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: RIPEMD160
> >
> > Greetings,
> >
> > I have the same problem: deploying works but accessing the endpoint is
> > not possible. Funnily I don't get any stacktrace or similar. So, yes,
> > it's right that you have a webservice but nobody said that you can
> > execute it ;) (sorry for being a little bit sarcastic)
> >
> > Anyway, could you try a different Geronimo server? I mean: could you try
> > to deploy your app on the jetty version of Geronimo? Webservices on
> > Jetty are (questionably) working. At least for me. But Jetty has
> > problems with encoded urls (jsessionid problem).
> >
> > So ...
> >
> > Use Jetty for webservices, and tomcat for websites.
> >
> > That's my knowledge about it ^^;;;;;
> >
> > Best regards
> >
> > Dirk
> >
> > lasantha@opensource.lk schrieb:
> >
> >
> >  Hi All,
> >
> > In one of previous mails I asked how can I deploy session bean as a web
> > service. Now with the help of David and others I can deploy it in G 1.1.1
> > without errors. But it gives following error when I try to access it
> > through a web client in same ear. I can't view the WSDL of the WS from a
> > browser too.
> >
> > Any obvious thing I am missing here?
> >
> > ########### Error when accessing WS from a client #####################
> >
> > javax.xml.rpc.ServiceException: no port for class
> > org.apache.geronimo.samples.calc.CalculatorService
> >  at
> > org.apache.geronimo.axis.client.ServiceImpl.internalGetPortFromClassName(ServiceImpl.java:160)
> >  at
> > org.apache.geronimo.axis.client.ServiceImpl.getPort(ServiceImpl.java:78)
> >  at
> > org.apache.geronimo.samples.calc.web.CalculatorClientServlet.callService(Unknown
> > Source)
> >  at
> > org.apache.geronimo.samples.calc.web.CalculatorClientServlet.doGet(Unknown
> > Source)
> >  at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
> >  at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
> >  at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
> >  at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> >  at
> > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
> >  at
> > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
> >  at
> > org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(DefaultSubjectValve.java:56)
> >  at
> > org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:342)
> >  at
> > org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:31)
> >  at
> > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
> >  at
> > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
> >  at
> > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
> >  at
> > org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541)
> >  at
> > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
> >  at
> > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
> >  at
> > org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
> >  at
> > org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
> >  at
> > org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
> >  at
> > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
> >  at java.lang.Thread.run(Thread.java:595)
> >
> > ################### CalculatorServiceEJB.wsdl ##############################
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> >
> > <definitions name="CalculatorServiceEJB"
> > targetNamespace="urn:geronimo-samples"
> > xmlns:tns="urn:geronimo-samples"
> > xmlns="http://schemas.xmlsoap.org/wsdl/"
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
> >  <types/>
> >  <message name="CalculatorService_addition">
> >  <part name="int_1" type="xsd:int"/>
> >  <part name="int_2" type="xsd:int"/>
> >  </message>
> >  <message name="CalculatorService_additionResponse">
> >  <part name="result" type="xsd:int"/>
> >  </message>
> >  <portType name="CalculatorService">
> >  <operation name="addition" parameterOrder="int_1 int_2">
> >  <input message="tns:CalculatorService_addition"/>
> >  <output message="tns:CalculatorService_additionResponse"/>
> >  </operation>
> >  </portType>
> >  <binding name="CalculatorServiceBinding" type="tns:CalculatorService">
> >  <soap:binding
> > transport="http://schemas.xmlsoap.org/soap/http"
> > style="rpc"/>
> >  <operation name="addition">
> >  <soap:operation soapAction=""/>
> >  <input>
> >  <soap:body
> > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> > use="encoded" namespace="urn:geronimo-samples"/>
> >  </input>
> >  <output>
> >  <soap:body
> > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> > use="encoded" namespace="urn:geronimo-samples"/>
> >  </output>
> >  </operation>
> >  </binding>
> >  <service name="CalculatorServiceEJB">
> >  <port name="CalculatorServicePort"
> > binding="tns:CalculatorServiceBinding">
> >  <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
> >  </port>
> >  </service>
> >  </definitions>
> >
> > ###################### jaxrpc-mapping.xml #########################
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <java-wsdl-mapping xmlns="http://java.sun.com/xml/ns/j2ee"
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > version="1.1"
> > xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> > http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd">
> >  <package-mapping>
> > <package-type>org.apache.geronimo.samples.calc</package-type>
> >  <namespaceURI>urn:geronimo-samples</namespaceURI>
> >  </package-mapping>
> >  <package-mapping>
> > <package-type>org.apache.geronimo.samples.calc</package-type>
> >  <namespaceURI>urn:geronimo-samples</namespaceURI>
> >  </package-mapping>
> >  <service-interface-mapping>
> >  <service-interface>
> >  org.apache.geronimo.samples.calc.CalculatorService
> >  </service-interface>
> >  <wsdl-service-name
> > xmlns:serviceNS="urn:geronimo-samples">serviceNS:CalculatorServiceEJB</wsdl-service-name>
> >  <port-mapping>
> >  <port-name>CalculatorServicePort</port-name>
> >  <java-port-name>CalculatorServicePort</java-port-name>
> >  </port-mapping>
> >  </service-interface-mapping>
> >  <service-endpoint-interface-mapping>
> > <service-endpoint-interface>org.apache.geronimo.samples.calc.CalculatorService</service-endpoint-interface>
> >  <wsdl-port-type
> > xmlns:portTypeNS="urn:geronimo-samples">portTypeNS:CalculatorService</wsdl-port-type>
> >  <wsdl-binding
> > xmlns:bindingNS="urn:geronimo-samples">bindingNS:CalculatorServiceBinding</wsdl-binding>
> >  <service-endpoint-method-mapping>
> >  <java-method-name>addition</java-method-name>
> >  <wsdl-operation>addition</wsdl-operation>
> >  <method-param-parts-mapping>
> >  <param-position>0</param-position>
> >  <param-type>int</param-type>
> >  <wsdl-message-mapping>
> >  <wsdl-message
> > xmlns:wsdlMsgNS="urn:geronimo-samples">wsdlMsgNS:CalculatorService_addition</wsdl-message>
> >  <wsdl-message-part-name>int_1</wsdl-message-part-name>
> >  <parameter-mode>IN</parameter-mode>
> >  </wsdl-message-mapping>
> >  </method-param-parts-mapping>
> >  <method-param-parts-mapping>
> >  <param-position>1</param-position>
> >  <param-type>int</param-type>
> >  <wsdl-message-mapping>
> >  <wsdl-message
> > xmlns:wsdlMsgNS="urn:geronimo-samples">wsdlMsgNS:CalculatorService_addition</wsdl-message>
> >  <wsdl-message-part-name>int_2</wsdl-message-part-name>
> >  <parameter-mode>IN</parameter-mode>
> >  </wsdl-message-mapping>
> >  </method-param-parts-mapping>
> >  <wsdl-return-value-mapping>
> >  <method-return-value>int</method-return-value>
> >  <wsdl-message
> > xmlns:wsdlMsgNS="urn:geronimo-samples">wsdlMsgNS:CalculatorService_additionResponse</wsdl-message>
> >  <wsdl-message-part-name>result</wsdl-message-part-name>
> >  </wsdl-return-value-mapping>
> >  </service-endpoint-method-mapping>
> >  </service-endpoint-interface-mapping>
> > </java-wsdl-mapping>
> >
> > ######################### ejb-jar.xml
> > ######################################
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> >
> > <ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee"
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> > http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"
> > version="2.1">
> >  <description><![CDATA[Calc Application]]></description>
> >  <display-name>Generated by XDoclet</display-name>
> >  <enterprise-beans>
> >  <!-- Session Beans -->
> >  <session >
> >  <description><![CDATA[]]></description>
> >
> >  <ejb-name>CalculatorServiceBean</ejb-name>
> >
> > <service-endpoint>org.apache.geronimo.samples.calc.CalculatorService</service-endpoint>
> > <ejb-class>org.apache.geronimo.samples.calc.ejb.CalculatorServiceBean</ejb-class>
> >  <session-type>Stateless</session-type>
> >  <transaction-type>Container</transaction-type>
> >
> >  </session>
> >
> > </ejb-jar>
> >
> > ############################ openejb-jar.xml
> > #################################
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <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>org.apache.geronimo.samples</dep:groupId>
> >  <dep:artifactId>CalculatorEJB</dep:artifactId>
> >  <dep:version>1.0</dep:version>
> >  <dep:type>car</dep:type>
> >  </dep:moduleId>
> >  <dep:dependencies>
> >  <dep:dependency>
> >  <dep:groupId>geronimo</dep:groupId>
> >  <dep:artifactId>geronimo-webservices</dep:artifactId>
> >  <dep:type>jar</dep:type>
> >  </dep:dependency>
> >  <dep:dependency>
> >  <dep:groupId>geronimo</dep:groupId>
> >  <dep:artifactId>geronimo-axis</dep:artifactId>
> >  <dep:type>jar</dep:type>
> >  </dep:dependency>
> >  <dep:dependency>
> >  <dep:groupId>geronimo</dep:groupId>
> >  <dep:artifactId>tomcat</dep:artifactId>
> >  <dep:type>car</dep:type>
> >  </dep:dependency>
> >  </dep:dependencies>
> >  <dep:hidden-classes/>
> >  <dep:non-overridable-classes/>
> >  </dep:environment>
> >  <enterprise-beans>
> >  <session>
> >  <ejb-name>CalculatorServiceBean</ejb-name>
> > <web-service-address>/Calculator/calc-ejb</web-service-address>
> >  </session>
> >  </enterprise-beans>
> >
> > </openejb-jar>
> >
> > ####################### geronimo-web.xml
> > #####################################
> >
> > <web-app
> > xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1"
> > xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.1">
> >  <dep:environment
> > xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
> >  <dep:moduleId>
> >  <dep:groupId>org.apache.geronimo.samples</dep:groupId>
> >  <dep:artifactId>CalculatorWeb</dep:artifactId>
> >  <dep:version>1.0</dep:version>
> >  <dep:type>car</dep:type>
> >  </dep:moduleId>
> >  <dep:dependencies>
> >  <dep:dependency>
> >  <dep:groupId>geronimo</dep:groupId>
> >  <dep:artifactId>geronimo-webservices</dep:artifactId>
> >  <dep:type>jar</dep:type>
> >  </dep:dependency>
> >  <dep:dependency>
> >  <dep:groupId>geronimo</dep:groupId>
> >  <dep:artifactId>geronimo-axis</dep:artifactId>
> >  <dep:type>jar</dep:type>
> >  </dep:dependency>
> >  </dep:dependencies>
> >  <dep:hidden-classes/>
> >  <dep:non-overridable-classes/>
> >  </dep:environment>
> >  <context-root>/Calculator</context-root>
> >
> >  <service-ref>
> >  <service-ref-name>services/Calculator</service-ref-name>
> >  <port>
> >  <port-name>CalculatorServicePort</port-name>
> >  <protocol>http</protocol>
> >  <host>localhost</host>
> >  <port>8080</port>
> >  <uri>/Calculator/calc-ejb</uri>
> >  </port>
> >  </service-ref>
> >
> > </web-app>
> >
> > ############################# web.xml
> > ###############################################
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <web-app xmlns:calc="urn:geronimo-samples"
> >  xmlns="http://java.sun.com/xml/ns/j2ee"
> >  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >  xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> > http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
> >  version="2.4">
> >  <servlet>
> >  <display-name>CalculatorServiceServlet</display-name>
> >  <servlet-name>CalculatorServiceServlet</servlet-name>
> >  <servlet-class>
> > org.apache.geronimo.samples.calc.web.CalculatorServiceServlet
> >  </servlet-class>
> >  </servlet>
> >  <servlet>
> >  <display-name>CalculatorClientServlet</display-name>
> >  <servlet-name>CalculatorClientServlet</servlet-name>
> >  <servlet-class>
> > org.apache.geronimo.samples.calc.web.CalculatorClientServlet
> >  </servlet-class>
> >  </servlet>
> >
> >  <servlet-mapping>
> >  <servlet-name>CalculatorServiceServlet</servlet-name>
> >  <url-pattern>/calc-servlet</url-pattern>
> >  </servlet-mapping>
> >
> >  <servlet-mapping>
> >  <servlet-name>CalculatorClientServlet</servlet-name>
> >  <url-pattern>/calc-client</url-pattern>
> >  </servlet-mapping>
> >
> >
> >  <service-ref>
> >  <service-ref-name>services/Calculator</service-ref-name>
> >  <service-interface>javax.xml.rpc.Service</service-interface>
> >  </service-ref>
> >
> > </web-app>
> >
> > Thanks,
> > Lasantha Ranaweera
> >
> >
> >
> >
> >
> >
> >
> > - --
> > Kaeto23
> >
> > HTTP: http://kaeto23.dnsalias.com (german!)
> > Jabber: jabber://kaeto23@jabber.ds2/DS2
> >
> > Reclaim Your Inbox!
> > http://www.mozilla.org/products/thunderbird/
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.4.2 (GNU/Linux)
> > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> >
> > iD8DBQFFPG9WbiSTaBU+G6oRA6/mAJ4xPFXtq8dF0qmN/kP7dr0yYHmI0ACfVR76
> > ms9cAfAZaew3CIaXmTX6ACY=
> > =A0SK
> > -----END PGP SIGNATURE-----
> >
> >
> >
> >
> >
> > ___________________________________________________________
> > Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail:
> > http://mail.yahoo.de
> >
> >
> >
> >
>

Re: Session Bean as a Web Service - V2

Posted by Lasantha Ranaweera <la...@opensource.lk>.
Hi Manu,

Exactly the same problem.

Thanks,
Lasantha Ranaweera
Manu George wrote:
> Hi lasantha,
>
>         Is the problem you are facing related to
> http://issues.apache.org/jira/browse/GERONIMO-1597. You can verify by
> entering http://localhost:8080/TestEJB/Hello?wsdl in the browser. If
> this changes to http://localhost:8080/TestEJB/Hello/?wsdl then its the
> same problem.
>
> To work around this you can give the url for the service as
> http://localhost:8080/TestEJB/Hello instead of
> http://localhost:8080/TestEJB/Hello?wsdl. You can thus invoke the
> service but you will not be able to see the WSDL.
>
> This problem occurs because when the Context name and the url name are
> same tomcat adds a forward slash. The context name and the url name
> are coming as same always as the axis integration code creates a
> separate context with the service URL for EJB web services. I am not
> sure what is the best way to fix this JIRA. David Jenks expertise is
> required for that as you rightly mentioned :-)
>
> Thanks
> Manu
>
> On 10/25/06, Lasantha Ranaweera <la...@opensource.lk> wrote:
>>
>>  Hi Dirk,
>>
>>  It gives the same problem for Jetty too. So we might missing something
>> here. Even I can't access WSDL from my web browser.
>>
>>  David Jenks would you be able to lend some of your expertise  in  
>> resolving
>> this matter.  :-)
>>
>>  Thanks,
>>  Lasantha Ranaweera
>>
>>  Kaeto23 wrote:
>>  -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: RIPEMD160
>>
>> Greetings,
>>
>> I have the same problem: deploying works but accessing the endpoint is
>> not possible. Funnily I don't get any stacktrace or similar. So, yes,
>> it's right that you have a webservice but nobody said that you can
>> execute it ;) (sorry for being a little bit sarcastic)
>>
>> Anyway, could you try a different Geronimo server? I mean: could you try
>> to deploy your app on the jetty version of Geronimo? Webservices on
>> Jetty are (questionably) working. At least for me. But Jetty has
>> problems with encoded urls (jsessionid problem).
>>
>> So ...
>>
>> Use Jetty for webservices, and tomcat for websites.
>>
>> That's my knowledge about it ^^;;;;;
>>
>> Best regards
>>
>> Dirk
>>
>> lasantha@opensource.lk schrieb:
>>
>>
>>  Hi All,
>>
>> In one of previous mails I asked how can I deploy session bean as a web
>> service. Now with the help of David and others I can deploy it in G 
>> 1.1.1
>> without errors. But it gives following error when I try to access it
>> through a web client in same ear. I can't view the WSDL of the WS from a
>> browser too.
>>
>> Any obvious thing I am missing here?
>>
>> ########### Error when accessing WS from a client #####################
>>
>> javax.xml.rpc.ServiceException: no port for class
>> org.apache.geronimo.samples.calc.CalculatorService
>>  at
>> org.apache.geronimo.axis.client.ServiceImpl.internalGetPortFromClassName(ServiceImpl.java:160) 
>>
>>  at
>> org.apache.geronimo.axis.client.ServiceImpl.getPort(ServiceImpl.java:78)
>>  at
>> org.apache.geronimo.samples.calc.web.CalculatorClientServlet.callService(Unknown 
>>
>> Source)
>>  at
>> org.apache.geronimo.samples.calc.web.CalculatorClientServlet.doGet(Unknown 
>>
>> Source)
>>  at
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
>>  at
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
>>  at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) 
>>
>>  at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) 
>>
>>  at
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) 
>>
>>  at
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) 
>>
>>  at
>> org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(DefaultSubjectValve.java:56) 
>>
>>  at
>> org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:342) 
>>
>>  at
>> org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:31) 
>>
>>  at
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) 
>>
>>  at
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) 
>>
>>  at
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) 
>>
>>  at
>> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541) 
>>
>>  at
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) 
>>
>>  at
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) 
>>
>>  at
>> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667) 
>>
>>  at
>> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) 
>>
>>  at
>> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) 
>>
>>  at
>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) 
>>
>>  at java.lang.Thread.run(Thread.java:595)
>>
>> ################### CalculatorServiceEJB.wsdl 
>> ##############################
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>>
>> <definitions name="CalculatorServiceEJB"
>> targetNamespace="urn:geronimo-samples"
>> xmlns:tns="urn:geronimo-samples"
>> xmlns="http://schemas.xmlsoap.org/wsdl/"
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
>>  <types/>
>>  <message name="CalculatorService_addition">
>>  <part name="int_1" type="xsd:int"/>
>>  <part name="int_2" type="xsd:int"/>
>>  </message>
>>  <message name="CalculatorService_additionResponse">
>>  <part name="result" type="xsd:int"/>
>>  </message>
>>  <portType name="CalculatorService">
>>  <operation name="addition" parameterOrder="int_1 int_2">
>>  <input message="tns:CalculatorService_addition"/>
>>  <output message="tns:CalculatorService_additionResponse"/>
>>  </operation>
>>  </portType>
>>  <binding name="CalculatorServiceBinding" type="tns:CalculatorService">
>>  <soap:binding
>> transport="http://schemas.xmlsoap.org/soap/http"
>> style="rpc"/>
>>  <operation name="addition">
>>  <soap:operation soapAction=""/>
>>  <input>
>>  <soap:body
>> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>> use="encoded" namespace="urn:geronimo-samples"/>
>>  </input>
>>  <output>
>>  <soap:body
>> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>> use="encoded" namespace="urn:geronimo-samples"/>
>>  </output>
>>  </operation>
>>  </binding>
>>  <service name="CalculatorServiceEJB">
>>  <port name="CalculatorServicePort"
>> binding="tns:CalculatorServiceBinding">
>>  <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
>>  </port>
>>  </service>
>>  </definitions>
>>
>> ###################### jaxrpc-mapping.xml #########################
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <java-wsdl-mapping xmlns="http://java.sun.com/xml/ns/j2ee"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> version="1.1"
>> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
>> http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd">
>>  <package-mapping>
>> <package-type>org.apache.geronimo.samples.calc</package-type>
>>  <namespaceURI>urn:geronimo-samples</namespaceURI>
>>  </package-mapping>
>>  <package-mapping>
>> <package-type>org.apache.geronimo.samples.calc</package-type>
>>  <namespaceURI>urn:geronimo-samples</namespaceURI>
>>  </package-mapping>
>>  <service-interface-mapping>
>>  <service-interface>
>>  org.apache.geronimo.samples.calc.CalculatorService
>>  </service-interface>
>>  <wsdl-service-name
>> xmlns:serviceNS="urn:geronimo-samples">serviceNS:CalculatorServiceEJB</wsdl-service-name> 
>>
>>  <port-mapping>
>>  <port-name>CalculatorServicePort</port-name>
>>  <java-port-name>CalculatorServicePort</java-port-name>
>>  </port-mapping>
>>  </service-interface-mapping>
>>  <service-endpoint-interface-mapping>
>> <service-endpoint-interface>org.apache.geronimo.samples.calc.CalculatorService</service-endpoint-interface> 
>>
>>  <wsdl-port-type
>> xmlns:portTypeNS="urn:geronimo-samples">portTypeNS:CalculatorService</wsdl-port-type> 
>>
>>  <wsdl-binding
>> xmlns:bindingNS="urn:geronimo-samples">bindingNS:CalculatorServiceBinding</wsdl-binding> 
>>
>>  <service-endpoint-method-mapping>
>>  <java-method-name>addition</java-method-name>
>>  <wsdl-operation>addition</wsdl-operation>
>>  <method-param-parts-mapping>
>>  <param-position>0</param-position>
>>  <param-type>int</param-type>
>>  <wsdl-message-mapping>
>>  <wsdl-message
>> xmlns:wsdlMsgNS="urn:geronimo-samples">wsdlMsgNS:CalculatorService_addition</wsdl-message> 
>>
>>  <wsdl-message-part-name>int_1</wsdl-message-part-name>
>>  <parameter-mode>IN</parameter-mode>
>>  </wsdl-message-mapping>
>>  </method-param-parts-mapping>
>>  <method-param-parts-mapping>
>>  <param-position>1</param-position>
>>  <param-type>int</param-type>
>>  <wsdl-message-mapping>
>>  <wsdl-message
>> xmlns:wsdlMsgNS="urn:geronimo-samples">wsdlMsgNS:CalculatorService_addition</wsdl-message> 
>>
>>  <wsdl-message-part-name>int_2</wsdl-message-part-name>
>>  <parameter-mode>IN</parameter-mode>
>>  </wsdl-message-mapping>
>>  </method-param-parts-mapping>
>>  <wsdl-return-value-mapping>
>>  <method-return-value>int</method-return-value>
>>  <wsdl-message
>> xmlns:wsdlMsgNS="urn:geronimo-samples">wsdlMsgNS:CalculatorService_additionResponse</wsdl-message> 
>>
>>  <wsdl-message-part-name>result</wsdl-message-part-name>
>>  </wsdl-return-value-mapping>
>>  </service-endpoint-method-mapping>
>>  </service-endpoint-interface-mapping>
>> </java-wsdl-mapping>
>>
>> ######################### ejb-jar.xml
>> ######################################
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>>
>> <ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
>> http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"
>> version="2.1">
>>  <description><![CDATA[Calc Application]]></description>
>>  <display-name>Generated by XDoclet</display-name>
>>  <enterprise-beans>
>>  <!-- Session Beans -->
>>  <session >
>>  <description><![CDATA[]]></description>
>>
>>  <ejb-name>CalculatorServiceBean</ejb-name>
>>
>> <service-endpoint>org.apache.geronimo.samples.calc.CalculatorService</service-endpoint> 
>>
>> <ejb-class>org.apache.geronimo.samples.calc.ejb.CalculatorServiceBean</ejb-class> 
>>
>>  <session-type>Stateless</session-type>
>>  <transaction-type>Container</transaction-type>
>>
>>  </session>
>>
>> </ejb-jar>
>>
>> ############################ openejb-jar.xml
>> #################################
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <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>org.apache.geronimo.samples</dep:groupId>
>>  <dep:artifactId>CalculatorEJB</dep:artifactId>
>>  <dep:version>1.0</dep:version>
>>  <dep:type>car</dep:type>
>>  </dep:moduleId>
>>  <dep:dependencies>
>>  <dep:dependency>
>>  <dep:groupId>geronimo</dep:groupId>
>>  <dep:artifactId>geronimo-webservices</dep:artifactId>
>>  <dep:type>jar</dep:type>
>>  </dep:dependency>
>>  <dep:dependency>
>>  <dep:groupId>geronimo</dep:groupId>
>>  <dep:artifactId>geronimo-axis</dep:artifactId>
>>  <dep:type>jar</dep:type>
>>  </dep:dependency>
>>  <dep:dependency>
>>  <dep:groupId>geronimo</dep:groupId>
>>  <dep:artifactId>tomcat</dep:artifactId>
>>  <dep:type>car</dep:type>
>>  </dep:dependency>
>>  </dep:dependencies>
>>  <dep:hidden-classes/>
>>  <dep:non-overridable-classes/>
>>  </dep:environment>
>>  <enterprise-beans>
>>  <session>
>>  <ejb-name>CalculatorServiceBean</ejb-name>
>> <web-service-address>/Calculator/calc-ejb</web-service-address>
>>  </session>
>>  </enterprise-beans>
>>
>> </openejb-jar>
>>
>> ####################### geronimo-web.xml
>> #####################################
>>
>> <web-app
>> xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1"
>> xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.1">
>>  <dep:environment
>> xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
>>  <dep:moduleId>
>>  <dep:groupId>org.apache.geronimo.samples</dep:groupId>
>>  <dep:artifactId>CalculatorWeb</dep:artifactId>
>>  <dep:version>1.0</dep:version>
>>  <dep:type>car</dep:type>
>>  </dep:moduleId>
>>  <dep:dependencies>
>>  <dep:dependency>
>>  <dep:groupId>geronimo</dep:groupId>
>>  <dep:artifactId>geronimo-webservices</dep:artifactId>
>>  <dep:type>jar</dep:type>
>>  </dep:dependency>
>>  <dep:dependency>
>>  <dep:groupId>geronimo</dep:groupId>
>>  <dep:artifactId>geronimo-axis</dep:artifactId>
>>  <dep:type>jar</dep:type>
>>  </dep:dependency>
>>  </dep:dependencies>
>>  <dep:hidden-classes/>
>>  <dep:non-overridable-classes/>
>>  </dep:environment>
>>  <context-root>/Calculator</context-root>
>>
>>  <service-ref>
>>  <service-ref-name>services/Calculator</service-ref-name>
>>  <port>
>>  <port-name>CalculatorServicePort</port-name>
>>  <protocol>http</protocol>
>>  <host>localhost</host>
>>  <port>8080</port>
>>  <uri>/Calculator/calc-ejb</uri>
>>  </port>
>>  </service-ref>
>>
>> </web-app>
>>
>> ############################# web.xml
>> ###############################################
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <web-app xmlns:calc="urn:geronimo-samples"
>>  xmlns="http://java.sun.com/xml/ns/j2ee"
>>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>  xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
>> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
>>  version="2.4">
>>  <servlet>
>>  <display-name>CalculatorServiceServlet</display-name>
>>  <servlet-name>CalculatorServiceServlet</servlet-name>
>>  <servlet-class>
>> org.apache.geronimo.samples.calc.web.CalculatorServiceServlet
>>  </servlet-class>
>>  </servlet>
>>  <servlet>
>>  <display-name>CalculatorClientServlet</display-name>
>>  <servlet-name>CalculatorClientServlet</servlet-name>
>>  <servlet-class>
>> org.apache.geronimo.samples.calc.web.CalculatorClientServlet
>>  </servlet-class>
>>  </servlet>
>>
>>  <servlet-mapping>
>>  <servlet-name>CalculatorServiceServlet</servlet-name>
>>  <url-pattern>/calc-servlet</url-pattern>
>>  </servlet-mapping>
>>
>>  <servlet-mapping>
>>  <servlet-name>CalculatorClientServlet</servlet-name>
>>  <url-pattern>/calc-client</url-pattern>
>>  </servlet-mapping>
>>
>>
>>  <service-ref>
>>  <service-ref-name>services/Calculator</service-ref-name>
>>  <service-interface>javax.xml.rpc.Service</service-interface>
>>  </service-ref>
>>
>> </web-app>
>>
>> Thanks,
>> Lasantha Ranaweera
>>
>>
>>
>>
>>
>>
>>
>> - --
>> Kaeto23
>>
>> HTTP: http://kaeto23.dnsalias.com (german!)
>> Jabber: jabber://kaeto23@jabber.ds2/DS2
>>
>> Reclaim Your Inbox!
>> http://www.mozilla.org/products/thunderbird/
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.2 (GNU/Linux)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>>
>> iD8DBQFFPG9WbiSTaBU+G6oRA6/mAJ4xPFXtq8dF0qmN/kP7dr0yYHmI0ACfVR76
>> ms9cAfAZaew3CIaXmTX6ACY=
>> =A0SK
>> -----END PGP SIGNATURE-----
>>
>>
>>
>>
>>
>> ___________________________________________________________
>> Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail:
>> http://mail.yahoo.de
>>
>>
>>
>>
>


Re: Session Bean as a Web Service - V2

Posted by Manu George <ma...@gmail.com>.
Hi lasantha,

         Is the problem you are facing related to
http://issues.apache.org/jira/browse/GERONIMO-1597. You can verify by
entering http://localhost:8080/TestEJB/Hello?wsdl in the browser. If
this changes to http://localhost:8080/TestEJB/Hello/?wsdl then its the
same problem.

 To work around this you can give the url for the service as
http://localhost:8080/TestEJB/Hello instead of
http://localhost:8080/TestEJB/Hello?wsdl. You can thus invoke the
service but you will not be able to see the WSDL.

This problem occurs because when the Context name and the url name are
same tomcat adds a forward slash. The context name and the url name
are coming as same always as the axis integration code creates a
separate context with the service URL for EJB web services. I am not
sure what is the best way to fix this JIRA. David Jenks expertise is
required for that as you rightly mentioned :-)

Thanks
Manu

On 10/25/06, Lasantha Ranaweera <la...@opensource.lk> wrote:
>
>  Hi Dirk,
>
>  It gives the same problem for Jetty too. So we might missing something
> here. Even I can't access WSDL from my web browser.
>
>  David Jenks would you be able to lend some of your expertise  in  resolving
> this matter.  :-)
>
>  Thanks,
>  Lasantha Ranaweera
>
>  Kaeto23 wrote:
>  -----BEGIN PGP SIGNED MESSAGE-----
> Hash: RIPEMD160
>
> Greetings,
>
> I have the same problem: deploying works but accessing the endpoint is
> not possible. Funnily I don't get any stacktrace or similar. So, yes,
> it's right that you have a webservice but nobody said that you can
> execute it ;) (sorry for being a little bit sarcastic)
>
> Anyway, could you try a different Geronimo server? I mean: could you try
> to deploy your app on the jetty version of Geronimo? Webservices on
> Jetty are (questionably) working. At least for me. But Jetty has
> problems with encoded urls (jsessionid problem).
>
> So ...
>
> Use Jetty for webservices, and tomcat for websites.
>
> That's my knowledge about it ^^;;;;;
>
> Best regards
>
> Dirk
>
> lasantha@opensource.lk schrieb:
>
>
>  Hi All,
>
> In one of previous mails I asked how can I deploy session bean as a web
> service. Now with the help of David and others I can deploy it in G 1.1.1
> without errors. But it gives following error when I try to access it
> through a web client in same ear. I can't view the WSDL of the WS from a
> browser too.
>
> Any obvious thing I am missing here?
>
> ########### Error when accessing WS from a client #####################
>
> javax.xml.rpc.ServiceException: no port for class
> org.apache.geronimo.samples.calc.CalculatorService
>  at
> org.apache.geronimo.axis.client.ServiceImpl.internalGetPortFromClassName(ServiceImpl.java:160)
>  at
> org.apache.geronimo.axis.client.ServiceImpl.getPort(ServiceImpl.java:78)
>  at
> org.apache.geronimo.samples.calc.web.CalculatorClientServlet.callService(Unknown
> Source)
>  at
> org.apache.geronimo.samples.calc.web.CalculatorClientServlet.doGet(Unknown
> Source)
>  at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
>  at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
>  at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
>  at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>  at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>  at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
>  at
> org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(DefaultSubjectValve.java:56)
>  at
> org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:342)
>  at
> org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:31)
>  at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
>  at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
>  at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
>  at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541)
>  at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
>  at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
>  at
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
>  at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
>  at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
>  at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
>  at java.lang.Thread.run(Thread.java:595)
>
> ################### CalculatorServiceEJB.wsdl ##############################
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <definitions name="CalculatorServiceEJB"
> targetNamespace="urn:geronimo-samples"
> xmlns:tns="urn:geronimo-samples"
> xmlns="http://schemas.xmlsoap.org/wsdl/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
>  <types/>
>  <message name="CalculatorService_addition">
>  <part name="int_1" type="xsd:int"/>
>  <part name="int_2" type="xsd:int"/>
>  </message>
>  <message name="CalculatorService_additionResponse">
>  <part name="result" type="xsd:int"/>
>  </message>
>  <portType name="CalculatorService">
>  <operation name="addition" parameterOrder="int_1 int_2">
>  <input message="tns:CalculatorService_addition"/>
>  <output message="tns:CalculatorService_additionResponse"/>
>  </operation>
>  </portType>
>  <binding name="CalculatorServiceBinding" type="tns:CalculatorService">
>  <soap:binding
> transport="http://schemas.xmlsoap.org/soap/http"
> style="rpc"/>
>  <operation name="addition">
>  <soap:operation soapAction=""/>
>  <input>
>  <soap:body
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> use="encoded" namespace="urn:geronimo-samples"/>
>  </input>
>  <output>
>  <soap:body
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> use="encoded" namespace="urn:geronimo-samples"/>
>  </output>
>  </operation>
>  </binding>
>  <service name="CalculatorServiceEJB">
>  <port name="CalculatorServicePort"
> binding="tns:CalculatorServiceBinding">
>  <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
>  </port>
>  </service>
>  </definitions>
>
> ###################### jaxrpc-mapping.xml #########################
>
> <?xml version="1.0" encoding="UTF-8"?>
> <java-wsdl-mapping xmlns="http://java.sun.com/xml/ns/j2ee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> version="1.1"
> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd">
>  <package-mapping>
> <package-type>org.apache.geronimo.samples.calc</package-type>
>  <namespaceURI>urn:geronimo-samples</namespaceURI>
>  </package-mapping>
>  <package-mapping>
> <package-type>org.apache.geronimo.samples.calc</package-type>
>  <namespaceURI>urn:geronimo-samples</namespaceURI>
>  </package-mapping>
>  <service-interface-mapping>
>  <service-interface>
>  org.apache.geronimo.samples.calc.CalculatorService
>  </service-interface>
>  <wsdl-service-name
> xmlns:serviceNS="urn:geronimo-samples">serviceNS:CalculatorServiceEJB</wsdl-service-name>
>  <port-mapping>
>  <port-name>CalculatorServicePort</port-name>
>  <java-port-name>CalculatorServicePort</java-port-name>
>  </port-mapping>
>  </service-interface-mapping>
>  <service-endpoint-interface-mapping>
> <service-endpoint-interface>org.apache.geronimo.samples.calc.CalculatorService</service-endpoint-interface>
>  <wsdl-port-type
> xmlns:portTypeNS="urn:geronimo-samples">portTypeNS:CalculatorService</wsdl-port-type>
>  <wsdl-binding
> xmlns:bindingNS="urn:geronimo-samples">bindingNS:CalculatorServiceBinding</wsdl-binding>
>  <service-endpoint-method-mapping>
>  <java-method-name>addition</java-method-name>
>  <wsdl-operation>addition</wsdl-operation>
>  <method-param-parts-mapping>
>  <param-position>0</param-position>
>  <param-type>int</param-type>
>  <wsdl-message-mapping>
>  <wsdl-message
> xmlns:wsdlMsgNS="urn:geronimo-samples">wsdlMsgNS:CalculatorService_addition</wsdl-message>
>  <wsdl-message-part-name>int_1</wsdl-message-part-name>
>  <parameter-mode>IN</parameter-mode>
>  </wsdl-message-mapping>
>  </method-param-parts-mapping>
>  <method-param-parts-mapping>
>  <param-position>1</param-position>
>  <param-type>int</param-type>
>  <wsdl-message-mapping>
>  <wsdl-message
> xmlns:wsdlMsgNS="urn:geronimo-samples">wsdlMsgNS:CalculatorService_addition</wsdl-message>
>  <wsdl-message-part-name>int_2</wsdl-message-part-name>
>  <parameter-mode>IN</parameter-mode>
>  </wsdl-message-mapping>
>  </method-param-parts-mapping>
>  <wsdl-return-value-mapping>
>  <method-return-value>int</method-return-value>
>  <wsdl-message
> xmlns:wsdlMsgNS="urn:geronimo-samples">wsdlMsgNS:CalculatorService_additionResponse</wsdl-message>
>  <wsdl-message-part-name>result</wsdl-message-part-name>
>  </wsdl-return-value-mapping>
>  </service-endpoint-method-mapping>
>  </service-endpoint-interface-mapping>
> </java-wsdl-mapping>
>
> ######################### ejb-jar.xml
> ######################################
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"
> version="2.1">
>  <description><![CDATA[Calc Application]]></description>
>  <display-name>Generated by XDoclet</display-name>
>  <enterprise-beans>
>  <!-- Session Beans -->
>  <session >
>  <description><![CDATA[]]></description>
>
>  <ejb-name>CalculatorServiceBean</ejb-name>
>
> <service-endpoint>org.apache.geronimo.samples.calc.CalculatorService</service-endpoint>
> <ejb-class>org.apache.geronimo.samples.calc.ejb.CalculatorServiceBean</ejb-class>
>  <session-type>Stateless</session-type>
>  <transaction-type>Container</transaction-type>
>
>  </session>
>
> </ejb-jar>
>
> ############################ openejb-jar.xml
> #################################
>
> <?xml version="1.0" encoding="UTF-8"?>
> <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>org.apache.geronimo.samples</dep:groupId>
>  <dep:artifactId>CalculatorEJB</dep:artifactId>
>  <dep:version>1.0</dep:version>
>  <dep:type>car</dep:type>
>  </dep:moduleId>
>  <dep:dependencies>
>  <dep:dependency>
>  <dep:groupId>geronimo</dep:groupId>
>  <dep:artifactId>geronimo-webservices</dep:artifactId>
>  <dep:type>jar</dep:type>
>  </dep:dependency>
>  <dep:dependency>
>  <dep:groupId>geronimo</dep:groupId>
>  <dep:artifactId>geronimo-axis</dep:artifactId>
>  <dep:type>jar</dep:type>
>  </dep:dependency>
>  <dep:dependency>
>  <dep:groupId>geronimo</dep:groupId>
>  <dep:artifactId>tomcat</dep:artifactId>
>  <dep:type>car</dep:type>
>  </dep:dependency>
>  </dep:dependencies>
>  <dep:hidden-classes/>
>  <dep:non-overridable-classes/>
>  </dep:environment>
>  <enterprise-beans>
>  <session>
>  <ejb-name>CalculatorServiceBean</ejb-name>
> <web-service-address>/Calculator/calc-ejb</web-service-address>
>  </session>
>  </enterprise-beans>
>
> </openejb-jar>
>
> ####################### geronimo-web.xml
> #####################################
>
> <web-app
> xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1"
> xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.1">
>  <dep:environment
> xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
>  <dep:moduleId>
>  <dep:groupId>org.apache.geronimo.samples</dep:groupId>
>  <dep:artifactId>CalculatorWeb</dep:artifactId>
>  <dep:version>1.0</dep:version>
>  <dep:type>car</dep:type>
>  </dep:moduleId>
>  <dep:dependencies>
>  <dep:dependency>
>  <dep:groupId>geronimo</dep:groupId>
>  <dep:artifactId>geronimo-webservices</dep:artifactId>
>  <dep:type>jar</dep:type>
>  </dep:dependency>
>  <dep:dependency>
>  <dep:groupId>geronimo</dep:groupId>
>  <dep:artifactId>geronimo-axis</dep:artifactId>
>  <dep:type>jar</dep:type>
>  </dep:dependency>
>  </dep:dependencies>
>  <dep:hidden-classes/>
>  <dep:non-overridable-classes/>
>  </dep:environment>
>  <context-root>/Calculator</context-root>
>
>  <service-ref>
>  <service-ref-name>services/Calculator</service-ref-name>
>  <port>
>  <port-name>CalculatorServicePort</port-name>
>  <protocol>http</protocol>
>  <host>localhost</host>
>  <port>8080</port>
>  <uri>/Calculator/calc-ejb</uri>
>  </port>
>  </service-ref>
>
> </web-app>
>
> ############################# web.xml
> ###############################################
>
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app xmlns:calc="urn:geronimo-samples"
>  xmlns="http://java.sun.com/xml/ns/j2ee"
>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>  xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
>  version="2.4">
>  <servlet>
>  <display-name>CalculatorServiceServlet</display-name>
>  <servlet-name>CalculatorServiceServlet</servlet-name>
>  <servlet-class>
> org.apache.geronimo.samples.calc.web.CalculatorServiceServlet
>  </servlet-class>
>  </servlet>
>  <servlet>
>  <display-name>CalculatorClientServlet</display-name>
>  <servlet-name>CalculatorClientServlet</servlet-name>
>  <servlet-class>
> org.apache.geronimo.samples.calc.web.CalculatorClientServlet
>  </servlet-class>
>  </servlet>
>
>  <servlet-mapping>
>  <servlet-name>CalculatorServiceServlet</servlet-name>
>  <url-pattern>/calc-servlet</url-pattern>
>  </servlet-mapping>
>
>  <servlet-mapping>
>  <servlet-name>CalculatorClientServlet</servlet-name>
>  <url-pattern>/calc-client</url-pattern>
>  </servlet-mapping>
>
>
>  <service-ref>
>  <service-ref-name>services/Calculator</service-ref-name>
>  <service-interface>javax.xml.rpc.Service</service-interface>
>  </service-ref>
>
> </web-app>
>
> Thanks,
> Lasantha Ranaweera
>
>
>
>
>
>
>
> - --
> Kaeto23
>
> HTTP: http://kaeto23.dnsalias.com (german!)
> Jabber: jabber://kaeto23@jabber.ds2/DS2
>
> Reclaim Your Inbox!
> http://www.mozilla.org/products/thunderbird/
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFFPG9WbiSTaBU+G6oRA6/mAJ4xPFXtq8dF0qmN/kP7dr0yYHmI0ACfVR76
> ms9cAfAZaew3CIaXmTX6ACY=
> =A0SK
> -----END PGP SIGNATURE-----
>
>
>
>
>
> ___________________________________________________________
> Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail:
> http://mail.yahoo.de
>
>
>
>

Re: Session Bean as a Web Service - V2

Posted by Lasantha Ranaweera <la...@opensource.lk>.
Hi Dirk,

It gives the same problem for Jetty too. So we might missing something 
here. Even I can't access WSDL from my web browser.

David Jenks would you be able to lend some of your expertise  in  
resolving this matter.  :-)

Thanks,
Lasantha Ranaweera

Kaeto23 wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: RIPEMD160
>
> Greetings,
>
> I have the same problem: deploying works but accessing the endpoint is
> not possible. Funnily I don't get any stacktrace or similar. So, yes,
> it's right that you have a webservice but nobody said that you can
> execute it ;) (sorry for being a little bit sarcastic)
>
> Anyway, could you try a different Geronimo server? I mean: could you try
> to deploy your app on the jetty version of Geronimo? Webservices on
> Jetty are (questionably) working. At least for me. But Jetty has
> problems with encoded urls (jsessionid problem).
>
> So ...
>
> Use Jetty for webservices, and tomcat for websites.
>
> That's my knowledge about it ^^;;;;;
>
> Best regards
>
> Dirk
>
> lasantha@opensource.lk schrieb:
>   
>> Hi All,
>>
>> In one of previous mails I asked how can I deploy session bean as a web
>> service. Now with the help of David and others I can deploy it in G 1.1.1
>> without errors. But it gives following error when I try to access it
>> through a web client in same ear. I can't view the WSDL of the WS from a
>> browser too.
>>
>> Any obvious thing I am missing here?
>>
>> ########### Error when accessing WS from a client #####################
>>
>> javax.xml.rpc.ServiceException: no port for class
>> org.apache.geronimo.samples.calc.CalculatorService
>>         at
>> org.apache.geronimo.axis.client.ServiceImpl.internalGetPortFromClassName(ServiceImpl.java:160)
>>         at
>> org.apache.geronimo.axis.client.ServiceImpl.getPort(ServiceImpl.java:78)
>>         at
>> org.apache.geronimo.samples.calc.web.CalculatorClientServlet.callService(Unknown
>> Source)
>>         at
>> org.apache.geronimo.samples.calc.web.CalculatorClientServlet.doGet(Unknown
>> Source)
>>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
>>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
>>         at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
>>         at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>>         at
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>>         at
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
>>         at
>> org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(DefaultSubjectValve.java:56)
>>         at
>> org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:342)
>>         at
>> org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:31)
>>         at
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
>>         at
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
>>         at
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
>>         at
>> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541)
>>         at
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
>>         at
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
>>         at
>> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
>>         at
>> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
>>         at
>> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
>>         at
>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
>>         at java.lang.Thread.run(Thread.java:595)
>>
>> ################### CalculatorServiceEJB.wsdl ##############################
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>>
>> <definitions name="CalculatorServiceEJB"
>> targetNamespace="urn:geronimo-samples" xmlns:tns="urn:geronimo-samples"
>> xmlns="http://schemas.xmlsoap.org/wsdl/"
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
>>   <types/>
>>   <message name="CalculatorService_addition">
>>     <part name="int_1" type="xsd:int"/>
>>     <part name="int_2" type="xsd:int"/>
>>   </message>
>>   <message name="CalculatorService_additionResponse">
>>     <part name="result" type="xsd:int"/>
>>   </message>
>>   <portType name="CalculatorService">
>>     <operation name="addition" parameterOrder="int_1 int_2">
>>       <input message="tns:CalculatorService_addition"/>
>>       <output message="tns:CalculatorService_additionResponse"/>
>>     </operation>
>>   </portType>
>>   <binding name="CalculatorServiceBinding" type="tns:CalculatorService">
>>     <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
>> style="rpc"/>
>>     <operation name="addition">
>>       <soap:operation soapAction=""/>
>>       <input>
>>         <soap:body
>> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>> use="encoded" namespace="urn:geronimo-samples"/>
>>       </input>
>>       <output>
>>         <soap:body
>> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>> use="encoded" namespace="urn:geronimo-samples"/>
>>       </output>
>>     </operation>
>>   </binding>
>>   <service name="CalculatorServiceEJB">
>>     <port name="CalculatorServicePort"
>> binding="tns:CalculatorServiceBinding">
>>       <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
>>     </port>
>>   </service>
>>  </definitions>
>>
>> ###################### jaxrpc-mapping.xml #########################
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <java-wsdl-mapping xmlns="http://java.sun.com/xml/ns/j2ee"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1"
>> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee   
>> http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd">
>>   <package-mapping>
>>     <package-type>org.apache.geronimo.samples.calc</package-type>
>>     <namespaceURI>urn:geronimo-samples</namespaceURI>
>>   </package-mapping>
>>   <package-mapping>
>>     <package-type>org.apache.geronimo.samples.calc</package-type>
>>     <namespaceURI>urn:geronimo-samples</namespaceURI>
>>   </package-mapping>
>>   <service-interface-mapping>
>> 	<service-interface>
>> 		org.apache.geronimo.samples.calc.CalculatorService
>> 	</service-interface>
>>     <wsdl-service-name
>> xmlns:serviceNS="urn:geronimo-samples">serviceNS:CalculatorServiceEJB</wsdl-service-name>
>>     <port-mapping>
>>       <port-name>CalculatorServicePort</port-name>
>>       <java-port-name>CalculatorServicePort</java-port-name>
>>     </port-mapping>
>>   </service-interface-mapping>
>>   <service-endpoint-interface-mapping>
>>     <service-endpoint-interface>org.apache.geronimo.samples.calc.CalculatorService</service-endpoint-interface>
>>     <wsdl-port-type
>> xmlns:portTypeNS="urn:geronimo-samples">portTypeNS:CalculatorService</wsdl-port-type>
>>     <wsdl-binding
>> xmlns:bindingNS="urn:geronimo-samples">bindingNS:CalculatorServiceBinding</wsdl-binding>
>>     <service-endpoint-method-mapping>
>>       <java-method-name>addition</java-method-name>
>>       <wsdl-operation>addition</wsdl-operation>
>>       <method-param-parts-mapping>
>>         <param-position>0</param-position>
>>         <param-type>int</param-type>
>>         <wsdl-message-mapping>
>>           <wsdl-message
>> xmlns:wsdlMsgNS="urn:geronimo-samples">wsdlMsgNS:CalculatorService_addition</wsdl-message>
>>           <wsdl-message-part-name>int_1</wsdl-message-part-name>
>>           <parameter-mode>IN</parameter-mode>
>>         </wsdl-message-mapping>
>>       </method-param-parts-mapping>
>>       <method-param-parts-mapping>
>>         <param-position>1</param-position>
>>         <param-type>int</param-type>
>>         <wsdl-message-mapping>
>>           <wsdl-message
>> xmlns:wsdlMsgNS="urn:geronimo-samples">wsdlMsgNS:CalculatorService_addition</wsdl-message>
>>           <wsdl-message-part-name>int_2</wsdl-message-part-name>
>>           <parameter-mode>IN</parameter-mode>
>>         </wsdl-message-mapping>
>>       </method-param-parts-mapping>
>>       <wsdl-return-value-mapping>
>>         <method-return-value>int</method-return-value>
>>         <wsdl-message
>> xmlns:wsdlMsgNS="urn:geronimo-samples">wsdlMsgNS:CalculatorService_additionResponse</wsdl-message>
>>         <wsdl-message-part-name>result</wsdl-message-part-name>
>>       </wsdl-return-value-mapping>
>>     </service-endpoint-method-mapping>
>>   </service-endpoint-interface-mapping>
>> </java-wsdl-mapping>
>>
>> ######################### ejb-jar.xml ######################################
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>>
>> <ejb-jar  xmlns="http://java.sun.com/xml/ns/j2ee"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
>> http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd" version="2.1">
>>    <description><![CDATA[Calc Application]]></description>
>>    <display-name>Generated by XDoclet</display-name>
>>    <enterprise-beans>
>>       <!-- Session Beans -->
>>       <session >
>>          <description><![CDATA[]]></description>
>>
>>          <ejb-name>CalculatorServiceBean</ejb-name>
>>
>>       	 <service-endpoint>org.apache.geronimo.samples.calc.CalculatorService</service-endpoint>
>>          <ejb-class>org.apache.geronimo.samples.calc.ejb.CalculatorServiceBean</ejb-class>
>>          <session-type>Stateless</session-type>
>>          <transaction-type>Container</transaction-type>
>>
>>       </session>
>>
>> </ejb-jar>
>>
>> ############################ openejb-jar.xml
>> #################################
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <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>org.apache.geronimo.samples</dep:groupId>
>> 			<dep:artifactId>CalculatorEJB</dep:artifactId>
>> 			<dep:version>1.0</dep:version>
>> 			<dep:type>car</dep:type>
>> 		</dep:moduleId>
>> 		<dep:dependencies>
>> 		     <dep:dependency>
>> 			<dep:groupId>geronimo</dep:groupId>
>> 			<dep:artifactId>geronimo-webservices</dep:artifactId>
>> 			<dep:type>jar</dep:type>
>> 		     </dep:dependency>
>> 		     <dep:dependency>
>> 		        <dep:groupId>geronimo</dep:groupId>
>>                		<dep:artifactId>geronimo-axis</dep:artifactId>
>>                		<dep:type>jar</dep:type>
>>              	     </dep:dependency>
>> 		     <dep:dependency>
>>                		<dep:groupId>geronimo</dep:groupId>
>>                		<dep:artifactId>tomcat</dep:artifactId>
>>                		<dep:type>car</dep:type>
>>             	     </dep:dependency>
>> 		</dep:dependencies>
>> 		<dep:hidden-classes/>
>> 		<dep:non-overridable-classes/>
>> 	</dep:environment>
>> 	<enterprise-beans>
>> 		<session>
>> 			<ejb-name>CalculatorServiceBean</ejb-name>
>> 			<web-service-address>/Calculator/calc-ejb</web-service-address>
>> 		</session>
>> 	</enterprise-beans>
>>
>> </openejb-jar>
>>
>> ####################### geronimo-web.xml
>> #####################################
>>
>> <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1"
>> xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.1">
>>   <dep:environment
>> xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
>>     <dep:moduleId>
>>       <dep:groupId>org.apache.geronimo.samples</dep:groupId>
>>       <dep:artifactId>CalculatorWeb</dep:artifactId>
>>       <dep:version>1.0</dep:version>
>>       <dep:type>car</dep:type>
>>     </dep:moduleId>
>>     <dep:dependencies>
>> 	<dep:dependency>
>>            <dep:groupId>geronimo</dep:groupId>
>>            <dep:artifactId>geronimo-webservices</dep:artifactId>
>>            <dep:type>jar</dep:type>
>>         </dep:dependency>
>> 	<dep:dependency>
>>            <dep:groupId>geronimo</dep:groupId>
>>            <dep:artifactId>geronimo-axis</dep:artifactId>
>>            <dep:type>jar</dep:type>
>>         </dep:dependency>
>>     </dep:dependencies>
>>     <dep:hidden-classes/>
>>     <dep:non-overridable-classes/>
>>   </dep:environment>
>>   <context-root>/Calculator</context-root>
>>
>>   <service-ref>
>> 	<service-ref-name>services/Calculator</service-ref-name>
>> 	<port>
>> 		<port-name>CalculatorServicePort</port-name>
>> 		<protocol>http</protocol>
>> 		<host>localhost</host>
>> 		<port>8080</port>
>> 		<uri>/Calculator/calc-ejb</uri>
>> 	</port>
>>   </service-ref>
>>
>> </web-app>
>>
>> ############################# web.xml
>> ###############################################
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <web-app xmlns:calc="urn:geronimo-samples"
>> 		xmlns="http://java.sun.com/xml/ns/j2ee"
>> 		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> 		xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
>> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
>> 		version="2.4">
>> 	<servlet>
>> 		<display-name>CalculatorServiceServlet</display-name>
>> 		<servlet-name>CalculatorServiceServlet</servlet-name>
>> 		<servlet-class>
>> 			org.apache.geronimo.samples.calc.web.CalculatorServiceServlet
>> 		</servlet-class>
>> 	</servlet>
>> 	<servlet>
>> 		<display-name>CalculatorClientServlet</display-name>
>> 		<servlet-name>CalculatorClientServlet</servlet-name>
>> 		<servlet-class>
>> 			org.apache.geronimo.samples.calc.web.CalculatorClientServlet
>> 		</servlet-class>
>> 	</servlet>
>>
>> 	<servlet-mapping>
>> 		<servlet-name>CalculatorServiceServlet</servlet-name>
>> 		<url-pattern>/calc-servlet</url-pattern>
>> 	</servlet-mapping>
>>
>> 	<servlet-mapping>
>> 		<servlet-name>CalculatorClientServlet</servlet-name>
>> 		<url-pattern>/calc-client</url-pattern>
>> 	</servlet-mapping>
>>
>>
>> 	<service-ref>
>> 		<service-ref-name>services/Calculator</service-ref-name>
>> 		<service-interface>javax.xml.rpc.Service</service-interface>
>> 	</service-ref>
>>
>> </web-app>
>>
>> Thanks,
>> Lasantha Ranaweera
>>
>>
>>
>>
>>     
>
> - --
> Kaeto23
>
> HTTP: http://kaeto23.dnsalias.com (german!)
> Jabber: jabber://kaeto23@jabber.ds2/DS2
>
> Reclaim Your Inbox!
> http://www.mozilla.org/products/thunderbird/
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFFPG9WbiSTaBU+G6oRA6/mAJ4xPFXtq8dF0qmN/kP7dr0yYHmI0ACfVR76
> ms9cAfAZaew3CIaXmTX6ACY=
> =A0SK
> -----END PGP SIGNATURE-----
>
> 	
>
> 	
> 		
> ___________________________________________________________ 
> Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
>
>