Sam Carleton
2014-03-24 15:19:50 UTC
I have been using Axis2/C for years with SOAP interface. I need to start
looking at adding a RESTful interface to my application. From what I read
on the web site, I can simply change the service.xml. But I have also seen
some emails about when will 1.7 be release that fixes RESTful support.
Is there RESTful support? If so, can I use my existing SOAP code and
change the service.xml? If I can, how do I do it? Here is one example of
my soap interfaces:
service.xml:
<operation name="getSlideImage" mep="
http://www.w3.org/2004/08/wsdl/in-out">
<parameter
name="wsamapping">urn:mmpp:cartManager/getSlideImage</parameter>
</operation>
I am thinking I want to use something like this:
<operation name="getNextSlideImage">
<parameter name="RESTMethod">GET</parameter>
<parameter name="RESTLocation">getNextSlideImage/{time}</parameter>
</operation>
Here is the WSDL request/responce for the operation:
<xsd:element name="getSlideImage">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="time" type="xsd:string"
nillable="true"></xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="getSlideImageResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="out" type="tns:imageDTO"
nillable="true"></xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="imageDTO">
<xsd:sequence>
<xsd:element name="folderId" type="xsd:string" />
<xsd:element name="imageId" type="xsd:string" />
<xsd:element name="time" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
looking at adding a RESTful interface to my application. From what I read
on the web site, I can simply change the service.xml. But I have also seen
some emails about when will 1.7 be release that fixes RESTful support.
Is there RESTful support? If so, can I use my existing SOAP code and
change the service.xml? If I can, how do I do it? Here is one example of
my soap interfaces:
service.xml:
<operation name="getSlideImage" mep="
http://www.w3.org/2004/08/wsdl/in-out">
<parameter
name="wsamapping">urn:mmpp:cartManager/getSlideImage</parameter>
</operation>
I am thinking I want to use something like this:
<operation name="getNextSlideImage">
<parameter name="RESTMethod">GET</parameter>
<parameter name="RESTLocation">getNextSlideImage/{time}</parameter>
</operation>
Here is the WSDL request/responce for the operation:
<xsd:element name="getSlideImage">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="time" type="xsd:string"
nillable="true"></xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="getSlideImageResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="out" type="tns:imageDTO"
nillable="true"></xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="imageDTO">
<xsd:sequence>
<xsd:element name="folderId" type="xsd:string" />
<xsd:element name="imageId" type="xsd:string" />
<xsd:element name="time" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>