I am using Axis2 version 1.6.1. Below is the section on ReST from the axis2.xml file. There is no parameter named enableRESTInAxis2MainServlet. I read that was removed a few versions back. Was it re-added in version 1.6.2?
<!--Our HTTP endpoints can handle both REST and SOAP. Following parameters can be used to distinguiush those endpoints--> <!--In case of a servlet, if you change this you have to manually change the settings of your servlet container to map this --> <!--context path to proper Axis2 servlets--> <!--<parameter name="servicePath">services</parameter>--> <!--<parameter name="restPath">rest</parameter>--> <!-- Following parameter will completely disable REST handling in Axis2--> <parameter name="disableREST" locked="false">false</parameter> Thanks, J _______________________________ From: Martin Gainty <[email protected]> To: "[email protected]" <[email protected]> Sent: Friday, March 29, 2013 12:09 PM Subject: RE: [Axis2] REST web service Jack Here are the REST parameters from Axis2 1.6.2 axis2.xml <!--Our HTTP endpoints can handle both REST and SOAP. Following parameters can be used to distingiush those endpoints--> <!--In case of a servlet, if you change this you have to manually change the settings of your servlet container to map this --> <!--context path to proper Axis2 servlets--> <!--<parameter name="servicePath">services</parameter>--> <!--<parameter name="restPath">rest</parameter>--> <!--Set the flag to true if you want to enable transport level session mangment--> <parameter name="manageTransportSession">false</parameter> <!--Following two parameters will be used to handle REST in Axis2. The default settings will make Axis2 to have two--> <!--different endpoints, one for REST (AxisRESTServlet) one for SOAP message handling (AxisServlet). But following--> <!--parameters help to tweak the message handling of two main servlets. --> <!-- If the enableRESTInAxis2MainServlet is true, then Axis2MainServlet will handle both SOAP and REST messages --> <parameter name="enableRESTInAxis2MainServlet" locked="true">false</parameter> <!-- Following parameter will completely disable REST handling in both the servlets--> <parameter name="disableREST" locked="true">false</parameter> <!-- This will disable the separate servlet we have for REST handling. --> <parameter name="disableSeparateEndpointForREST" locked="true">false</parameter> what version of Axis2 are you implementing? Martin ______________________________________________ Verzicht und Vertraulichkeitanmerkung Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. > Date: Fri, 29 Mar 2013 07:42:07 -0700 > From: [email protected] > Subject: Re: [Axis2] REST web service > To: [email protected] > > Martin, > > It looks like the "enableRESTInAxis2MainServlet" parameter was removed from > Axis2 long ago. What version were you using? > > As I understand it, ReST and SOAP are enabled by default. Do I need to > change anything in the configuration? > > Thanks, > J > > > ________________________________ > From: Martin Gainty <[email protected]> > To: "[email protected]" <[email protected]> > Sent: Thursday, March 28, 2013 8:55 PM > Subject: RE: [Axis2] REST web service > > > > 1)There are decidedly different configurations for REST vs SOAP in axis2.xml > generally 2 different servlets processing 2 different url-mappings > one for REST > one for SOAP > take a look at this configuration from axis2.xml for clarification on > enabling REST specific parameters > > <!--Our HTTP endpoints can handle both REST and SOAP. Following parameters > can be used to distingiush those endpoints--> > <!--In case of a servlet, if you change this you have to manually change > the settings of your servlet container to map this --> > <!-- context path to proper Axis2 servlets --> > <!-- <parameter name="servicePath">services</parameter> --> > <!-- <parameter name="restPath">rest</parameter> --> > > <!-- Following two parameters will be used to handle REST in Axis2. The > default settings will make Axis2 to have two-different endpoints, one for > REST (AxisRESTServlet) one for SOAP message handling (AxisServlet) --> > <!-- The following 2 parameters will help to tweak the message handling of > two main servlets. --> > <!-- If the enableRESTInAxis2MainServlet is true, then Axis2MainServlet will > handle *BOTH* SOAP and REST messages (not recommended) --> > <parameter name="enableRESTInAxis2MainServlet" > locked="true">false</parameter> > > <!-- Following parameter will completely disable REST handling in both > the servlets--> > <parameter name="disableREST" locked="true">false</parameter> > > <!-- This will disable the separate servlet we have for REST handling. --> > <parameter name="disableSeparateEndpointForREST" > locked="true">false</parameter> > > 2)WADL vs WSDL > AFAIK REST does not support WSDL but does support WADL (with included xsds) > http://bitworking.org/news/193/Do-we-need-WADL > > Looks like you have signigicant re-packaging from WSDL to WADL ahead of you. > > People who fall in love with REST should know why they dont like SOAP before > leaping > > Viel GLuck > Martin > ______________________________________________ > Verzicht und Vertraulichkeitanmerkung > > Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger > sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung > oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich > dem Austausch von Informationen und entfaltet keine rechtliche > Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen > wir keine Haftung fuer den Inhalt uebernehmen. > > > > Date: Fri, 22 Mar 2013 14:37:44 -0700 > > From: [email protected] > > Subject: Re: [Axis2] REST web service > > To: [email protected] > > CC: [email protected] > > > > > > > > Hello list. > > > > I never received an answer to the problem I had with a ReST call to my > > Axis2 web service. The binding is XMLBeans and the WSDL is 1.1. Does ReST > > only work with WSDL 2.0 in Axis2? > > > > Thanks to those that have replied but I still have made no progress with > > this. See the message below for the details. I've also included the WSDL > > and 3 schemas again below. > > > > WSDL: > > ===== > > > > <?xml version="1.0" encoding="UTF-8"?> > > <wsdl:definitions name="ShipmentTrackingService" > > targetNamespace="http://ws.mycompany.com/shipmenttracking";;; > > xmlns:ship="http://ws.mycompany.com/schema/shipmenttracking";;; > > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";;; > > xmlns:xsd="http://www.w3.org/2001/XMLSchema";;; > > xmlns:tns="http://ws.estesexpress.com/shipmenttracking";;; > > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";;;> > > <wsdl:documentation>Shipment tracking web service. Copyright > > 2012</wsdl:documentation> > > <wsdl:types> > > <xsd:schema attributeFormDefault="qualified" > > elementFormDefault="qualified" > > targetNamespace="http://ws.mycompany.com/shipmenttracking";;; > > xmlns:xsd="http://www.w3.org/2001/XMLSchema";;;> > > <xsd:complexType name="AuthenticationType"> > > <xsd:sequence> > > <xsd:element name="user" type="tns:UserType"/> > > <xsd:element name="password" type="tns:PasswordType"/> > > </xsd:sequence> > > </xsd:complexType> > > <xsd:simpleType name="EchoRequestType"> > > <xsd:restriction base="xsd:string"> > > <xsd:maxLength value="100"/> > > </xsd:restriction> > > </xsd:simpleType> > > <xsd:simpleType name="PasswordType"> > > <xsd:restriction base="xsd:string"> > > <xsd:minLength value="5"/> > > <xsd:maxLength value="10"/> > > </xsd:restriction> > > </xsd:simpleType> > > <xsd:simpleType name="UserType"> > > <xsd:restriction base="xsd:string"> > > <xsd:minLength value="5"/> > > <xsd:maxLength value="10"/> > > </xsd:restriction> > > </xsd:simpleType> > > <!-- Authentication SOAP Header --> > > <xsd:element name="auth" type="tns:AuthenticationType"/> > > <!-- Echo Request Type --> > > <xsd:element name="echoRequest" type="tns:EchoRequestType"/> > > <!-- Echo Response Type --> > > <xsd:element name="echoResponse" type="xsd:string"/> > > <!-- General Fault --> > > <xsd:element name="generalError" type="xsd:string"/> > > <!-- Schema Validation Fault --> > > <xsd:element name="schemaError" type="xsd:string"/> > > </xsd:schema> > > <xsd:schema attributeFormDefault="unqualified" > > elementFormDefault="qualified" > > targetNamespace="http://ws.mycompany.com/schema/shipmenttracking";;; > > xmlns:ship="http://ws.mycompany.com/schema/shipmenttracking";;; > > xmlns:xsd="http://www.w3.org/2001/XMLSchema";;;> > > <!-- Reference all the schemas --> > > <xsd:include schemaLocation="search.xsd"/> > > <xsd:include schemaLocation="results.xsd"/> > > </xsd:schema> > > </wsdl:types> > > <!-- Define SOAP message names. --> > > <wsdl:message name="authenticationMsg"> > > <wsdl:part name="authentication" element="tns:auth"> > > </wsdl:part> > > </wsdl:message> > > <wsdl:message name="echoRequestMsg"> > > <wsdl:part name="echoRequest" element="tns:echoRequest"> > > </wsdl:part> > > </wsdl:message> > > <wsdl:message name="echoResponseMsg"> > > <wsdl:part name="echoResponse" element="tns:echoResponse"> > > </wsdl:part> > > </wsdl:message> > > <wsdl:message name="trackRequestMsg"> > > <wsdl:part name="trackRequest" element="ship:search"> > > </wsdl:part> > > </wsdl:message> > > <wsdl:message name="trackingResultsMsg"> > > <wsdl:part name="trackingResults" element="ship:trackingInfo"> > > </wsdl:part> > > </wsdl:message> > > <wsdl:message name="generalErrorMsg"> > > <wsdl:part name="fault" element="tns:generalError"> > > </wsdl:part> > > </wsdl:message> > > <wsdl:message name="schemaErrorMsg"> > > <wsdl:part name="fault" element="tns:schemaError"> > > </wsdl:part> > > </wsdl:message> > > <wsdl:portType name="trackingPort"> > > <wsdl:operation name="echo"> > > <wsdl:input name="doEcho" message="tns:echoRequestMsg"> > > </wsdl:input> > > <wsdl:output name="echoReply" message="tns:echoResponseMsg"> > > </wsdl:output> > > </wsdl:operation> > > <wsdl:operation name="trackShipments"> > > <wsdl:input name="doTracking" message="tns:trackRequestMsg"> > > </wsdl:input> > > <wsdl:output name="trackingReply" message="tns:trackingResultsMsg"> > > </wsdl:output> > > <wsdl:fault name="generalErrorMessage" message="tns:generalErrorMsg"> > > </wsdl:fault> > > <wsdl:fault name="schemaErrorMessage" message="tns:schemaErrorMsg"> > > </wsdl:fault> > > </wsdl:operation> > > </wsdl:portType> > > <wsdl:binding name="shipmentTrackingBinding" type="tns:trackingPort"> > > <soap:binding style="document" > > transport="http://schemas.xmlsoap.org/soap/http%22/> > > <wsdl:operation name="echo"> > > <soap:operation > > soapAction="http://ws.estesexpress.com/shipmenttracking/echo";;; > > style="document"/> > > <wsdl:input name="doEcho"> > > <soap:body parts="echoRequest" use="literal"/> > > </wsdl:input> > > <wsdl:output name="echoReply"> > > <soap:body parts="echoResponse" use="literal"/> > > </wsdl:output> > > </wsdl:operation> > > <wsdl:operation name="trackShipments"> > > <soap:operation > > soapAction="http://ws.estesexpress.com/shipmenttracking/trackShipments";;; > > style="document"/> > > <wsdl:input name="doTracking"> > > <soap:header message="tns:authenticationMsg" part="authentication" > > use="literal"> > > </soap:header> > > <soap:body parts="trackRequest" use="literal"/> > > </wsdl:input> > > <wsdl:output name="trackingReply"> > > <soap:body parts="trackingResults" use="literal"/> > > </wsdl:output> > > <wsdl:fault name="generalErrorMessage"> > > <soap:fault name="generalErrorMessage" use="literal"/> > > </wsdl:fault> > > <wsdl:fault name="schemaErrorMessage"> > > <soap:fault name="schemaErrorMessage" use="literal"/> > > </wsdl:fault> > > </wsdl:operation> > > </wsdl:binding> > > <wsdl:service name="ShipmentTrackingService"> > > <wsdl:documentation>Shipment tracking web service</wsdl:documentation> > > <wsdl:port name="shipmentTracking" binding="tns:shipmentTrackingBinding"> > > <soap:address > > location="https://www.estes-express.com/shipmenttracking/services/ShipmentTrackingService%22/> > > </wsdl:port> > > </wsdl:service> > > </wsdl:definitions> > > > > Schemas: > > ======= > > > > Request: > > ----------- > > > > <?xml version="1.0" encoding="UTF-8"?> > > <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema%22; > > xmlns:ship="http://ws.estesexpress.com/schema/shipmenttracking%22; > > attributeFormDefault="unqualified" elementFormDefault="qualified" > > targetNamespace="http://ws.estesexpress.com/schema/shipmenttracking%22; > > xml:lang="en"> > > <xsd:annotation> > > > > <xsd:documentation xml:lang="en">Shipment tracking request. > > Copyright 2012 Estes Express Lines, Inc.</xsd:documentation> > > </xsd:annotation> > > <xsd:include schemaLocation="shipmentTrackingCommon.xsd" /> > > <xsd:element name="search"> > > <xsd:complexType> > > <xsd:sequence> > > <xsd:element ref="ship:requestID" /> > > <xsd:choice> > > <xsd:element name="pro" type="ship:ProType" /> > > <xsd:element name="bol" type="ship:BolType" /> > > <xsd:element name="po" type="ship:PoType" /> > > <xsd:element name="loadNumber" > > type="ship:LoadNumberType" /> > > <xsd:element name="interlinePro" > > type="ship:InterlineProType" /> > > <xsd:element name="pickupNumber" > > type="ship:PickupRequestNumberType" /> > > </xsd:choice> > > </xsd:sequence> > > </xsd:complexType> > > </xsd:element> > > </xsd:schema> > > > > > > Response: > > -------------- > > > > <?xml version="1.0" encoding="UTF-8"?> > > <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema";; > > xmlns:ship="http://ws.estesexpress.com/schema/shipmenttracking";; > > attributeFormDefault="unqualified" elementFormDefault="qualified" > > targetNamespace="http://ws.estesexpress.com/schema/shipmenttracking";; > > xml:lang="en"> > > <xsd:annotation> > > > > <xsd:documentation xml:lang="en">Shipment tracking results. > > Copyright 2012 Estes Express Lines, Inc.</xsd:documentation> > > </xsd:annotation> > > <xsd:include schemaLocation="shipmentTrackingCommon.xsd" /> > > <xsd:element name="trackingInfo"> > > <xsd:complexType> > > <xsd:sequence> > > <xsd:element ref="ship:requestID" /> > > <xsd:element name="version" type="ship:VersionType" /> > > <xsd:choice> > > <xsd:element name="shipments" type="ship:ShipmentsType" > > /> > > <xsd:element name="errors" type="ship:MessagesType" /> > > </xsd:choice> > > </xsd:sequence> > > </xsd:complexType> > > </xsd:element> > > <xsd:simpleType name="AddressLineType"> > > <xsd:restriction base="xsd:string"> > > <xsd:minLength value="1" /> > > <xsd:maxLength value="30" /> > > </xsd:restriction> > > </xsd:simpleType> > > <xsd:complexType name="AddressType"> > > <xsd:sequence> > > <xsd:element name="line1" type="ship:AddressLineType" /> > > <xsd:element name="line2" type="ship:AddressLineType" > > minOccurs="0" /> > > <xsd:element name="city" type="ship:CityType" /> > > <xsd:element name="stateProvince" type="ship:StateProvinceType" > > /> > > <xsd:element name="postalCode" type="ship:PostalCodeType" /> > > <xsd:element name="countryCode" type="ship:CountryCodeType" > > minOccurs="0" /> > > </xsd:sequence> > > </xsd:complexType> > > <xsd:complexType name="AppointmentType"> > > <xsd:sequence> > > <xsd:element name="apptDate" type="xsd:date" /> > > <xsd:element name="apptTime" type="xsd:time" /> > > <xsd:element name="status" type="ship:StatusType" /> > > </xsd:sequence> > > </xsd:complexType> > > <xsd:simpleType name="CarrierType"> > > <xsd:restriction base="xsd:string"> > > <xsd:minLength value="1" /> > > <xsd:maxLength value="20" /> > > </xsd:restriction> > > </xsd:simpleType> > > <xsd:simpleType name="ChargesType"> > > <xsd:restriction base="xsd:decimal"> > > <xsd:totalDigits value="7" /> > > <xsd:fractionDigits value="2" /> > > </xsd:restriction> > > </xsd:simpleType> > > <xsd:simpleType name="CityType"> > > <xsd:restriction base="xsd:string"> > > <xsd:minLength value="1" /> > > <xsd:maxLength value="20" /> > > </xsd:restriction> > > </xsd:simpleType> > > <xsd:simpleType name="CompanyNameType"> > > <xsd:restriction base="xsd:string"> > > <xsd:minLength value="1" /> > > <xsd:maxLength value="30" /> > > </xsd:restriction> > > </xsd:simpleType> > > <xsd:complexType name="CompanyType"> > > <xsd:annotation> > > <xsd:documentation>Company information</xsd:documentation> > > </xsd:annotation> > > <xsd:sequence> > > <xsd:element name="referenceNumber" > > type="ship:ReferenceNumberType" minOccurs="0" /> > > <xsd:element name="name" type="ship:CompanyNameType" /> > > <xsd:element name="address" type="ship:AddressType" /> > > </xsd:sequence> > > </xsd:complexType> > > <xsd:simpleType name="CountryCodeType"> > > <xsd:restriction base="xsd:string"> > > <xsd:minLength value="2" /> > > <xsd:maxLength value="2" /> > > </xsd:restriction> > > </xsd:simpleType> > > <xsd:complexType name="InterlineInfoType"> > > <xsd:annotation> > > <xsd:documentation>Interline carrier > > information</xsd:documentation> > > </xsd:annotation> > > <xsd:sequence> > > <xsd:element name="freightBill" type="ship:InterlineProType" /> > > <xsd:element name="scac" type="ship:ScacType" /> > > <xsd:element name="name" type="ship:CompanyNameType" > > minOccurs="0" /> > > <xsd:element name="type" type="ship:CarrierType" /> > > </xsd:sequence> > > </xsd:complexType> > > <xsd:simpleType name="MessageType"> > > <xsd:restriction base="xsd:string"> > > <xsd:maxLength value="200" /> > > </xsd:restriction> > > </xsd:simpleType> > > <xsd:complexType name="MessagesType"> > > <xsd:annotation> > > <xsd:documentation>List of messages</xsd:documentation> > > </xsd:annotation> > > <xsd:sequence> > > <xsd:element name="message" type="ship:MessageType" > > maxOccurs="unbounded" /> > > </xsd:sequence> > > </xsd:complexType> > > <xsd:complexType name="MovementType"> > > <xsd:sequence> > > <xsd:element name="movementDate" type="xsd:date" /> > > <xsd:element name="movementTime" type="xsd:time" /> > > <xsd:element name="message" type="ship:MessageType" /> > > </xsd:sequence> > > </xsd:complexType> > > <xsd:complexType name="MovementHistoryType"> > > <xsd:annotation> > > <xsd:documentation>Shipment movement history</xsd:documentation> > > </xsd:annotation> > > <xsd:sequence> > > <xsd:element name="message" type="ship:MovementType" > > maxOccurs="unbounded" /> > > </xsd:sequence> > > </xsd:complexType> > > <xsd:simpleType name="PersonNameType"> > > <xsd:restriction base="xsd:string"> > > <xsd:minLength value="1" /> > > <xsd:maxLength value="50" /> > > </xsd:restriction> > > </xsd:simpleType> > > <xsd:simpleType name="PiecesType"> > > <xsd:restriction base="xsd:unsignedInt"> > > <xsd:minInclusive value="1" /> > > <xsd:totalDigits value="6" /> > > </xsd:restriction> > > </xsd:simpleType> > > <xsd:simpleType name="PhoneAreaCodeType"> > > <xsd:restriction base="xsd:unsignedInt"> > > <xsd:minInclusive value="1" /> > > <xsd:maxInclusive value="99999" /> > > </xsd:restriction> > > </xsd:simpleType> > > <xsd:simpleType name="PhoneCountryCodeType"> > > <xsd:restriction base="xsd:unsignedShort"> > > <xsd:minInclusive value="1" /> > > <xsd:maxInclusive value="999" /> > > </xsd:restriction> > > </xsd:simpleType> > > <xsd:simpleType name="PhoneSubscriberType"> > > <xsd:annotation> > > <xsd:documentation>Telephone subscriber number - up to 14 > > digits</xsd:documentation> > > </xsd:annotation> > > <xsd:restriction base="xsd:unsignedLong"> > > <xsd:minInclusive value="1" /> > > <xsd:maxInclusive value="99999999999999" /> > > </xsd:restriction> > > </xsd:simpleType> > > <xsd:complexType name="PhoneType"> > > <xsd:annotation> > > <xsd:documentation>Full international telephone > > number</xsd:documentation> > > </xsd:annotation> > > <xsd:sequence> > > <xsd:element name="country" type="ship:PhoneCountryCodeType" > > minOccurs="0" /> > > <xsd:element name="areaCode" type="ship:PhoneAreaCodeType" > > minOccurs="0" /> > > <xsd:element name="subscriber" type="ship:PhoneSubscriberType" > > /> > > <xsd:element name="extension" type="xsd:nonNegativeInteger" > > minOccurs="0" /> > > </xsd:sequence> > > </xsd:complexType> > > <xsd:simpleType name="PostalCodeType"> > > <xsd:restriction base="xsd:string"> > > <xsd:minLength value="5" /> > > <xsd:maxLength value="6" /> > > </xsd:restriction> > > </xsd:simpleType> > > <xsd:simpleType name="ReferenceNumberType"> > > <xsd:restriction base="xsd:string"> > > <xsd:minLength value="1" /> > > <xsd:maxLength value="35" /> > > </xsd:restriction> > > </xsd:simpleType> > > <xsd:simpleType name="ScacType"> > > <xsd:restriction base="xsd:string"> > > <xsd:minLength value="1" /> > > <xsd:maxLength value="4" /> > > </xsd:restriction> > > </xsd:simpleType> > > <xsd:simpleType name="ServiceType"> > > <xsd:annotation> > > <xsd:documentation>Estes service level</xsd:documentation> > > </xsd:annotation> > > <xsd:restriction base="xsd:string"> > > <xsd:maxLength value="30" /> > > </xsd:restriction> > > </xsd:simpleType> > > <xsd:complexType name="ShipmentType"> > > <xsd:sequence> > > <xsd:element name="pro" type="ship:ProType"/> > > <xsd:element name="bol" type="ship:BolType" minOccurs="0" /> > > <xsd:element name="po" type="ship:PoType" minOccurs="0" /> > > <xsd:element name="pickupDate" type="xsd:date" minOccurs="0" /> > > <xsd:element name="service" type="ship:ServiceType" > > minOccurs="0" /> > > <xsd:element name="status" type="ship:StatusType"/> > > <xsd:element name="movementHistory" > > type="ship:MovementHistoryType" minOccurs="0" /> > > <xsd:element name="firstDeliveryDate" type="xsd:date" > > minOccurs="0" /> > > <xsd:element name="estimatedDeliveryDate" type="xsd:date" > > minOccurs="0" /> > > <xsd:element name="estimatedDeliveryTime" type="xsd:time" > > minOccurs="0" /> > > <xsd:element name="deliveryDate" type="xsd:date" minOccurs="0" > > /> > > <xsd:element name="deliveryTime" type="xsd:time" minOccurs="0" > > /> > > <xsd:element name="receivedBy" type="ship:PersonNameType" > > minOccurs="0" /> > > <xsd:element name="appointment" type="ship:AppointmentType" > > minOccurs="0" /> > > <xsd:element name="pieces" type="ship:PiecesType" minOccurs="0" > > /> > > <xsd:element name="dimensionalWeight" type="ship:WeightType" > > minOccurs="0" /> > > <xsd:element name="weight" type="ship:WeightType" minOccurs="0" > > /> > > <xsd:element name="shipper" type="ship:CompanyType" > > minOccurs="0" /> > > <xsd:element name="consignee" type="ship:CompanyType" > > minOccurs="0" /> > > <xsd:element name="thirdParty" type="ship:CompanyType" > > minOccurs="0" /> > > <xsd:element name="destinationTerminal" > > type="ship:TerminalType"/> > > <xsd:element name="interlineInfo" type="ship:InterlineInfoType" > > minOccurs="0" /> > > <xsd:element name="freightCharges" type="ship:ChargesType" > > minOccurs="0" /> > > <xsd:element name="messages" type="ship:MessagesType" > > minOccurs="0" /> > > </xsd:sequence> > > </xsd:complexType> > > <xsd:complexType name="ShipmentsType"> > > <xsd:annotation> > > <xsd:documentation>List of PROs</xsd:documentation> > > </xsd:annotation> > > <xsd:sequence> > > <xsd:element name="shipment" type="ship:ShipmentType" > > maxOccurs="unbounded" /> > > </xsd:sequence> > > </xsd:complexType> > > <xsd:simpleType name="StateProvinceType"> > > <xsd:annotation> > > <xsd:documentation>State or province > > abbreviation</xsd:documentation> > > </xsd:annotation> > > <xsd:restriction base="xsd:string"> > > <xsd:minLength value="2" /> > > <xsd:maxLength value="2" /> > > </xsd:restriction> > > </xsd:simpleType> > > <xsd:simpleType name="StatusType"> > > <xsd:restriction base="xsd:string"> > > <xsd:maxLength value="30" /> > > </xsd:restriction> > > </xsd:simpleType> > > <xsd:simpleType name="TerminalNameType"> > > <xsd:restriction base="xsd:string"> > > <xsd:minLength value="1" /> > > <xsd:maxLength value="40" /> > > </xsd:restriction> > > </xsd:simpleType> > > <xsd:simpleType name="TerminalNumberType"> > > <xsd:restriction base="xsd:unsignedShort"> > > <xsd:minInclusive value="1" /> > > <xsd:totalDigits value="3" /> > > </xsd:restriction> > > </xsd:simpleType> > > <xsd:complexType name="TerminalType"> > > <xsd:sequence> > > <xsd:element name="number" type="ship:TerminalNumberType" /> > > <xsd:element name="name" type="ship:TerminalNameType" /> > > <xsd:element name="address" type="ship:AddressType" /> > > <xsd:element name="phone" type="ship:PhoneType" /> > > <xsd:element name="fax" type="ship:PhoneType" /> > > </xsd:sequence> > > </xsd:complexType> > > <xsd:complexType name="VersionType"> > > <xsd:sequence> > > <xsd:element name="versionNumber" type="xsd:decimal" /> > > <xsd:element name="versionDate" type="xsd:date" minOccurs="0" /> > > </xsd:sequence> > > </xsd:complexType> > > <xsd:simpleType name="WeightType"> > > <xsd:restriction base="xsd:unsignedInt"> > > <xsd:minInclusive value="1" /> > > <xsd:totalDigits value="7" /> > > </xsd:restriction> > > </xsd:simpleType> > > </xsd:schema> > > > > > > Common schema: > > ------------------------ > > > > <?xml version="1.0" encoding="UTF-8"?> > > <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema";; > > xmlns:ship="http://ws.estesexpress.com/schema/shipmenttracking";; > > attributeFormDefault="unqualified" elementFormDefault="qualified" > > targetNamespace="http://ws.estesexpress.com/schema/shipmenttracking";; > > xml:lang="en"> > > <xsd:annotation> > > > > <xsd:documentation xml:lang="en">Common elements for shipment > > tracking service. Copyright 2012 Estes Express Lines, > > Inc.</xsd:documentation> > > </xsd:annotation> > > <xsd:simpleType name="BolType"> > > <xsd:restriction base="xsd:string"> > > <xsd:minLength value="1" /> > > <xsd:maxLength value="25" /> > > </xsd:restriction> > > </xsd:simpleType> > > <xsd:simpleType name="InterlineProType"> > > <xsd:restriction base="xsd:string"> > > <xsd:minLength value="1" /> > > <xsd:maxLength value="15" /> > > </xsd:restriction> > > </xsd:simpleType> > > <xsd:simpleType name="LoadNumberType"> > > <xsd:restriction base="xsd:string"> > > <xsd:minLength value="1" /> > > <xsd:maxLength value="25" /> > > </xsd:restriction> > > </xsd:simpleType> > > <xsd:simpleType name="PickupRequestNumberType"> > > <xsd:restriction base="xsd:long"> > > <xsd:minInclusive value="1" /> > > <xsd:totalDigits value="10" /> > > </xsd:restriction> > > </xsd:simpleType> > > <xsd:simpleType name="PoType"> > > <xsd:restriction base="xsd:string"> > > <xsd:minLength value="1" /> > > <xsd:maxLength value="15" /> > > </xsd:restriction> > > </xsd:simpleType> > > <xsd:simpleType name="ProType"> > > <xsd:restriction base="xsd:string"> > > <xsd:pattern value="\d{10}|\d{3}-\d{7}" /> > > </xsd:restriction> > > </xsd:simpleType> > > <xsd:element name="requestID"> > > <xsd:simpleType> > > <xsd:restriction base="xsd:string"> > > <xsd:minLength value="1" /> > > <xsd:maxLength value="50" /> > > </xsd:restriction> > > </xsd:simpleType> > > </xsd:element> > > </xsd:schema> > > > > > > Thanks, > > J > > > > > > > > > > ________________________________ > > From: Jack Sprat <[email protected]> > > To: "[email protected]" <[email protected]> > > Sent: Tuesday, July 31, 2012 5:12 PM > > Subject: Re: [Axis2] REST web service > > > > There is a comment before the response element but it is not commented out. > > I don't think the SOAP request would work if the response was commented > > out. > > > > It looks like the original message has been lost. I can access the web > > service with REST but always get a blank response. > > > > I have a WSDL 1.1 web service with 2 operations. The service was generated > > with > > wsdl2java in Axis2 1.6.1. One operation is a simple echo that I am > > trying to invoke via REST. The echo operation should return the request > > string in the response. I can access the operation but nothing comes > > back in the response. I thought it should work like this: > > http://mywebservice.com/test/services/ShipmentTrackingService/echo?echoRequest=test > > > > I > > get a response but there is nothing in the response element. It works > > fine when invoked via SOAP with soapUI. The response I get is: > > <ship:echoResponse xmlns:ship=http://mynamespace.com/shipmenttracking; /> > > > > > > Thanks. > > -J > > > > ________________________________ > > From: Martin Gainty <[email protected]> > > To: [email protected] > > Sent: Tuesday, July 31, 2012 4:11 PM > > Subject: RE: [Axis2] REST web service > > > > > > > > any reason why your response element is commented out? > > > > <!-- Echo Response Type --><xsd:element name="echoResponse" > > type="xsd:string"/>can you un-comment echoResponse and redeploy? > > > > Martin > > ______________________________________________ > > Verzicht und Vertraulichkeitanmerkung > > > > > > > Date: Tue, 31 Jul 2012 12:49:40 -0700 > > > From: [email protected] > > > Subject: Re: [Axis2] REST web service > > > To: [email protected]; [email protected] > > > > > > Kishanthan, Sagara, anyone.. > > > > > > Can someone assist with my problem? I cannot get my web service to work > > > via REST. It works perfectly with a SOAP request. > > > > > > Thanks. > > > J > > > > > > ________________________________ > > > From: Jack Sprat <[email protected]> > > > To: "[email protected]" <[email protected]> > > > Sent: Monday, July 23, 2012 4:35 PM > > > Subject: Re: [Axis2] REST web service > > > > > > Hi Kishanthan. > > > > > > I'm fairly certain that the WSDL is correct. It works fine with a SOAP > > > request and "echoRequest" is the correct element name. With REST I get a > > > response with the correct format but the value is blank (see my first > > > message for the details). I don't know where the code snippet you > > > included below came from. This is the snippet from the WSDL: > > > > > > <xsd:simpleType name="EchoRequestType"> > > > <xsd:restriction base="xsd:string"> > > > <xsd:maxLength value="100"/> > > > </xsd:restriction> > > > </xsd:simpleType> > > > > > > The following SOAP request works fine: > > > > > > <soapenv:Envelope > > > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/%22; > > > xmlns:ship="http://ws.estesexpress.com/shipmenttracking%22;> > > > <soapenv:Header/> > > > <soapenv:Body> > > > <ship:echoRequest>ping</ship:echoRequest> > > > </soapenv:Body> > > > </soapenv:Envelope> > > > > > > I still don't know where the problem lies. Any help is appreciated. > > > > > > Thanks, > > > J > > > > > > > > > ________________________________ > > > From: Kishanthan Thangarajah <[email protected]> > > > To: [email protected]; Jack Sprat <[email protected]> > > > Cc: "[email protected]" <[email protected]> > > > Sent: Saturday, July 21, 2012 3:25 PM > > > Subject: Re: [Axis2] REST web service > > > > > > > > > Hi, > > > > > > > > > On Fri, Jul 6, 2012 at 2:39 AM, Jack Sprat <[email protected]> wrote: > > > > > > I have a WSDL 1.1 web service with 2 operations. The service was > > > generated from the WSDL with Axis2 1.6.1. One operation is a simple echo > > > that I am trying to invoke via REST. The echo operation should return > > > the request string in the response. I can access the operation but > > > nothing comes back in the response. I thought it should work like this: > > > >http://mywebservice.com/test/services/ShipmentTrackingService/echo?echoRequest=test > > > > > > > > > > > > > > I went through the given wsdl and schema. I think the issue here is that > > > "echoRequest" is not the name of the request element defined in wsdl and > > > that is why having it in the url fails. The following is my understanding > > > on how to make this work. > > > > > > For example, if you have the following as the definition for > > > EchoRequestType in your wsdl, > > > > > > <xsd:complexType name="EchoRequestType"> > > > <xsd:sequence> > > > <xsd:element minOccurs="0" name="val" nillable="true" > > > type="xsd:string"/> > > > </xsd:sequence> > > > </xsd:complexType> > > > > > > Then invoking the echo operation via REST would be like, > > > > > > http://localhost:8080/axis2/services/ShipmentTrackingService/echo?val=thissstest > > > > > > You can see that the name of request element is "val" and it is given as > > > the request parameter in the url. > > > > > > Thanks, > > > Kishanthan. > > > > > > I get a response but there is nothing in the response element. It works > > > fine when invoked via SOAP with soapUI. The response I get is: > > > ><ship:echoResponse xmlns:ship=http://mynamespace.com/shipmenttracking; /> > > > > > > > >The pertinent parts of the WSDL are shown below. > > > > > > > ><wsdl:types> > > > ><xsd:schema attributeFormDefault="qualified" > > > >elementFormDefault="qualified" > > > >targetNamespace="http://mywebservice.com/shipmenttracking%22; > > > >xmlns:xsd="http://www.w3.org/2001/XMLSchema%22%3Epe%3E%3Cxsd:simpleType > > > >name="EchoRequestType"> > > > ><xsd:restriction base="xsd:string"> > > > ><xsd:maxLength value="100"/> > > > ></xsd:restriction> > > > ></xsd:simpleType> > > > ><!-- Echo Request Type --> > > > ><xsd:element name="echoRequest" type="tns:EchoRequestType"/> > > > ><!-- Echo Response Type --><xsd:element name="echoResponse" > > > >type="xsd:string"/> > > > ></xsd:schema> > > > ></wsdl:types> > > > > > > > ><!-- Define SOAP message names. --> > > > ><wsdl:message name="echoRequestMsg"><wsdl:part name="echoRequest" > > > >element="tns:echoRequest"></wsdl:part></wsdl:message> > > > ><wsdl:message name="echoResponseMsg"><wsdl:part name="echoResponse" > > > >element="tns:echoResponse"></wsdl:part></wsdl:message> > > > > > > > >Any help is appreciated. > > > > > > > >Thanks. > > > >J > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [email protected] > > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
