> 2) There are a lot of namespace declarations in the document which have no additional referents further down. Is this a good thing, immaterial, or bad practice?
Code Clutter. Bad practice. -----Original Message----- From: Elaine Nance [mailto:[EMAIL PROTECTED] Sent: Friday, March 11, 2005 11:53 AM To: axis-user@ws.apache.org Subject: Re: wsdl/soap question Thank you very much, Anne. Two more questions: 1) <!--http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/--> is the XML schema document to read? 2) There are a lot of namespace declarations in the document which have no additional referents further down. Is this a good thing, immaterial, or bad practice? Thanks again, Elaine PS I'm not stupid, just having to translate a huge amount of data into knowledge in a (relatively) short period of time. The people managing the web service project are not programmers. No one in my group has *any* of this expertise, so . . . I'm learning *all* of this stuff at the same time. Thanks for clarifying the import tag for me. I think I knew that, but everything I've been studying is kind of blurring together. I am not as backward about XML as it must seem, either, but haven't the applied knowledge to keep everything straight automatically. Anne Thomas Manes wrote: > See responses inline ... > > On Wed, 09 Mar 2005 08:43:45 -0900, Elaine Nance > <[EMAIL PROTECTED]> wrote: > >>TIA for considering these questions. >> >>I am working through the note at >><!--http://www.w3.org/TR/2001/NOTE-wsdl-20010315-->, but mapping it to >>my understanding of what I'm seeing gives rise to questions (and >>frustrations). >> >> 1) How does a wsdl indicate that headers are required? > > > Required headers can be specified in the <binding> element, although > most people don't specify headers in WSDL. In the long run, I expect > people to specify header requirements using WS-Policy (or some other > as yet undefined policy language). > > >> 2) Fragment of existing wsdl which appears to be incorrect: >> <s:element name="AdminAuthHeader" type="s0:AdminAuthHeader"/> >> <s:complexType name="AdminAuthHeader"> >> <s:sequence> >> <s:element maxOccurs="1" minOccurs="0" >>name="sAdminLogin" type="s:string"/> >> <s:element maxOccurs="1" minOccurs="0" >>name="sPassword" type="s:string"/> >> <s:element maxOccurs="1" minOccurs="1" >>name="nExSysID" type="s:int"/> >> <s:element maxOccurs="1" minOccurs="1" >>name="nMajorVersion" type="s:int"/> >> <s:element maxOccurs="1" minOccurs="1" >>name="nMinorVersion" type="s:int"/> >> </s:sequence> >> </s:complexType> >> >> a) Shouldn't this have an end </s:element> tag and not have the >>"/" in the leading element tag before the <s:complexType> tag? > > > No. > > >> b) Shouldn't minOccurs="1" indicate a required parameter? > > > Yes. > > >> 3) Fragment of existing wsdl: >> <definitions >> targetNamespace="http://yyy.ourname.xxx/webservices/" >> xmlns="http://schemas.xmlsoap.org/wsdl/" >> xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" >> xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" >> xmlns:s="http://www.w3.org/2001/XMLSchema" >> xmlns:s0="http://yyy.ourname.xxx/webservices/" >> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" >> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" >> xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"> >> >> a) Wouldn't it be better to import the additional namespaces using >>the <import> tag? > > > No. These are namespace declarations, not imports. In order to > reference an element in one of these namespaces, you must declare the > namespace. You only use the <wsdl:import> element to import other WSDL > documents. Even if you do import another WSDL document, you still need > to declare the namespace using a namespace declaration. > > >> b) Shouldn't the "s" namespace designated above be "xsd" > > > No. The string used for the prefix ("s" versus "xsd") isn't > significant. All that matters is that it's used consistently within > the document. > > >>and >>point to "http://www.w3.org/2001/10/XMLSchema"? > > > No. Per the XML Schema specification, the XML Schema namespace is > "http://www.w3.org/2001/XMLSchema" > > >> c) Shouldn't the "soapenc" namespace be "SOAP-ENC"? > > > No. As I said before, the prefix string is insignificant. > > >>I've been told that wsdl is generated automatically, but if it is the >>tool seems inadequte. (NOT Axis!) >> >>Final question for this: >> >> 4) Am I on the right track with the wsdl? > > > It seems to me that you first need to learn a little more about XML > Schema and XML namespaces. Once you've done that, I recommend that you > study the WS-I Basic Profile. (see http://www.ws-i.org). > >>REALLY APPRECIATE the input, >>Elaine > > > Any time. > - Anne > <~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | Computers are useless. They can only give you answers. | -- Pablo Picasso -- <~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~