[jboss-user] [JBossWS] - Element or attribute do not match QName production: QName::=

oskar.carlstedt do-not-reply at jboss.com
Mon Apr 16 05:12:27 EDT 2007


Hello!!

I'm getting a strange exception when invoking a simple client inside a stateless session bean. Everything has to do with the javax.xml.namespace.QName. I'm using xml beans which I had to modify because of an extra include of the javax.xml.namespace.QName, i.e. I have removed the javax.xml.namespace from the xbean.jar. 

I have the following code:

  | XmlOptions xmlOptions = new XmlOptions();
  | xmlOptions.setSavePrettyPrint();
  | 
  | // create target namespace
  | String targetNamespace = "http://test/test-service";
  | 
  | QName serviceQName = new QName(targetNamespace, "Test");
  | QName portTypeQname = new QName(targetNamespace, "TestSoap11Port");
  | URL wsdlURL = new URL("http://lpt-osca:8080/service-test-jaxws-web?wsdl");
  | 
  | Service service = Service.create(wsdlURL, serviceQName);
  | Dispatch<DOMSource> dispatch = service.createDispatch(portTypeQname, DOMSource.class, Mode.PAYLOAD);
  | 
  | // creating xml beans request ...
  | TestRequestDocument testRequestDocument = TestRequestDocument.Factory.newInstance();
  | ...
  | 
  | System.out.println("REQUEST");
  | testRequestDocument.save(System.out, xmlOptions);
  | System.out.println();
  | 
  | DOMSource requestSource = new DOMSource(testRequestDocument.newDomNode());
  | DOMSource responseSource = dispatch.invoke(requestSource);
  | XmlObject xmlObject = XmlObject.Factory.parse(responseSource.getNode());
  | 
  | System.out.println("RESPONSE");
  | xmlObject.save(System.out, xmlOptions);
  | 
  | 

And I'm getting the following error:

  | 2007-04-16 10:31:51,636 DEBUG [org.jboss.ws.core.soap.MessageFactoryImpl] createMessage: [contentType=text/xml; charset=UTF-8]
  | 2007-04-16 10:31:51,665 ERROR [STDERR] [Fatal Error] :1:331: Element or attribute do not match QName production: QName::=(NCName':')?NCName. 
  | 2007-04-16 10:31:51,691 DEBUG [org.jboss.ws.metadata.umdm.EndpointMetaData] Configure SOAPBinding
  | 2007-04-16 10:31:51,691 ERROR [org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS] SOAP request exception
  | java.io.IOException: org.xml.sax.SAXParseException: Element or attribute do not match QName production: QName::=(NCName':')?NCName. 
  | 	at org.jboss.ws.core.utils.DOMUtils.parse(DOMUtils.java:125)
  | 	at org.jboss.ws.core.soap.EnvelopeBuilderPayload.build(EnvelopeBuilderPayload.java:56)
  | 	at org.jboss.ws.core.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:253)
  | 	at org.jboss.ws.core.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:171)
  | 	at org.jboss.ws.core.server.ServiceEndpoint.handleRequest(ServiceEndpoint.java:185)
  | 	at org.jboss.ws.core.server.ServiceEndpointManager.processSOAPRequest(ServiceEndpointManager.java:440)
  | 	at org.jboss.ws.core.server.AbstractServiceEndpointServlet.doPost(AbstractServiceEndpointServlet.java:114)
  | 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
  | 	at org.jboss.ws.core.server.AbstractServiceEndpointServlet.service(AbstractServiceEndpointServlet.java:75)
  | 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
  | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
  | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  | 	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
  | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
  | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  | 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
  | 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
  | 	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
  | 	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
  | 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
  | 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
  | 	at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
  | 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
  | 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
  | 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
  | 	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
  | 	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
  | 	at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
  | 	at java.lang.Thread.run(Thread.java:595)
  | 


Can anyone explain this to me. I found the same error for someone using axis thread about using a different constructor when instantiating the QName (http://forums.crmsuccess.com/sforce/board/message?board.id=JAVA_development&message.id=962), but can it be that? Sounds strange to me. Is there a conflict between my jvm/jee (using std sun when compiling) and the JBoss environment.

I have JBoss 4.0.5.GA with EJB3 RC9 and JBossWS 1.2.0SP1. I'm running everything on a Windows Vista E.Ed. with JDK 1.5.11.


Best Regardsd
Oskar


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4037472#4037472

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4037472



More information about the jboss-user mailing list