Hi Murugesh,

Did you have a look at this tutorial [1]?

Thanks,
Keith.

[1] http://wso2.org/library/3726

On Tue, Feb 17, 2009 at 4:43 PM, Murugesh Ramachandran <muru...@gmail.com>wrote:

> Greetings,
>
> I need some help in configuring REST on AXIS2. I have created a
> standard webservice using axis2. I would like to know how to i make
> this same service as REST. Is it possible to do that?
>
> URL -
> http://localhost:8080/services/services/categoryservice/getCategoryDetailsFromId
>
>
> I tried the following
>
> http://localhost:8080/services/services/categoryservice/getCategoryDetailsFromId?CategoryId=TELEVISIONS
>
> My webservice gets invoked but i am categoryId does not get passed.
>
> My WSDL is like this
>
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
> xmlns:tns="http://www.consumer.example.com/services/categoryservice/";
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> xmlns:ph="http://www.example.com/catalog/services/beans/category";
> name="categoryservice"
> targetNamespace="http://www.consumer.example.com/services/categoryservice/
> ">
>       <wsdl:types>
>
>               <xsd:schema
> targetNamespace="http://www.example.com/catalog/services/beans/category";>
>                       <xsd:include
> schemaLocation="../schemas/category.xsd"/>
>               </xsd:schema>
>               <xsd:schema
> targetNamespace="http://www.consumer.example.com/services/categoryservice/
> ">
>                                       <xsd:element name="CategoryId"
> type="xsd:string"/>
>               </xsd:schema>
>
>
>       </wsdl:types>
>
>       <wsdl:message name="Response">
>               <wsdl:part name="Response" element="ph:category"/>
>       </wsdl:message>
>       <wsdl:message name="Request">
>               <wsdl:part name="Request" element="ph:category"/>
>       </wsdl:message>
>       <wsdl:message name="RequestCategoryId">
>               <wsdl:part name="RequestCategoryId"
> element="tns:CategoryId"/>
>       </wsdl:message>
>       <wsdl:portType name="categoryservice">
>               <wsdl:operation name="getCategoryDetails">
>                       <wsdl:input message="tns:Request"/>
>                       <wsdl:output message="tns:Response"/>
>               </wsdl:operation>
>               <wsdl:operation name="getCategoryDetailsFromId">
>                       <wsdl:input message="tns:RequestCategoryId"/>
>                       <wsdl:output message="tns:Response"/>
>               </wsdl:operation>
>       </wsdl:portType>
>       <wsdl:binding name="categoryserviceSOAP" type="tns:categoryservice">
>               <soap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http"/>
>               <wsdl:operation name="getCategoryDetails">
>                       <soap:operation
> soapAction="
> http://localhost:8080/services/services/categoryservice/getCategoryDetails
> "/>
>                       <wsdl:input>
>                               <soap:body use="literal"/>
>                       </wsdl:input>
>                       <wsdl:output>
>                               <soap:body use="literal"/>
>                       </wsdl:output>
>               </wsdl:operation>
>               <wsdl:operation name="getCategoryDetailsFromId">
>                       <soap:operation
> soapAction="
> http://localhost:8080/services/services/categoryservice/getCategoryDetailsFromId
> "/>
>                       <wsdl:input>
>                               <soap:body use="literal"/>
>                       </wsdl:input>
>                       <wsdl:output>
>                               <soap:body use="literal"/>
>                       </wsdl:output>
>               </wsdl:operation>
>       </wsdl:binding>
>       <wsdl:service name="categoryservice">
>               <wsdl:port binding="tns:categoryserviceSOAP"
> name="categoryserviceSOAP">
>                       <soap:address
> location="http://localhost:8080/services/services/categoryservice/"/>
>               </wsdl:port>
>       </wsdl:service>
> </wsdl:definitions>
>
> Thanks
> Murugesh
>



-- 
Keith Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/

blog: http://www.keith-chapman.org

Reply via email to