David, Do these help? :) It's a stupid doc/literal WSDL I threw together for testing. Note the hard coded absolute schemaLocation paths in the WSDL and XSD imports - you'll have to change them to feed them into Axis WSDL2Java. If you have XMLSpy, you can verify that all is well when you open the WSDL and click the green Validate button.
And as far as feeding them into Axis WSDL2Java goes, you have two options: Command line: java org.apache.axis.wsdl.WSDL2Java -o src\samples\axis -a -s -t -T 1.2 .\resources\BankService-DocLiteral.wsdl or Ant build script: <target name="axis.wsdl2java.docliteral"> <axis-wsdl2java all="true" output="src/samples/axis" verbose="true" serverside="true" testcase="true" typemappingversion="1.2" url="resources/BankService-DocLiteral.wsdl"/> </target> Regards, Jonathan Anderson Booz Allen Hamilton -----Original Message----- From: David Thielen [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 14, 2004 3:22 PM To: [EMAIL PROTECTED] Subject: RE: Need suggestions on web service interop and design Your link is really helpful - and where I was thinking we were heading. That said, any place that can help a newbie through the hand generation of the wsdl file? There is a ton of samples in axis but I can't find one that shows the document/literal case. However I do have 1.1, not 1.2. (I'd prefer to have a sloution that runs on both.) Anyways, if anyone can point me at a sample or other help (preferably of a correct wsdl file for document/literal) I would really appreciate it. thanks - dave ps - The people who created axis have done an extraordinary job both with the product, the documentation, and the samples. ---------- Original Message ---------------------------------- From: "Anderson Jonathan" <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] Date: Wed, 14 Apr 2004 12:37:17 -0400 >David, you may be understating the problem a bit. Building interoperable, >WS-I compliant SOAP services with Axis is a little involved. > >See: > >http://marc.theaimsgroup.com/?l=axis-user&m=107945370506044&w=2 > >Regards, >Jonathan Anderson >Booz Allen Hamilton > > >-----Original Message----- >From: David Thielen [mailto:[EMAIL PROTECTED] >Sent: Wednesday, April 14, 2004 12:18 PM >To: [EMAIL PROTECTED]; [EMAIL PROTECTED] >Subject: Re: Need suggestions on web service interop and design > > >Speaking for myself (and I think lots of others), while a tutorial would be >wonderful, if you could just tell us what method to use to create a server >using java under access that .net can access - that's 90% of what we need. > >Especially if one of the existing axis examples implementes that method - >then you can just point at that. > >thanks - dave > > >---------- Original Message ---------------------------------- >From: Nelson Minar <[EMAIL PROTECTED]> >Reply-To: [EMAIL PROTECTED] >Date: Wed, 14 Apr 2004 09:01:42 -0700 > >>HG writes: >>>I can see that Axis 1.2 is alpha...Anyone knows of the beta or final >>>release plans..? >> >>There is a beta, but for some inexplicable reason it's not visible on >>the site. You can find it here: >> http://archive.apache.org/dist/ws/axis/1_2beta/ >>I'm having good luck with it. >> >>Anne Thomas Manes writes: >>> For best interoperability, your interface should consist of simple types, >>> arrays (defined using minOccurs/maxOccurs), and complex types defined as >>> sequence structures of simple types, arrays, and/or sequence structures. >> >>A really clear example on how to build an Axis server this way, along >>with client examples in the major platforms, would be a tremendously >>useful tutorial. I've been toying with the idea of writing one myself >>but have been too busy. I'm pretty sure xml.com would be glad to >>publish it. >> > >
<?xml version="1.0" encoding="UTF-8"?> <schema targetNamespace="http://webservices.bah.com/examples/docliteral/bank" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:bank="http://webservices.bah.com/examples/docliteral/bank" xmlns:banktypes="http://webservices.bah.com/examples/docliteral/bank/types" elementFormDefault="qualified" attributeFormDefault="unqualified"> <import namespace="http://webservices.bah.com/examples/docliteral/bank/types" schemaLocation="file:///C:\projects\webservice-examples\resources\BankTypes.xsd"/> <complexType name="DepositRequestType"> <sequence> <element ref="banktypes:Deposit"/> </sequence> </complexType> <element name="DepositRequest" type="bank:DepositRequestType"/> <complexType name="DepositResponseType"> <sequence> <element ref="banktypes:Confirmation"/> </sequence> </complexType> <element name="DepositResponse" type="bank:DepositResponseType"/> </schema>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:bank="http://webservices.bah.com/examples/docliteral/bank" targetNamespace="http://webservices.bah.com/examples/docliteral/bank"> <types> <xs:schema> <xs:import namespace="http://webservices.bah.com/examples/docliteral/bank" schemaLocation="file:///C:\projects\webservice-examples\resources\BankService.xsd"/> </xs:schema> </types> <message name="DepositRequestMessage"> <part name="depositRequest" element="bank:DepositRequest"/> </message> <message name="DepositResponseMessage"> <part name="depositResponse" element="bank:DepositResponse"/> </message> <portType name="BankServicePortType"> <operation name="deposit"> <input message="bank:DepositRequestMessage"/> <output message="bank:DepositResponseMessage"/> </operation> </portType> <binding name="BankServiceSoapBinding" type="bank:BankServicePortType"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="deposit"> <soap:operation soapAction="deposit"/> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> </binding> <service name="BankService"> <port name="BankService" binding="bank:BankServiceSoapBinding"> <soap:address location="http://localhost:8001/samples-axis/services/DocLiteralBankService"/> </port> </service> </definitions>
<?xml version="1.0" encoding="UTF-8"?> <schema targetNamespace="http://webservices.bah.com/examples/docliteral/bank/types" xmlns:banktypes="http://webservices.bah.com/examples/docliteral/bank/types" xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"> <complexType name="DepositType"> <sequence> <element name="AccountNumber" type="positiveInteger"/> <element name="Amount" type="positiveInteger"/> </sequence> </complexType> <element name="Deposit" type="banktypes:DepositType"/> <complexType name="ConfirmationType"> <sequence> <element name="TransactionID" type="positiveInteger"/> <element name="CompletionDate" type="dateTime"/> </sequence> </complexType> <element name="Confirmation" type="banktypes:ConfirmationType"/> </schema>