axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jack Sprat <rexclaim...@yahoo.com>
Subject Re: [Axis2] REST web service
Date Fri, 20 Jul 2012 15:46:39 GMT
The binding used was XML beans.  That's what I always use since it is more robust than ADB.

Thanks,
J

  

________________________________
 From: Kishanthan Thangarajah <kshanth2101@gmail.com>
To: java-user@axis.apache.org; Jack Sprat <rexclaimer2@yahoo.com> 
Cc: "axis-user@ws.apache.org" <axis-user@ws.apache.org> 
Sent: Friday, July 20, 2012 6:47 AM
Subject: Re: [Axis2] REST web service
  

Hi,
What is the data-binding you used here to generate code? Using adb gives compilation errors
since some of the restriction based type used in schema definitions are not yet supported
in 1.6.1. And some of the facet type used in the schema such as "totalDigits" are supported
in trunk only. 

Thanks,
Kishanthan.


On Tue, Jul 17, 2012 at 9:01 PM, Jack Sprat <rexclaimer2@yahoo.com> wrote:

Yes, the WSDL was definitely validated.  I think the wsdl2java would throw errors if it was
not valid.  It has done so in the past with an invalid WSDL.
>
>Below are the 3 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 in advance!
>J
>
>_______________________________
>From: Kishanthan Thangarajah <kshanth2101@gmail.com>
>To: java-user@axis.apache.org; Jack Sprat <rexclaimer2@yahoo.com>
>Cc: "axis-user@ws.apache.org" <axis-user@ws.apache.org>
>Sent: Monday, July 16, 2012 1:50 PM
>
>Subject: Re: [Axis2] REST web service
>
>
>Hi Jack
>
>
>On Mon, Jul 16, 2012 at 6:42 PM, Jack Sprat <rexclaimer2@yahoo.com> wrote:
>
>Sagara and all,
>> 
>>I've supplied the WSDL.  Can anyone respond to my question?
>>
>
>When using contract first approach, its always better to validate the wsdl. Did you validate
this wsdl? Also when i tried to generate the code from this wsdl, i noticed some imported
schemas in there. So please make sure that those are available in your service archive. And
you have to provide those schema's as-well here. 
>
>Thanks,
>Kishanthan.
>
>
>>Thanks,
>>J
>>
>>
>>_______________________________
>>From: Jack Sprat <rexclaimer2@yahoo.com>
>>To: "java-user@axis.apache.org" <java-user@axis.apache.org>
>>Cc: "axis-user@ws.apache.org" <axis-user@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/shiptrack/services/ShipmentTrackingService%22/>
>
>>  </wsdl:port>
>> </wsdl:service>
>></wsdl:definitions>
>>
>>Thanks in advance.
>>
>>
>>----- Original Message -----
>>From: Sagara Gunathunga <sagara.gunathunga@gmail.com>
>>To: java-user@axis.apache.org
>>Cc: "axis-user@ws.apache.org" <axis-user@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 <rexclaimer2@yahoo.com> wrote:
>>> Can someone please answer my question below?
>>>
>>> Thanks!
>>>
>>>
>>> ________________________________
>>> From: Jack Sprat <rexclaimer2@yahoo.com>
>>> To: "axis-user@ws.apache.org" <axis-user@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
>>
>
>
>
Mime
View raw message