Re: http://www.w3.org/XML/1998/namespace prefix problem in the soap envelope generated by JAX-WS2.0

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: http://www.w3.org/XML/1998/namespace prefix problem in the soap envelope generated by JAX-WS2.0

Doug Kohlert

Dennis,
Is this with the FCS build or another build of JAX-WS?

Dennis Yu wrote:

> I am trying to build a web service with notification function using
> JAX-WS2.0, and I use the wsimport to generate the artifacts.
>
> In the WSDL, I import
> http://schemas.xmlsoap.org/ws/2004/08/eventing/eventing.wsdl file.
>
> ( <wsdl:import location="eventing.wsdl"
> namespace="http://schemas.xmlsoap.org/ws/2004/08/eventing"
> <http://schemas.xmlsoap.org/ws/2004/08/eventing>/> )
>
> When I checked the SOAP response message in the SOAP Envelope and I
> found the prefix ns3 is pointed to namespace
> http://www.w3.org/XML/1998/namespace, but if you go to
> http://www.w3.org/XML/1998/namespace link
>
> And you will see:
>
> The namespace whose name is http://www.w3.org/XML/1998/namespace is
> bound by definition to the prefix xml: according to Namespaces in XML,
> W3C Recommendation 14 Jan 1999
> <http://www.w3.org/TR/1999/REC-xml-names-19990114> (and by Namespaces
> in XML 1.1 <http://www.w3.org/TR/xml-names11/>). Note that unlike all
> other XML namespaces, both the name and the prefix are specified;
> i.e., if you want XML 1.0 processors to recognize this namespace, you
> must use the reserved prefix xml:.
>
> So I always got exception when tried to parse the following Soap
> Return, because of the wrong prefix ?ns3 for this namespace.
>
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:ns1="http://schemas.xmlsoap.org/ws/2004/08/addressing"
> xmlns:ns2="http://schemas.xmlsoap.org/ws/2004/08/eventing"
> xmlns:ns3="http://www.w3.org/XML/1998/namespace">
>
> You will find the eventing.xsd schema at :
> http://schemas.xmlsoap.org/ws/2004/08/eventing/eventing.xsd , and in
> this schema there is also a bug there,
>
> The schemaLocation=http://schemas.xmlsoap.org/ws/2004/08/addressing 
> for addressing should be changed to
>
> schemaLocation=http://schemas.xmlsoap.org/ws/2004/08/addressing/addressing.xsd 
> now.
>
> -Dennis Yu
>
> ------------------------------------------------------------------------
> This transmission (including any attachments) may contain confidential
> information, privileged material (including material protected by the
> solicitor-client or other applicable privileges), or constitute
> non-public information. Any use of this information by anyone other
> than the intended recipient is prohibited. If you have received this
> transmission in error, please immediately reply to the sender and
> delete this information from your system. Use, dissemination,
> distribution, or reproduction of this transmission by unintended
> recipients is not authorized and may be unlawful.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...