users@jax-ws.java.net

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

From: Dennis Yu <jyu_at_rim.com>
Date: Tue, 30 May 2006 14:08:13 -0400

The issue number is #16, and I made it P1 :)
-Dennis

------------------------------------------------------------------------

https://jax-ws.dev.java.net/issues/show_bug.cgi?id=16
                 Issue #|16
                 Summary| http://www.w3.org/XML/1998/namespace prefix
problem i
                        |n the soap envelope generated by JAX-WS2.0
               Component|jax-ws
                 Version|current
                Platform|All
              OS/Version|All
                     URL|
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P1
            Subcomponent|www
             Assigned to|issues_at_jax-ws
             Reported by|dennisyu



-----Original Message-----
From: Doug.Kohlert_at_Sun.COM [mailto:Doug.Kohlert_at_Sun.COM]
Sent: Tuesday, May 30, 2006 12:50 PM
To: users_at_jax-ws.dev.java.net
Subject: Re: http://www.w3.org/XML/1998/namespace prefix problem in the
soap envelope generated by JAX-WS2.0

OK, thanks. Would you file an issue using issue tracker
(https://jax-ws.dev.java.net/servlets/ProjectIssues) so we can track
this?

Thanks

Dennis Yu wrote:

> This nightly build version is not working; I cannot deploy it properly

> to the Netbeans-Tomcat, got following errors:
>
>
> OK - Deployed application at context path /WindRepArr
>
> start?path=/WindRepArr
>
> FAIL - Application at context path /WindRepArr could not be started
>
> May 29, 2006 10:13:21 AM
> com.sun.xml.ws.transport.http.servlet.WSServletContextListener
> contextInitialized
>
> SEVERE: WSSERVLET11: failed to parse runtime descriptor: Metadata has
> more than one WSDL that has Service definiton for the endpoint.
> WSDL=jndi:/localhost/WindRepArr/WEB-INF/wsdl/WindRepArr.wsdl is one
> such WSDL.
>
> Metadata has more than one WSDL that has Service definiton for the
> endpoint. WSDL=jndi:/localhost/WindRepArr/WEB-INF/wsdl/WindRepArr.wsdl

> is one such WSDL.
>
> at
>
com.sun.xml.ws.server.EndpointFactory.findPrimary(EndpointFactory.java:4
10)
>
> at
>
com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.jav
a:139)
>
> at
> com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:291)
>
> at
>
com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(D
eploymentDescriptorParser.java:237)
>
> at
>
com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(Deploymen
tDescriptorParser.java:131)
>
> at
>
com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextIn
itialized(WSServletContextListener.java:90)
>
> at
>
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.j
ava:3729)
>
> at
>
org.apache.catalina.core.StandardContext.start(StandardContext.java:4183
)
>
> at
>
org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:117
5)
>
> at
>
org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:368
)
>
> at
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
>
> at
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>
> at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:252)
>
> at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:173)
>
> at
>
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFi
lter.java:168)
>
> at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:202)
>
> at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:173)
>
> at
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:213)
>
> at
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:178)
>
> at
>
org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator
Base.java:524)
>
> at
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:126)
>
> at
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:105)
>
> at
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:107)
>
> at
>
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
48)
>
> at
>
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:86
9)
>
> at
>
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc
essConnection(Http11BaseProtocol.java:664)
>
> at
>
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
.java:527)
>
> at
>
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow
erWorkerThread.java:80)
>
> at
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:684)
>
> at java.lang.Thread.run(Thread.java:595)
>
> May 29, 2006 10:13:21 AM org.apache.catalina.core.StandardContext
> listenerStart
>
> SEVERE: Exception sending context initialized event to listener
> instance of class
> com.sun.xml.ws.transport.http.servlet.WSServletContextListener
>
> WSSERVLET11: failed to parse runtime descriptor: Metadata has more
> than one WSDL that has Service definiton for the endpoint.
> WSDL=jndi:/localhost/WindRepArr/WEB-INF/wsdl/WindRepArr.wsdl is one
> such WSDL.
>
> at
>
com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextIn
itialized(WSServletContextListener.java:100)
>
> at
>
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.j
ava:3729)
>
> at
>
org.apache.catalina.core.StandardContext.start(StandardContext.java:4183
)
>
> at
>
org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:117
5)
>
> at
>
org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:368
)
>
> at
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
>
> at
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>
> at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:252)
>
> at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:173)
>
> at
>
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFi
lter.java:168)
>
> at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:202)
>
> at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:173)
>
> at
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:213)
>
> at
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:178)
>
> at
>
org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator
Base.java:524)
>
> at
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:126)
>
> at
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:105)
>
> at
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:107)
>
> at
>
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
48)
>
> at
>
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:86
9)
>
> at
>
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc
essConnection(Http11BaseProtocol.java:664)
>
> at
>
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
.java:527)
>
> at
>
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow
erWorkerThread.java:80)
>
> at
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:684)
>
> at java.lang.Thread.run(Thread.java:595)
>
> Caused by: Metadata has more than one WSDL that has Service definiton
> for the endpoint.
> WSDL=jndi:/localhost/WindRepArr/WEB-INF/wsdl/WindRepArr.wsdl is one
> such WSDL.
>
> at
>
com.sun.xml.ws.server.EndpointFactory.findPrimary(EndpointFactory.java:4
10)
>
> at
>
com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.jav
a:139)
>
> at
> com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:291)
>
> at
>
com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(D
eploymentDescriptorParser.java:237)
>
> at
>
com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(Deploymen
tDescriptorParser.java:131)
>
> at
>
com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextIn
itialized(WSServletContextListener.java:90)
>
> ... 24 more
>
> May 29, 2006 10:13:21 AM org.apache.catalina.core.StandardContext
start
>
> SEVERE: Error listenerStart
>
> May 29, 2006 10:13:21 AM org.apache.catalina.core.StandardContext
start
>
> SEVERE: Context [/WindRepArr] startup failed due to previous errors
>
> May 29, 2006 10:13:21 AM
> com.sun.xml.ws.transport.http.servlet.WSServletContextListener
> contextDestroyed
>
> INFO: WSSERVLET13: JAX-WS context listener destroyed
>
> BTW, My WSDL Service looks like following:
>
> <wsdl:service name="WindRepArrService">
>
> <wsdl:port binding="impl:WindRepArrBinding"
name="WindRepArrPort">
>
> <wsdlsoap:address
> location="http://jyu-xp:8080/WindRepArrService/WindRepArrPort"/>
>
> </wsdl:port>
>
> <wsdl:port binding="impl:EvSrcSoapBinding"
> name="WindRepArrEvSrcPort">
>
> <wsdlsoap:address
> location="http://jyu-xp:8080/WindRepArrService/WindRepArrEvSrcPort"/>
>
> </wsdl:port>
>
> <wsdl:port binding="impl:SubsMgrSoapBinding"
> name="WindRepArrSubsMgrPort">
>
> <wsdlsoap:address
>
location="http://jyu-xp:8080/WindRepArrService/WindRepArrSubsMgrPort"/>
>
> </wsdl:port>
>
> </wsdl:service>
>
>
> -Dennis
>
>
>
> -----Original Message-----
> From: Doug.Kohlert_at_Sun.COM [mailto:Doug.Kohlert_at_Sun.COM]
> Sent: Friday, May 26, 2006 7:07 PM
> To: users_at_jax-ws.dev.java.net
> Subject: Re: http://www.w3.org/XML/1998/namespace prefix problem in
> the soap envelope generated by JAX-WS2.0
>
> Sounds like a bug, can you try the 2.0.1 nightly build located at:
>
> https://jax-ws.dev.java.net/ri-download.html?
>
> This is an early access of 2.0.1 so some functionality is not there
yet
>
> but this problem
>
> Dennis Yu wrote:
>
>>I am using IDE NetBeans 5.5 with JAX-WS 2.0 lib.(FCS) with Sun's Java
>
>>System application Server PE 9 FCS and TomCat server.
>
>>
>
>>And I also got the same problem when using JAX -WS (RI) Version: 2.0
>
>>ea3.
>
>>
>
>>Now seems I cannot find a way to change the prefix to "xml" for the
>
>>namespace: "http://www.w3.org/XML/1998/namespace", because I always
got
>
>>exception when tried to run the following code:
>
>>
>
>>SOAPPart sp = message.getSOAPPart();
>
>>SOAPEnvelope ev = sp.getEnvelope();
>
>>
>
>>Or doing some type casting.
>
>>
>
>>It indicates Wrong prefix problem.
>
>>
>
>>
>
>>Thanks,
>
>>
>
>>
>
>>Dennis
>
>>
>
>>
>
>>
>
>>
>
>>
>
>>
>
>>-----Original Message-----
>
>>From: Doug.Kohlert_at_Sun.COM [mailto:Doug.Kohlert_at_Sun.COM]
>
>>Sent: Thursday, May 25, 2006 12:53 PM
>
>>To: users_at_jax-ws.dev.java.net
>
>>Subject: Re: http://www.w3.org/XML/1998/namespace prefix problem in
the
>
>>soap envelope generated by JAX-WS2.0
>
>>
>
>>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/addres
si
>
>>ng.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: users-unsubscribe_at_jax-ws.dev.java.net
>
>>For additional commands, e-mail: users-help_at_jax-ws.dev.java.net
>
>>
>
>>
>
>>
>
>>
>
>>---------------------------------------------------------------------
>
>>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: users-unsubscribe_at_jax-ws.dev.java.net
>
>>For additional commands, e-mail: users-help_at_jax-ws.dev.java.net
>
>>
>
>> 
>
>>
>
> ---------------------------------------------------------------------
>
> To unsubscribe, e-mail: users-unsubscribe_at_jax-ws.dev.java.net
>
> For additional commands, e-mail: users-help_at_jax-ws.dev.java.net
>
>
------------------------------------------------------------------------
> 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: users-unsubscribe_at_jax-ws.dev.java.net
For additional commands, e-mail: users-help_at_jax-ws.dev.java.net
---------------------------------------------------------------------
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.