- This topic has 6 replies, 3 voices, and was last updated 18 years ago by
siddhartha_goenka.
-
AuthorPosts
-
siddhartha_goenkaMemberI am creating a web service from a WSDL file using top-down approach in MyEclipseIDE. The web service is created successfully and then i deployed it on Websphere Application Server 6.1 in packaged mode. The deployment is also successfully done.
These are the WSDL files and services.xml file for the web service.
WSDL
<?xml version=”1.0″ encoding=”UTF-8″?>
<wsdl:definitions xmlns:soap=”http://schemas.xmlsoap.org/wsdl/soap/” xmlns:tns=”http://www.example.org/Ramplink/” xmlns:wsdl=”http://schemas.xmlsoap.org/wsdl/” xmlns:xsd=”http://www.w3.org/2001/XMLSchema” name=”Ramplink” targetNamespace=”http://www.example.org/Ramplink/”>
<wsdl:types>
<xsd:schema targetNamespace=”http://www.example.org/Ramplink/”>
<xsd:element name=”login”>
<xsd:complexType>
<xsd:sequence> <xsd:element name=”UserName” type=”xsd:string” minOccurs=”1″ maxOccurs=”1″/>
<xsd:element name=”Password” type=”xsd:string” minOccurs=”1″></xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name=”loginResponse”>
<xsd:complexType>
<xsd:sequence>
<xsd:element name=”SabreResponseMsg” type=”tns:SabreResponseType” minOccurs=”1″/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name=”getFlightInfo”>
<xsd:complexType>
<xsd:sequence>
<xsd:element name=”AirportCode” minOccurs=”1″> <xsd:simpleType>
<xsd:restriction base=”xsd:string”><xsd:length value=”3″></xsd:length>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name=”Gates” type=”tns:GatesType”
minOccurs=”0″>
</xsd:element>
<xsd:element name=”HoursAhead” minOccurs=”0″>
<xsd:simpleType>
<xsd:restriction base=”xsd:int”><xsd:minInclusive value=”1″></xsd:minInclusive>
<xsd:maxInclusive value=”546″></xsd:maxInclusive>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name=”getFlightInfoResponse”>
<xsd:complexType>
<xsd:sequence>
<xsd:element name=”SabreResponse”
type=”tns:SabreResponseType” minOccurs=”1″>
</xsd:element>
<xsd:element name=”FlightList”
type=”tns:FlightListType” minOccurs=”1″>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name=”getTripSheet”>
<xsd:complexType>
<xsd:sequence>
<xsd:element name=”FlightNum” minOccurs=”1″>
<xsd:simpleType>
<xsd:restriction base=”xsd:string”>
<xsd:minLength value=”1″></xsd:minLength>
<xsd:maxLength value=”5″></xsd:maxLength>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name=”OrigCode” minOccurs=”1″>
<xsd:simpleType>
<xsd:restriction base=”xsd:string”><xsd:length value=”3″></xsd:length>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name=”Day” minOccurs=”1″>
<xsd:simpleType>
<xsd:restriction base=”xsd:int”><xsd:minInclusive value=”1″></xsd:minInclusive>
<xsd:maxInclusive value=”31″></xsd:maxInclusive>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name=”Month” minOccurs=”1″>
<xsd:simpleType>
<xsd:restriction base=”xsd:string”><xsd:length value=”3″></xsd:length>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name=”getTripSheetResponse”>
<xsd:complexType>
<xsd:sequence>
<xsd:element name=”SabreResponse”
type=”tns:SabreResponseType” minOccurs=”1″>
</xsd:element>
<xsd:element name=”TripSheet”
type=”tns:TripSheetType” minOccurs=”1″>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name=”SabreResponseType”></xsd:complexType>
<xsd:complexType name=”GatesType”>
<xsd:sequence minOccurs=”1″ maxOccurs=”unbounded”>
<xsd:element name=”Gate” type=”xsd:string” minOccurs=”1″ maxOccurs=”1″></xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name=”FlightListType”></xsd:complexType>
<xsd:complexType name=”TripSheetType”></xsd:complexType>
</xsd:schema>
</wsdl:types>
<wsdl:message name=”loginRequest”>
<wsdl:part element=”tns:login” name=”parameters”/>
</wsdl:message>
<wsdl:message name=”loginResponse”>
<wsdl:part element=”tns:loginResponse” name=”parameters”/>
</wsdl:message>
<wsdl:message name=”getFlightInfoRequest”>
<wsdl:part name=”parameters” element=”tns:getFlightInfo”></wsdl:part>
</wsdl:message>
<wsdl:message name=”getFlightInfoResponse”>
<wsdl:part name=”parameters” element=”tns:getFlightInfoResponse”></wsdl:part>
</wsdl:message>
<wsdl:message name=”getTripSheetRequest”>
<wsdl:part name=”parameters” element=”tns:getTripSheet”></wsdl:part>
</wsdl:message>
<wsdl:message name=”getTripSheetResponse”>
<wsdl:part name=”parameters” element=”tns:getTripSheetResponse”></wsdl:part>
</wsdl:message>
<wsdl:portType name=”Ramplink”>
<wsdl:operation name=”login”>
<wsdl:input message=”tns:loginRequest”/>
<wsdl:output message=”tns:loginResponse”/>
</wsdl:operation>
<wsdl:operation name=”getFlightInfo”>
<wsdl:input message=”tns:getFlightInfoRequest”></wsdl:input>
<wsdl:output message=”tns:getFlightInfoResponse”></wsdl:output>
</wsdl:operation>
<wsdl:operation name=”getTripSheet”>
<wsdl:input message=”tns:getTripSheetRequest”></wsdl:input>
<wsdl:output message=”tns:getTripSheetResponse”></wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name=”RamplinkSOAP” type=”tns:Ramplink”>
<soap:binding style=”document” transport=”http://schemas.xmlsoap.org/soap/http”/>
<wsdl:operation name=”login”>
<soap:operation soapAction=”http://www.example.org/Ramplink/NewOperation”/>
<wsdl:input>
<soap:body use=”literal”/>
</wsdl:input>
<wsdl:output>
<soap:body use=”literal”/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name=”Ramplink”>
<wsdl:port binding=”tns:RamplinkSOAP” name=”RamplinkSOAP”>
<soap:address location=”http://tvmkvmtt727:9080/RamplinkWeb/services/Ramplink”/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>Services.xml File
<?xml version=”1.0″ encoding=”UTF-8″?>
<beans xmlns=”http://xfire.codehaus.org/config/1.0″><service>
<name>Ramplink</name>
<namespace>http://www.example.org/Ramplink/</namespace>
<wsdlURL>
file:/D:/MyEclipse%205.1.1%20GA/eclipse/Workspace/AA/Ramplink/src/RampLink.wsdl
</wsdlURL>
<serviceClass>org.example.ramplink.Ramplink</serviceClass>
<implementationClass>
org.example.ramplink.RamplinkImpl
</implementationClass>
<serviceFactory>
org.codehaus.xfire.jaxb2.JaxbServiceFactory
</serviceFactory>
<style>wrapped</style>
<use>literal</use>
<scope>application</scope>
</service></beans>The location mentioned in the WSDL file is : http://tvmkvmtt727:9080/RamplinkWeb/services/Ramplink
But after deploying, when i try to access the web service from a browser using this URL, i am not able to do so.
Can you please help me in resolving this issue?
Thanks,
SiddharthaMay 11, 2007 at 10:30 am #269967
Riyad KallaMemberSiddhartha,
What is the error you are getting? Is there an error in the console from the web server?May 12, 2007 at 3:38 am #269995
siddhartha_goenkaMemberI am not getting any error on the console. Just I am not able to accesss the WSDL file through the specified URL in the location tag.
Is there any particular format of the URL for accessing the WSDL ?
May 12, 2007 at 9:02 am #270003
tomekszMemberhttp://tvmkvmtt727:9080/RamplinkWeb/services/Ramplink is a address of service , not wsdl. To get wsdl you need to add ?wsdl suffix.
http://tvmkvmtt727:9080/RamplinkWeb/services/Ramplink?wsdl
You can also use http://tvmkvmtt727:9080/RamplinkWeb/services address, then you will see all services defined in your web app.May 25, 2007 at 2:09 am #270643
siddhartha_goenkaMemberInfact, i am using http://tvmkvmtt727:9080/RamplinkWeb/services/Ramplink?wsdl to access the WSDL. But i am not getting it.
Do i need to any special configurations in Websphere console while installing the WAR?
DO i need to include any specific XFire package while deploying the WAR.
It is strange that when i develop a web service with bottom-up approach, i can access it from URL. But when i delvelop the similar web service using Top-Down approach, i am not able to access it.This problem has been for a long time. Any help in resolving this issue will be greatly appreciated.
Thanks,
SiddharthaMay 25, 2007 at 1:59 pm #270691
tomekszMemberMake sure you have info on your server console ( or logs ) about successful service deployment.
Did try http://tvmkvmtt727:9080/RamplinkWeb/services address? can you see anything under this url ( unless you use spring exporter which don’t display services list )May 29, 2007 at 7:15 am #270758
siddhartha_goenkaMemberI cannot see any error in the logs, while deploying the service. I also tried the URL http://tvmkvmtt727:9080/RamplinkWeb/services, but nothing comes up.
Is there any documentation available on how to create a simple web service using Top-Down approach?
-
AuthorPosts