Sagara and all, I've supplied the WSDL. Can anyone respond to my question? Thanks, J
_______________________________ From: Jack Sprat <rexclaim...@yahoo.com> To: "java-user@axis.apache.org" <java-user@axis.apache.org> Cc: "axis-u...@ws.apache.org" <axis-u...@ws.apache.org> Sent: Wednesday, July 11, 2012 12:43 PM Subject: Re: [Axis2] REST web service Thanks for the reply. I always use the contract first approach. The code was generated from the WSDL using the wsdl2java tool. The WSDL is pasted below. <?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions name="ShipmentTrackingService" targetNamespace="http://ws.estesexpress.com/shipmenttracking%22; xmlns:ship="http://ws.mycompany.com/schema/shipmenttracking%22; xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/%22; xmlns:xsd="http://www.w3.org/2001/XMLSchema%22; xmlns:tns="http://ws.estesexpress.com/shipmenttracking%22; xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/%22;> <wsdl:documentation>Shipment tracking web service. Copyright 2012</wsdl:documentation> <wsdl:types> <xsd:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://ws.estesexpress.com/shipmenttracking%22; xmlns:xsd="http://www.w3.org/2001/XMLSchema%22;> <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.estesexpress.com/schema/shipmenttracking%22; xmlns:ship="http://ws.estesexpress.com/schema/shipmenttracking%22; xmlns:xsd="http://www.w3.org/2001/XMLSchema%22;> <!--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%22; 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%22; 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> Thanks in advance. ----- Original Message ----- From: Sagara Gunathunga <sagara.gunathu...@gmail.com> To: java-user@axis.apache.org Cc: "axis-u...@ws.apache.org" <axis-u...@ws.apache.org> Sent: Tuesday, July 10, 2012 1:26 PM Subject: Re: [Axis2] REST web service Did you use code first approach ? if so provide the complete WSDL file. Thanks ! On Tue, Jul 10, 2012 at 6:42 PM, Jack Sprat <rexclaim...@yahoo.com> wrote: > Can someone please answer my question below? > > Thanks! > > > ________________________________ > From: Jack Sprat <rexclaim...@yahoo.com> > To: "axis-u...@ws.apache.org" <axis-u...@ws.apache.org> > Sent: Thursday, July 5, 2012 5:09 PM > Subject: [Axis2] REST web service > > 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 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: java-user-unsubscr...@axis.apache.org For additional commands, e-mail: java-user-h...@axis.apache.org