axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anne Thomas Manes" <a...@manes.net>
Subject Re: Problem reading from file
Date Mon, 02 Jun 2003 11:56:30 GMT
A namespace is just a string -- and it's an opaque string at that. And keep
in mind that there's no requirement that the namespace can resolve to a
resource representation (such as a schema). Tim Bray recently published a
paper on appropriate URI schemes for namespace names. [1].

Whether or not the string ends with a slash is simply a whim of the author
that named the namespace. In the case of SOAP namespaces, the spec authors
are the folks that make the rules.

Given that a namespace is an opaque string, you must have an exact match for
them to be considered equal. Hence, any SOAP 1.1 version that accepts
"http://schemas.xmlsoap.org/soap/envelope" (no slash)  has a bug. The spec
is quite clear. [2] The namespace is
"http://schemas.xmlsoap.org/soap/envelope/" (with slash).

Likewise the SOAP 1.2 spec [3] specifies a namespace of
"http://www.w3.org/2003/05/soap-envelope" (no slash).

As for the service you're trying to use -- I'm not sure which implementation
they might have used. This page [4] lists the preliminary implementations of
SOAP 1.2, and you'll notice that no one references the September version of
the spec. I suspect they were using a particular Axis drop. Perhaps Glen
Daniels can tell us when he thinks Axis will support the SOAP 1.2 final
spec. (Keep in mind that SOAP 1.2 still isn't final, and no one should be
trying to implement production applications based on this spec until it is
final.)

[1] http://www.tbray.org/tag/URNs.html
[2] http://www.w3.org/TR/SOAP/#_Toc478383489
[3] http://www.w3.org/TR/2003/PR-soap12-part1-20030507/#notation
[4] http://www.w3.org/2000/xp/Group/2/03/soap1.2implementation.html

Best regards,
Anne

----- Original Message -----
From: <kkress@bankofny.com>
To: <axis-user@ws.apache.org>
Sent: Sunday, June 01, 2003 9:33 PM
Subject: Re: Problem reading from file


