Thanks again for the response. Adrian
-----Original Message----- From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] Sent: 11 June 2003 13:47 To: [EMAIL PROTECTED] Subject: Re: style="document" 1_1RC2 Yes. Well. Axis doesn't have perfect support for Document/Literal yet. I forwarded this mail to the axis-dev list. Anne ----- Original Message ----- From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <"mailt≯䀀洀愀渀攀猀⸀渀攀琀 Sent: Wednesday, June 11, 2003 8:29 AM Subject: RE: style="document" 1_1RC2 > Anne, > > Thanks for responding. Maybe I didn't make myself clear, but the service is > one that I created myself using a very simple Java class deployed in the > Axis server, hence the WSDL is generated by Axis, not me. > > Is it un-reasonable to expect Axis to be able to read its own WSDL? > > Regards, > > Adrian. > > > -----Original Message----- > From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] > Sent: 11 June 2003 13:24 > To: [EMAIL PROTECTED] > Subject: Re: style="document" 1_1RC2 > > > I suggest you get hold of a WSDL tool, such as Omniopera, XMLSpy, or the > Cape Clear WSDL editor to help you write your WSDL documents. Your errors > are caused by invalid Qnames. > > You need to define a targetNamspace for the <schema> section. Otherwise you > have no way to reference the elements that you've defined. Your <types> > section should look like this: > > <wsdl:types> > <schema > targetNamespace="http://cpwsdd.devenv1.bt.co.uk:63024/axis/services/SimpleDo > cument" > xmlns="http://www.w3.org/2001/XMLSchema"> > <element name="in" type="string"/> > <element name="reverseReturn" type="string"/> > </schema> > </wsdl:types> > > Note: there is no reason to import the SOAP Encoding schema.And since the > XML Schema namespace is the default namespace, you don't need to prefix > "string" with "xsd:". > > Then, in your <message> definitions, you must qualify your elements: > > <wsdl:message name="reverseResponse"> > <wsdl:part element="intf:reverseReturn" name="reverseReturn"/> > </wsdl:message> > <wsdl:message name="reverseRequest"> > <wsdl:part element="intf:in" name="in"/> > </wsdl:message> > > You also don't want to define the namespace attribute in your > <wsdlsoap:body> element. (The SOAP engine should automatically specify the > targetNamespace of the definition of the message element. The namespace > attribute should be used only for encoded messages, in which case you have > no predefined namespace, since you aren't using a literal schema.) So your > <wsdlsoap:body> elements should look like this: > > <wsdlsoap:body use="literal"/> > > Best regards, > Anne > > ----- Original Message ----- > From: <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, June 11, 2003 5:48 AM > Subject: style="document" 1_1RC2 > > > > > I have deployed a very simple service using style="document". The WSDL > > > looks like this: > > > > > > <?xml version="1.0" encoding="UTF-8"?> > > > <wsdl:definitions > > > > targetNamespace="http://cpwsdd.devenv1.bt.co.uk:63024/axis/services/Simple > > > Document" xmlns="http://schemas.xmlsoap.org/wsdl/" > > > xmlns:apachesoap="http://xml.apache.org/xml-soap" > > > > xmlns:impl="http://cpwsdd.devenv1.bt.co.uk:63024/axis/services/SimpleDocum > > > ent" > > > > xmlns:intf="http://cpwsdd.devenv1.bt.co.uk:63024/axis/services/SimpleDocum > > > ent" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" > > > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" > > > xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" > > > xmlns:xsd="http://www.w3.org/2001/XMLSchema"><wsdl:types><schema > > > targetNamespace="" xmlns="http://www.w3.org/2001/XMLSchema"><import > > > namespace="http://schemas.xmlsoap.org/soap/encoding/"/><element > name="in" > > > type="xsd:string"/><element name="reverseReturn" > > > type="xsd:string"/></schema></wsdl:types> > > > <wsdl:message name="reverseResponse"> > > > <wsdl:part element="reverseReturn" name="reverseReturn"/> > > > </wsdl:message> > > > <wsdl:message name="reverseRequest"> > > > <wsdl:part element="in" name="in"/> > > > </wsdl:message> > > > <wsdl:portType name="Simple"> > > > <wsdl:operation name="reverse" parameterOrder="in"> > > > <wsdl:input message="intf:reverseRequest" name="reverseRequest"/> > > > <wsdl:output message="intf:reverseResponse" > name="reverseResponse"/> > > > </wsdl:operation> > > > </wsdl:portType> > > > <wsdl:binding name="SimpleDocumentSoapBinding" type="intf:Simple"> > > > <wsdlsoap:binding style="document" > > > transport="http://schemas.xmlsoap.org/soap/http"/> > > > <wsdl:operation name="reverse"> > > > <wsdlsoap:operation soapAction=""/> > > > <wsdl:input name="reverseRequest"> > > > <wsdlsoap:body > > > > namespace="http://cpwsdd.devenv1.bt.co.uk:63024/axis/services/SimpleDocume > > > nt" use="literal"/> > > > </wsdl:input> > > > <wsdl:output name="reverseResponse"> > > > <wsdlsoap:body > > > > namespace="http://cpwsdd.devenv1.bt.co.uk:63024/axis/services/SimpleDocume > > > nt" use="literal"/> > > > </wsdl:output> > > > </wsdl:operation> > > > </wsdl:binding> > > > <wsdl:service name="SimpleService"> > > > <wsdl:port binding="intf:SimpleDocumentSoapBinding" > > > name="SimpleDocument"> > > > <wsdlsoap:address > > > > location="http://cpwsdd.devenv1.bt.co.uk:63024/axis/services/SimpleDocumen > > > t"/> > > > </wsdl:port> > > > </wsdl:service> > > > </wsdl:definitions> > > > > > > When I try and generate client stubs for it using > > > org.apache.axis.wsdl.WSDL2Java I get > > > > > > Parsing XML file: > > > http://cpwsdd.devenv1.bt.co.uk:63024/axis/services/SimpleDocument?wsdl > > > java.io.IOException: Element > > > {http://schemas.xmlsoap.org/wsdl/}reverseReturn is referenced but not > > > defined. > > > at > > > > org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable > > > .java:527) > > > at > > > org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:422) > > > at > > > > org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:408 > > > ) > > > at > > > > org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:393 > > > ) > > > at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:245) > > > at java.lang.Thread.run(Thread.java:484) > > > > > > Is this a bug, or am I doing something wrong ? > > > > > > TIA > > > > > > Adrian > > >
