If I make the changes below will I have to specify anything else in the wsdl or in wsdl2java to get wrapped-literal style?
Quoting James Taylor <[EMAIL PROTECTED]>: > > So I should just chang change types:bookFlightsRequest to types:bookFlights > and > reflect this in the external schema, will I have to change <input > message="tns:bookFlightsReq" /> <input message="tns:bookFlights" /> also? > > ...heres the bit of the wsdl that would have to be changed... > > <portType name="IBookFlightsPort"> > <operation name="bookFlights"> > <input message="tns:bookFlightsReq" /> > <output message="tns:bookFlightsResp" /> > </operation> > </portType> > > > <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> > > > Quoting Anne Thomas Manes <[EMAIL PROTECTED]>: > > > James, > > > > If you want an interface that accepts parameters rather than an > > object, then you must define your WSDL so that it matches the > > "wrapped" convention. What that means is that your input message > > element name must be identical to your operation name. Currently your > > input message element name is bookFlightsRequest and your operation > > name is bookFlights. If you fix it so that they are the same, it > > should give you what you want. > > > > Anne > > > > On 6/6/05, Jeff <[EMAIL PROTECTED]> wrote: > > > In general, I wouldn't let Axis provide a WSDL file. Tell it to use your > > > WSDL file by adding a <wsdlFile> element to the WSDD file before you > deploy > > > so you wind up with something like: > > > > > > <deployment > > > xmlns="http://xml.apache.org/axis/wsdd/" > > > xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"> > > > > > > <wsdlFile>/MyService.wsdl</wsdlFile> > > > > > > <service name="... > > > > > > > > > Put MyService.wsdl in <Tomcat>\webapps\axis\WEB-INF\classes > > > > > > You will want to edit MyService.wsdl so that the endpoint near the end of > > > the file is something that clients can connect instead of: > > > http://localhost:9081/AxisWeb/services/BookFlightsSOAPPort > > > > > > > > > Jeff > > > > > > > > > > > > ----- Original Message ----- > > > From: "James Taylor" <[EMAIL PROTECTED]> > > > To: <[email protected]> > > > Sent: Monday, June 06, 2005 5:02 AM > > > Subject: Re: import schema to wsdl > > > > > > > > > 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> > > > > > > > > > > > -- > Between the question and the answer lies free will > ----- End forwarded message ----- > > > -- > Between the question and the answer lies free will -- Between the question and the answer lies free will ----- End forwarded message ----- -- Between the question and the answer lies free will