> Anne,
>
> Thanks for your replies. Doesn't it seem strange that
> one SOAP version requires the end slash (/) and the
> next version leaves off the slash?
>
> It seems like the old style is to use the slash and the
> new style is to leave it off. Who makes these rules? ;->
>
> I copied my service provider on the last posting, so I'm
> hoping they get the idea. It's a third party entity building
> a hub for a consortium, so it's anyone's guess whether they
> will fall back to 1.1 or jump forward to 1.2. They are
> using WebSphere, but the consortium members are free to use
> any technology: .Net, BEA, Websphere, Axis, etc.
>
> Is there any ETA on when Axis will adapt to 1.2?
>
>   Ken.
>
> --
> Ken Kress                                     kkress@bankofny.com
> SAS, The Bank of New York                            484.605.4834
>
>
>
>
> "Anne Thomas Manes" <anne@manes.net>
> 06/01/2003 07:41 PM
> Please respond to axis-user
>
>         To:     <axis-user@ws.apache.org>
>         cc:
>         Subject:        Re: Problem reading from file
>
>
> Ken,
>
> The issue about the slash/no-slash is that the URL is opaque.
> The SOAP 1.1 spec requires that you specify the SOAP namespace
> as xmlns:env="http://schemas.xmlsoap.org/soap/envelope/", which isn't
> the same as xmlns:env="http://schemas.xmlsoap.org/soap/envelope".
>
> The namespace name indicates the SOAP version. If SOAP 1.1
> receives a message with any other namespace, it is required to
> reject it with a VersionMismatch error.
>
> Likewise a SOAP 1.2 server is looking for a namespace of
> "http://www.w3.org/2003/05/soap-envelope". And your service was
> developed using a preliminary version of SOAP 1.2, which requires
> yet another namespace name.
>
> Such is the problems associated with using tools built on Working Drafts.
>
> Anne
>
> ----- Original Message -----
> From: <kkress@bankofny.com>
> To: <axis-user@ws.apache.org>
> Sent: Sunday, June 01, 2003 12:50 PM
> Subject: RE: Problem reading from file
>
>
> > Fred,
> >
> > Thanks for your help. Axis accepted the xml after I added
> > a slash to the end:
> >
> >     xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
> >
> > The slash-noslash issue confuses me. When I sent my xml
> > to my business partner's web service, it rejected the above
> >  ... and wouldn't accept my xml until I changed it back to:
> >
> > http://www.w3.org/2001/09/soap-envelope
> >
> > It seems strange that everyone is hard-coding the URL for
> > the SOAP-envelope schema.
> >
> > I'm flabbergasted that something as simple as this might
> > prevent me from using Axis for this project.
> >
> >   Ken.
> >
> > --
> > Ken Kress                                     kkress@bankofny.com
> > SAS, The Bank of New York                            484.605.4834
> >
> >
> >
> >
> > "Barrett, Fred" <Fred.Barrett@FMR.COM>
> > 05/30/2003 04:29 PM
> > Please respond to axis-user
> >
> >         To:     "'axis-user@ws.apache.org'" <axis-user@ws.apache.org>
> >         cc:
> >         Subject:        RE: Problem reading from file
> >
> >
> > Try this for your soap envelope namespace:
> >
> >     xmlns:env="http://schemas.xmlsoap.org/soap/envelope"
> >
> > -- Fred B.
> >
> >
> >
> > -----Original Message-----
> > From: kkress@bankofny.com [mailto:kkress@bankofny.com]
> > Sent: Friday, May 30, 2003 3:42 PM
> > To: axis-user@ws.apache.org
> > Subject: Problem reading from file
> >
> >
> > I thought I could solve my own problem by reading in the
> > complete XML document from the file system, but it isn't
> > working. The error message I get is probably misleading,
> > so I could use some help. What am I doing wrong?
> >
> > I kept trimming things out of the XML file till I got it down
> > to:
> > <?xml version="1.0" encoding="UTF-8"?>
> > <env:Envelope
> >         xmlns:env="http://www.w3.org/2001/09/soap-envelope"
> >         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> > </env:Envelope>
> >
> > When I try this:
> >
> > FileInputStream fis = null;
> > try {fis = new FileInputStream ( inputfile);}
> > catch ( FileNotFoundException fofe )
> > { System.out.println("Error: " + fofe.toString());}
> > SOAPEnvelope request = new SOAPEnvelope( fis );
> >
> > I get this error:
> >
> > Exception in thread "main" Version Mismatch
> > at
> >
>
org.apache.axis.message.EnvelopeBuilder.startElement(EnvelopeBuilder.java:13
> > 8)
> > at
> >
>
org.apache.axis.encoding.DeserializationContextImpl.startElement(Deserializa
> > tionContextImpl.java:962)
> > at
> >
> weblogic.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1376)
> > at
> >
>
weblogic.apache.xerces.validators.common.XMLValidator.callStartElement(XMLVa
> > lidator.java:1183)
> > at
> >
>
weblogic.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentS
> > canner.java:1876)
> > at
> >
>
weblogic.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispat
> > ch(XMLDocumentScanner.java:1019)
> > at
> >
>
weblogic.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentSca
> > nner.java:381)
> > at weblogic.apache.xerces.framework.XMLParser.parse(XMLParser.java:967)
> > at weblogic.xml.jaxp.WebLogicXMLReader.parse(WebLogicXMLReader.java:123)
> > at weblogic.xml.jaxp.RegistryXMLReader.parse(RegistryXMLReader.java:125)
> > at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
> > at
> >
>
org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationCon
> > textImpl.java:242)
> > at org.apache.axis.message.SOAPEnvelope.<init>(SOAPEnvelope.java:158)
> > at TestFileImport.doit(TestFileImport.java:53)
> > at TestFileImport.main(TestFileImport.java:71)
> >
> >
> > --
> > Ken Kress                                     kkress@bankofny.com
> > SAS, The Bank of New York                            484.605.4834
> >
> > ________________________________________________________________________
> > The information in this e-mail, and any attachment therein, is
> > confidential
> > and for use by the addressee only. If you are not the intended
> recipient,
> > please return the e-mail to the sender and delete it from your computer.
> > Although The Bank of New York attempts to sweep e-mail and attachments
> for
> > viruses, it does not guarantee that either are virus-free and accepts no
> > liability for any damage sustained as a result of viruses.
> >
> >
> >
> > ________________________________________________________________________
> > The information in this e-mail, and any attachment therein, is
> confidential and for use by the addressee only. If you are not the
> intended
> recipient, please return the e-mail to the sender and delete it from your
> computer. Although The Bank of New York attempts to sweep e-mail and
> attachments for viruses, it does not guarantee that either are virus-free
> and accepts no liability for any damage sustained as a result of viruses.
> >
>
>
>
>
> ________________________________________________________________________
> The information in this e-mail, and any attachment therein, is
confidential and for use by the addressee only. If you are not the intended
recipient, please return the e-mail to the sender and delete it from your
computer. Although The Bank of New York attempts to sweep e-mail and
attachments for viruses, it does not guarantee that either are virus-free
and accepts no liability for any damage sustained as a result of viruses.
>


Mime
View raw message