Thanks for your help jeff. The main problem was the conflicting target
namespaces I was trying to import into my wsdl. I've gotten the wsdl2java tool
to work fine now. Just a question on what will when the service gets deployed
to axis. I presume axis will make a different wsdl then the one I gave to the
tool as it has defined a method signature for the portType as
public java.lang.Object bookFlights(java.lang.Object parameters) throws
java.rmi.RemoteException; would any one mind commenting on this as I defined
the method signature in the wsdl more specific then this... I know that I
defined a custom collection bean that is of type object - I presume I'll cast
the parameters to get at it.
Regards,
James.
My wsdl and external schema...
<definitions
targetNamespace="http://ie/tcd/taylorjw/flightbooking/wsdl"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://ie/tcd/taylorjw/flightbooking/wsdl"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:types="http://ie.tcd/taylorjw/flightbooking" >
<types>
<xsd:schema
xmlns:xsd = "http://www.w3.org/2001/XMLSchema"
elementFormDefault = "qualified"
targetNamespace =
"http://ie.tcd/taylorjw/flightbooking">
<xsd:import namespace =
"http://ie.tcd/taylorjw/flightbooking"
schemaLocation="BookFlights.xsd"/>
<xsd:import namespace =
"http://www.w3.org/2001/XMLSchema" />
</xsd:schema>
</types>
<message name="bookFlightsReq">
<part name="parameters" element="types:bookFlightsRequest" />
</message>
<message name="bookFlightsResp">
<part name="parameters" element="types:bookFlightsResponse" />
</message>
<portType name="IBookFlightsPort">
<operation name="bookFlights">
<input message="tns:bookFlightsReq" />
<output message="tns:bookFlightsResp" />
</operation>
</portType>
<binding name="BookFlightsSOAPBinding" type="tns:IBookFlightsPort">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http" />
<operation name="bookFlights">
<soap:operation style="document" soapAction="bookFlights" />
<input>
<soap:body use="literal" />
</input>
<output>
<soap:body use="literal" />
</output>
</operation>
</binding>
<service name="BookFlightsService">
<port name="BookFlightsSOAPPort"
binding="tns:BookFlightsSOAPBinding">
<soap:address
location="http://localhost:9081/AxisWeb/services/BookFlightsSOAPPort" />
</port>
</service>
</definitions>
<!--BookFlights.xsd -->
<?xml version="1.0" ?>
<schema xmlns:xsd = "http://www.w3.org/2001/XMLSchema"
targetNamespace = "http://ie.tcd/taylorjw/flightbooking"
xmlns:fb="http://ie.tcd/taylorjw/flightbooking">
<xsd:complexType name="Booking">
<xsd:sequence>
<xsd:element name="passenger" type="fb:Passenger"/>
<xsd:element name="flight" type="fb:Flight"
minOccurs="0"
maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Passenger">
<xsd:sequence>
<xsd:element name="passengerNum" type="xsd:integer" />
<xsd:element name="firstName" type="xsd:string" />
<xsd:element name="lastName" type="xsd:string" />
<xsd:element name="address" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Flight">
<xsd:sequence>
<xsd:element name="flightNum" type="xsd:integer" />
<xsd:element name="sourceAirport" type="xsd:string" />
<xsd:element name="destAirport" type="xsd:string" />
<xsd:element name="flightDate" type="xsd:string" />
<xsd:element name="seatsAvailible" type="xsd:integer" />
<xsd:element name="seatPrice" type="xsd:integer" />
<xsd:element name="numberOfSeatsToBook" type="xsd:string" />
<xsd:element name="bookingNumber" type="xsd:integer" />
<xsd:element name="information" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
<xsd:element name="bookFlightsResponse">
<xsd:sequence>
<xsd:element name = "bookedFlights" type="fb:Flight"/>
</xsd:sequence>
</xsd:element>
<xsd:element name="bookFlightsRequest">
<xsd:sequence>
<xsd:element name="bookingRequest" type="fb:Booking"/>
</xsd:sequence>
</xsd:element>
</schema>