Hi Rameh

I have very limited time to answer to you.
Also I am not an axis2 guru, but I typically make it do what I need if I fight for long enough.

Having said that here are a few quick pointers I can provide.
These are based on experience and what I think I know about axis2 ways to do things.
Axis2 real gurus, feel free to correct me.

There is 2 general ways to deploy a web service in axis2:

- deploy as a jar file
That seems to be the natural approach provided by axis2 if you build your project using the JAXWS programming model.
With this approach you generate code from the wsdl using wsimport (not wsdl2java).
You package as a jar files (see the jaxws-guide).
You do not use a services.xml file. That makes you life easier.
You deploy in the servicejars directory.
This directory uses a different deployer class.
Look in the axis2 configuration file to learn more.

That's the approach I use.

- deploy as a aar file
That's for all the other programming models supported by axis2.
Here you build your archive the axis2 way. That's why its not a war file.
You generate code using wsdl2java. That also produce a services.xml file.
You deploy in the services directory.

In theory aar files can be used as well for JAXWS project.
The guide however provides zero info on how to do this.
For instance you need to specify the message receivers.
I just gave up and deploy as aar in servicejars - easy!

Hoping this helps
Alain


-----------------------------------------------------------------
Alain Drolet 
QT12 Layer 2 Provisioning Design  
email: [email protected]
Location: CAR L10W F2 PJ6 Phone: (613) 763-4258; Fax: 763-4157  
Nortel, Ottawa, ON, Canada, K1Y 4H7


Ramesh Vishwanatham wrote:

Hi Axis2 Developers and Gurus

Recently I have sent  below request to "axis2-user" group and did not get any responses at all. I am evalutaing axis2 and JAX-WS programming model  and struck with simple sample application. I found there is not much material out there like "how-to" step by step guild to build web applications using axis2 and JAX-WS. I have read following link "http://ws.apache.org/axis2/1_4_1/jaxws-guide.html" and gives an overall high level view but lacks details.

May be some thing is wrong with my implementation class and/or services.xml file. Also there is a possibility there is bug in Axis2 1.4.1 for JAX-WS.

I am hoping some one will clarify this issue.

Thanks in Advance
Ramesh
------------------------------------------------------------------------------------------------------------------------------------------------------------
Hi All

I am getting below error when a client calls a web service operation built using Axis2 1.4.1, Java 1.6, JAX-WS
and Tomcat 6.0.18:


[ERROR] Message Receiver not found for AxisOperation: {http://service/}getQuote

org.apache.axis2.AxisFault: Message Receiver not found for AxisOperation: {http:

//service/}getQuote


Here are the steps followed:


1) Axis2 war file is deployed in Tomcat 6.0.18.


2) Using top-down model with existing wsdl. Generated server and client side code using wsimport tool part of
Java 1.6. Added Java implementation class for interface and deployed the service under services folder in axis2
WEB-INF.The service is deployed and it is active.


3) When I run the client I get an exception with above exception message


4) I also built service using axis2 WSDL2Java tool (adb as data binding) and deployed it. When I ran the
client (which is built using JAX-WS api) it works fine.


So the error is in service side with JAX-WS. Is it a bug in axis2 1.4.1 implememtation or some thing I am missing?


Please help me resolve this issue.


Below are the service implementation class, services.xml and wsdl files:


Prj71Impl.java

---------------

package service;

import javax.jws.WebService;

import javax.xml.ws.BindingType;

import javax.xml.ws.soap.SOAPBinding;



@WebService(endpointInterface = "service.Prj71",

       serviceName = "Prj71Service", wsdlLocation="META-INF/Prj71Service.wsdl", portName= "Prj71Port")

public class Prj71Impl implements Prj71 {


       public         GetQuoteResponse

       getQuote(GetQuoteRequest req) {

               GetQuoteResponse res = new GetQuoteResponse();

               res.setReturn(100);

               return res;

       }


}


services.xml

------------

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

<serviceGroup>

   <service name="Prj71Service" scope="application">

       <messageReceiver>

           <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
               class="org.apache.axis2.jaxws.server.JAXWSMessageReceiver"/>

       </messageReceiver>

       <parameter name="ServiceClass">service.Prj71Impl</parameter>

       <parameter name="useOriginalwsdl">true</parameter>

       <!-- Below entries are added but no difference in resolving the problem -->

       <parameter name="modifyUserWSDLPortAddress">true</parameter>

       <operation name="getQuote" mep="http://www.w3.org/2004/08/wsdl/in-out" namespace="http://service/">

           <actionMapping>tns:getQuote</actionMapping>

           <outputActionMapping>http://service/Prj71/getQuoteResponse</outputActionMapping>

       </operation>

   </service>

</serviceGroup>



Prj7Service.wsdl

-----------------


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


<wsdl:definitions  name="Prj71Service" targetNamespace="http://service/"

       xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://service/"
       xmlns:xsd="http://www.w3.org/2001/XMLSchema"
       xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">

 <wsdl:types>

   <xsd:schema>

     <xsd:import namespace="http://service/" schemaLocation="Prj71Service_schema1.xsd"/>

   </xsd:schema>

 </wsdl:types>

 <wsdl:message name="getQuoteRequest">

   <wsdl:part name="parameters" element="tns:GetQuoteRequest"/>

 </wsdl:message>

 <wsdl:message name="getQuoteResponse">

   <wsdl:part name="parameters" element="tns:GetQuoteResponse"/>

 </wsdl:message>

 <wsdl:portType name="Prj71">

   <wsdl:operation name="getQuote">

     <wsdl:input message="tns:getQuoteRequest"/>

     <wsdl:output message="tns:getQuoteResponse"/>

   </wsdl:operation>

 </wsdl:portType>

 <wsdl:binding name="Prj71PortBinding" type="tns:Prj71">

   <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>

   <wsdl:operation name="getQuote">

     <soap:operation soapAction="tns:getQuote"/>

     <wsdl:input>

       <soap:body use="literal"/>

     </wsdl:input>

     <wsdl:output>

       <soap:body use="literal"/>

     </wsdl:output>

   </wsdl:operation>

 </wsdl:binding>

 <wsdl:service name="Prj71Service">

   <wsdl:port name="Prj71Port" binding="tns:Prj71PortBinding">

     <soap:address location="http://localhost:8080/axis2/services/Prj71Service"/>

   </wsdl:port>

 </wsdl:service>

</wsdl:definitions>

 
Thanks

Ramesh

________________________________________________________
DTCC DISCLAIMER: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error, please notify us immediately and delete the email and any attachments from your system. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.


Reply via email to