You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by James Good <jg...@wfscorp.com> on 2006/09/25 02:10:19 UTC

Embedding an Axis2 WS in my existing web app.

Can someone help me please?

I have an existing J2EE web app which I deploy to an OC4J 10.1.2 app server. I need to expose one of the objects in there as a WS. So, I have been investigating axis2. 

I have read this very useful tutorial : http://www.wso2.net/kb/90

I have modified my web.xml to include the Axis servlet, and the servlet mapping for it :

  <servlet>
    <servlet-name>AxisServlet</servlet-name>
    <display-name>Axis Servlet</display-name>
    <servlet-class>org.apache.axis2.transport.http.AxisServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>

  <servlet-mapping>
    <servlet-name>AxisServlet</servlet-name>
    <url-pattern>/services/*</url-pattern>
  </servlet-mapping>

I have, under my WEB-INF directory, created a 'services' directory, a 'BookService' directory under that, and a META-INF directory under that. I have created a services.xml file as follows :

<serviceGroup>
	<service name="BookService"
             targetNamespace="http://ws.apache.org/axis2/samples/book/">
		<description>
			Book sample service
		</description>
        <schema schemaNamespace="http://ws.apache.org/axis2/samples/book/xsd/"/>
        <parameter name="ServiceClass" locked="false">com.wfs.aws.services.BookService</parameter>
		<operation name="getBooks">
			<messageReceiver class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
		</operation>
        <operation name="findBook">
            <messageReceiver class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
        </operation>
	</service>
</serviceGroup>

What jars should I need to include in my app? I have included all the axis*.jars.

I add the Book and BookService classes, then I am then expecting to see my 'BookService' service appear at

http://localhost:8888/WFSAWS/services/BookService

and be able to see the WSDL with 

http://localhost:8888/WFSAWS/services/BookService?wsdl

Is that what I should expect to be able to do, or am I missing something? Because it's not working as I thought it would. I'm getting 404 errors when I try accessing those URLs above.

Thank you for any help,

-James.

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Embedding an Axis2 WS in my existing web app.

Posted by Davanum Srinivas <da...@gmail.com>.
And make sure you are using a nightly...

-- dims

On 9/24/06, robert lazarski <ro...@gmail.com> wrote:
> What does http://localhost:8888/WFSAWS/listServices say?
>
> Robert
>
> On 9/24/06, James Good <jg...@wfscorp.com> wrote:
> > Can someone help me please?
> >
> > I have an existing J2EE web app which I deploy to an OC4J 10.1.2 app server. I need to expose one of the objects in there as a WS. So, I have been investigating axis2.
> >
> > I have read this very useful tutorial : http://www.wso2.net/kb/90
> >
> > I have modified my web.xml to include the Axis servlet, and the servlet mapping for it :
> >
> >   <servlet>
> >     <servlet-name>AxisServlet</servlet-name>
> >     <display-name>Axis Servlet</display-name>
> >     <servlet-class>org.apache.axis2.transport.http.AxisServlet</servlet-class>
> >     <load-on-startup>1</load-on-startup>
> >   </servlet>
> >
> >   <servlet-mapping>
> >     <servlet-name>AxisServlet</servlet-name>
> >     <url-pattern>/services/*</url-pattern>
> >   </servlet-mapping>
> >
> > I have, under my WEB-INF directory, created a 'services' directory, a 'BookService' directory under that, and a META-INF directory under that. I have created a services.xml file as follows :
> >
> > <serviceGroup>
> >         <service name="BookService"
> >              targetNamespace="http://ws.apache.org/axis2/samples/book/">
> >                 <description>
> >                         Book sample service
> >                 </description>
> >         <schema schemaNamespace="http://ws.apache.org/axis2/samples/book/xsd/"/>
> >         <parameter name="ServiceClass" locked="false">com.wfs.aws.services.BookService</parameter>
> >                 <operation name="getBooks">
> >                         <messageReceiver class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
> >                 </operation>
> >         <operation name="findBook">
> >             <messageReceiver class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
> >         </operation>
> >         </service>
> > </serviceGroup>
> >
> > What jars should I need to include in my app? I have included all the axis*.jars.
> >
> > I add the Book and BookService classes, then I am then expecting to see my 'BookService' service appear at
> >
> > http://localhost:8888/WFSAWS/services/BookService
> >
> > and be able to see the WSDL with
> >
> > http://localhost:8888/WFSAWS/services/BookService?wsdl
> >
> > Is that what I should expect to be able to do, or am I missing something? Because it's not working as I thought it would. I'm getting 404 errors when I try accessing those URLs above.
> >
> > Thank you for any help,
> >
> > -James.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Embedding an Axis2 WS in my existing web app.

Posted by robert lazarski <ro...@gmail.com>.
What does http://localhost:8888/WFSAWS/listServices say?

Robert

On 9/24/06, James Good <jg...@wfscorp.com> wrote:
> Can someone help me please?
>
> I have an existing J2EE web app which I deploy to an OC4J 10.1.2 app server. I need to expose one of the objects in there as a WS. So, I have been investigating axis2.
>
> I have read this very useful tutorial : http://www.wso2.net/kb/90
>
> I have modified my web.xml to include the Axis servlet, and the servlet mapping for it :
>
>   <servlet>
>     <servlet-name>AxisServlet</servlet-name>
>     <display-name>Axis Servlet</display-name>
>     <servlet-class>org.apache.axis2.transport.http.AxisServlet</servlet-class>
>     <load-on-startup>1</load-on-startup>
>   </servlet>
>
>   <servlet-mapping>
>     <servlet-name>AxisServlet</servlet-name>
>     <url-pattern>/services/*</url-pattern>
>   </servlet-mapping>
>
> I have, under my WEB-INF directory, created a 'services' directory, a 'BookService' directory under that, and a META-INF directory under that. I have created a services.xml file as follows :
>
> <serviceGroup>
>         <service name="BookService"
>              targetNamespace="http://ws.apache.org/axis2/samples/book/">
>                 <description>
>                         Book sample service
>                 </description>
>         <schema schemaNamespace="http://ws.apache.org/axis2/samples/book/xsd/"/>
>         <parameter name="ServiceClass" locked="false">com.wfs.aws.services.BookService</parameter>
>                 <operation name="getBooks">
>                         <messageReceiver class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
>                 </operation>
>         <operation name="findBook">
>             <messageReceiver class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
>         </operation>
>         </service>
> </serviceGroup>
>
> What jars should I need to include in my app? I have included all the axis*.jars.
>
> I add the Book and BookService classes, then I am then expecting to see my 'BookService' service appear at
>
> http://localhost:8888/WFSAWS/services/BookService
>
> and be able to see the WSDL with
>
> http://localhost:8888/WFSAWS/services/BookService?wsdl
>
> Is that what I should expect to be able to do, or am I missing something? Because it's not working as I thought it would. I'm getting 404 errors when I try accessing those URLs above.
>
> Thank you for any help,
>
> -James.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org