I suppose I wouldn't be helping if I thought I was wasting my time. I just want you to realize that to use Axis you must first learn the appropriate XML. The last time I checked, this mail-list was about Axis-specific issues. There's always a learning curve, James.
Regarding the text encoding exception, you should simply recreate the offending file in a text editor. If you still have the problem then you need to send that offending file; simply posting the contents here is no good. In fact send the file may well be no good either (due the e-mail server massaging of data). So, if you still have the problem after recreating the file: - Put the offending file in a ZIP file. - Rename the ZIP file by changing its extension to .gif - Send the fake GIF file. That way, any encoding problem should be preserved. Jeff ----- Original Message ----- From: "James Taylor" <[EMAIL PROTECTED]> To: <axis-user@ws.apache.org> Sent: Monday, June 06, 2005 2:42 AM Subject: Re: import schema to wsdl Jeff, thanks for lokking at my code. Sorry if you feel I'm wasting your time as I appreciate your help. I've implemented your recommended changes and changed <xsd:import namespace = "http://ie.tcd/taylorjw/flightbooking" location="BookFlights.xsd"/> ...to... <xsd:import namespace = "http://ie.tcd/taylorjw/flightbooking" schemaLocation="BookFlights.xsd"/> wsdl2java now seems to be seeing BookFlights.xsd and is complaining about [echo] Using wsdl in WSDL2Java task... [java] java.io.UTFDataFormatException: Invalid byte 1 of 1-byte UTF-8 seque nce. so it looks like there something astray in the xsd file thats not UTF-8. Regards, James. Quoting Jeff <[EMAIL PROTECTED]>: > Developing software is a precise science. You have to be very careful about > everything you do but even so you will almost always get it wrong because > that's what humans do. So, we have to check and double check then work hard > to determine the dopey things we are still doing. > > In this case, you could start by realizing that in the WSDL file you claim > that BookFlights.xsd targets http://ie/tcd/taylorjw/bookflights/types but in > BookFlights.xsd you actually target http://ie.tcd/taylorje/flightbooking > > Do yourself a favour and use just one namespace throughout such as: > http://ie.tcd/taylorje/flightbooking > > > Jeff > > > ----- Original Message ----- > From: "James Taylor" <[EMAIL PROTECTED]> > To: <axis-user@ws.apache.org> > Sent: Monday, June 06, 2005 2:05 AM > Subject: Re: import schema to wsdl > > > wsdl and xsd are in the same directory... > > <definitions > targetNamespace="http://ie/tcd/taylorjw/bookflights/wsdl" > xmlns="http://schemas.xmlsoap.org/wsdl/" > xmlns:tns="http://ie/tcd/taylorjw/bookflights/wsdl" > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" > xmlns:types="http://ie/tcd/taylorjw/bookflights/types" > > > <types> > <xsd:schema > xmlns:xsd = "http://www.w3.org/2001/XMLSchema" > elementFormDefault = "qualified" > targetNamespace = "http://ie/tcd/taylorjw/bookflights/importTypes"> > <xsd:import namespace = "http://ie/tcd/taylorjw/bookflights/types" > location="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="BookFlightsPortType"> > <operation name="bookFlights"> > <input message="tns:bookFlightsReq" /> > <output message="tns:bookFlightsResp" /> > </operation> > </portType> > > <binding name="BookFlightsSOAPBinding" type="tns:BookFlightsPortType"> > <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" encoding="UTF-8"?> > <schema xmlns:xsd = "http://www.w3.org/2001/XMLSchema" > targetNamespace = "http://ie.tcd/taylorje/flightbooking" > xmlns:bf = "http://ie.tcd/taylorje/flightbooking"> > <xsd:element name = "Booking"> > <xsd:complexType> > <xsd:sequence> > > <xsd:element name="passenger" type="bf:Passenger"/> > <xsd:element name="flight" type="bf:Flight" minOccurs="0" > maxOccurs="unbounded" /> > > </xsd:sequence> > </xsd:complexType> > </xsd:element> > > <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="bookFlightsRequest"> > <xsd:sequence> > <xsd:element name = "bookingRequest" type="bf:Booking"/> > </xsd:sequence> > </xsd:element> > > <xsd:element name="bookFlightsResponse"> > <xsd:sequence> > <xsd:element name = "bookedFlights" type="bf:Flight"/> > </xsd:sequence> > </xsd:element> > > > Quoting Jeff <[EMAIL PROTECTED]>: > > > If you want help on this you will have to supply the complete WSDL file > plus > > all referenced files. > > > > > > > > > > ----- Original Message ----- > > From: "James Taylor" <[EMAIL PROTECTED]> > > To: <axis-user@ws.apache.org> > > Sent: Monday, June 06, 2005 1:32 AM > > Subject: Re: import schema to wsdl > > > > > > Thanks for your reply Jeff, > > will have a good long read of a few standards > but > > I > > generally learn them better by practicing them. > > When you say > > > bookFlightsRequest is not "declared at the start of the wsdl" (at least > > not > > > in that which you have provided). > > > > but bf is declared at the start and I prefix my call to bookFlightsRequest > > with > > bf: in > > > > <message name="bookFlightsResp"> > > <part name="parameters" element="types:bookFlightsResponse" /> > > </message> > > > > Regards, > > James. > > > > Quoting Jeff <[EMAIL PROTECTED]>: > > > > > bookFlightsRequest is not "declared at the start of the wsdl" (at least > > not > > > in that which you have provided). > > > > > > WSDL2Java operates on WSDL files. You really need to learn how these > files > > > work, i.e. how they reference external XML Schema documents. > > > > > > location="BookFlights.xsd" => BookFlights.xsd is in the same location > as > > > the WSDL file. > > > > > > Looks like you would benefit from reading a few standards. See > > http://w3.org > > > > > > > > > Jeff > > > > > > > > > ----- Original Message ----- > > > From: "James Taylor" <[EMAIL PROTECTED]> > > > To: <axis-user@ws.apache.org> > > > Sent: Monday, June 06, 2005 1:06 AM > > > Subject: Re: import schema to wsdl > > > > > > > > > Yes that's true to a point, but what I'm trying get help with is > deploying > > a > > > wsdl that references a external schema using axis' wsdl2java tool. Thats > > > essentially what I'm trying to do. I'm not sure how to the wsdl2java > tool > > > will > > > pick up the xsd file. This is the error i'm getting now > > > [java] java.io.IOException: Element > > > {http://localhost:8080/axis/services/bo > > > okflights/types}bookFlightsRequest is referenced but not defined.... > > > > > > The bf:bookFlightsRequest is declared at the start of the wsdl like this > > > > > > <definitions > > > targetNamespace="http://localhost:8080/axis/services/bookflights/wsdl" > > > xmlns="http://schemas.xmlsoap.org/wsdl/" > > > xmlns:tns="http://localhost:8080/axis/services/bookflights/wsdl" > > > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" > > > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" > > > xmlns:bf="http://localhost:8080/axis/services/bookflights/types" > > > > > > > and imported in the types part like so > > > > > > <types> > > > <xsd:schema > > > xmlns:xsd = "http://www.w3.org/2001/XMLSchema" > > > elementFormDefault = "qualified" > > > targetNamespace = > > > "http://localhost:8080/axis/services/bookflights/wsdl/types"> > > > <xsd:import namespace = > "http://localhost:8080/axis/services/bookflights" > > > location="BookFlights.xsd"/> > > > <xsd:import namespace = "http://www.w3.org/2001/XMLSchema" /> > > > </xsd:schema> > > > </types> > > > > > > > > > Quoting Jeff <[EMAIL PROTECTED]>: > > > > > > > Presumably, bf:bookFlightsRequest is in FlightBooking.xsd so you would > > > have > > > > to examine that file. This issue falls within the scope of application > > > > domain debugging and, as such, not a legitimate matter to raise on the > > > Axis > > > > mail-list. > > > > > > > > > > > > Jeff > > > > > > > > > > > > ----- Original Message ----- > > > > From: "James Taylor" <[EMAIL PROTECTED]> > > > > To: <axis-user@ws.apache.org> > > > > Sent: Sunday, June 05, 2005 10:18 PM > > > > Subject: Re: import schema to wsdl > > > > > > > > > > > > I'm getting this error and am not sure how to fix it > > > > > > > > wsdl2java: > > > > [echo] Using wsdl in WSDL2Java task... > > > > [java] WSDLException (at /definitions/message[1]/part): > > > > faultCode=UNBOUND_P > > > > REFIX: Unable to determine namespace of 'bf:bookFlightsRequest'.: > > > > > > > > running this ant task > > > > > > > > <java classname="org.apache.axis.wsdl.WSDL2Java" fork="yes" > > > > failonerror="true"> > > > > <classpath refid="projectClasspath" /> > > > > <arg value = "-o" /> > > > > <arg file = "${pathToService}" /> > > > > <arg value = "-d" /> > > > > <arg value = "Session" /> > > > > <arg value = "-s" /> > > > > <arg value = "-N > > > > > > > > > > http://localhost:8080/axis/services/bookflights/flightbooking=${servicePackage}" > > > > /> > > > > <arg value = "-N > > > > > http://localhost:8080/axis/services/bookflights/wsdl=${servicePackage}" > > /> > > > > <arg file = "${pathToService}/bookFlights.wsdl" /> > > > > </java> > > > > > > > > > > > > Quoting James Taylor <[EMAIL PROTECTED]>: > > > > > > > > > Hey folks if one refers to a outside shema in a wsdl, like in this > > > > listing, > > > > > > > > > > <types> > > > > > <xsd:schema > > > > > xmlns:xsd = "http://www.w3.org/2001/XMLSchema" > > > > > elementFormDefault = "qualified" > > > > > targetNamespace = > > > > > "http://localhost:8080/axis/services/bookflights/wsdl/importtypes" > > > > > > > > > xmlns:bf="http://localhost:8080/axis/services/bookflights/flightbooking"> > > > > > <import namespace = > > > > > "http://localhost:8080/axis/services/bookflights/flightbooking" > > location > > > = > > > > > "FlightBooking.xsd" /> > > > > > <import namespace = "http://www.w3.org/2001/XMLSchema" /> > > > > > </xsd:schema> > > > > > </types> > > > > > > > > > > should the schema be in the same directory as the wsdl. I've this > wsdl > > > in > > > > > /project/bookflights and the ant build file in /ant. I'm using > axis's > > > > > wsdl2java > > > > > tool. Just wondering will ant and wsdl2java pick up > FlightBooking.xsd. > > > > > Also would appreciate it if anyone spotted any mistakes in this > > > > listing. > > > > > Regards, > > > > > James. > > > > > -- > > > > > Between the question and the answer lies free will > > > > > > > > > > > > > > > > > -- > > > > Between the question and the answer lies free will > > > > > > > > > > > > > > > > > -- > > > Between the question and the answer lies free will > > > > > > > > > > > > -- > > Between the question and the answer lies free will > > > > > > > -- > Between the question and the answer lies free will > > -- Between the question and the answer lies free will