Return-Path: X-Original-To: apmail-cxf-issues-archive@www.apache.org Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 114E98F69 for ; Tue, 30 Aug 2011 17:14:04 +0000 (UTC) Received: (qmail 40964 invoked by uid 500); 30 Aug 2011 17:14:04 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 40947 invoked by uid 500); 30 Aug 2011 17:14:03 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 40937 invoked by uid 99); 30 Aug 2011 17:14:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Aug 2011 17:14:03 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Aug 2011 17:13:59 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 14FE1D7396 for ; Tue, 30 Aug 2011 17:13:38 +0000 (UTC) Date: Tue, 30 Aug 2011 17:13:38 +0000 (UTC) From: "Daniel Kulp (JIRA)" To: issues@cxf.apache.org Message-ID: <912252544.8380.1314724418082.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <259419237.5887.1310477100214.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Resolved] (CXF-3652) Duplicate default namespace declaration - CXF is adding undesired markup to inline XML MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CXF-3652?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Kulp resolved CXF-3652. ------------------------------ Resolution: Cannot Reproduce Fix Version/s: (was: NeedMoreInfo) Invalid Could not reproduce and request for testcase unanswered for more than a mon= th. > Duplicate default namespace declaration - CXF is adding undesired markup = to inline XML > -------------------------------------------------------------------------= ------------- > > Key: CXF-3652 > URL: https://issues.apache.org/jira/browse/CXF-3652 > Project: CXF > Issue Type: Bug > Affects Versions: 2.2.10, 2.4.1 > Environment: jdk1.6.0_24 Windows XP SP3 > Reporter: Haroldo de Oliveira Pinheiro > Assignee: Daniel Kulp > Fix For: Invalid > > > Basically, CXF is turning this: > {noformat}{noformat}=20 > Into this: > {noformat}{noformat}=20 > Causing an "Duplicate default namespace declaration" exception. > This is my Spring configuration: > {noformat}=20 > > =09xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws=3D= "http://cxf.apache.org/jaxws" > =09xmlns:sec=3D"http://cxf.apache.org/configuration/security" xmlns:http= =3D"http://cxf.apache.org/transports/http/configuration" > =09xmlns:context=3D"http://www.springframework.org/schema/context" xmlns:= tx=3D"http://www.springframework.org/schema/tx" > =09xmlns:cxf=3D"http://cxf.apache.org/core" > =09xsi:schemaLocation=3D"http://www.springframework.org/schema/beans =20 > http://www.springframework.org/schema/beans/spring-beans-3.0.x= sd > http://www.springframework.org/schema/context=20 > http://www.springframework.org/schema/context/spring-context.x= sd > http://www.springframework.org/schema/tx=20 > http://www.springframework.org/schema/tx/spring-tx.xsd > http://cxf.apache.org/configuration/security > http://cxf.apache.org/schemas/configuration/security.xsd > http://cxf.apache.org/jaxws=20 > http://cxf.apache.org/schemas/jaxws.xsd > http://cxf.apache.org/transports/http/configuration > http://cxf.apache.org/schemas/configuration/http-conf.xsd > http://cxf.apache.org/core=20 > http://cxf.apache.org/schemas/core.xsd"> > =09 =09=09serviceClass=3D"com.ats.nfe.webservice.mg.NfeStatusServico2Soap12" > =09=09address=3D"https://hnfe.fazenda.mg.gov.br/nfe2/services/NfeStatus2"= > > =09=09 > =09=09=09 > =09=09=09 > =09=09 > =09=09 > =09=09=09 > =09=09=09 > =09=09 > =09 > =09 =09=09name=3D"{http://www.portalfiscal.inf.br/nfe/wsdl/NfeStatusServico2}= NfeStatusServico2Soap12Port.http-conduit"> > =09=09 > =09=09=09 > =09=09=09=09 =09=09=09=09=09file=3D"C:/Documents and Settings/HaroldoOliveira/teste.jk= s" /> > =09=09=09 > =09=09=09 > =09=09=09=09 =09=09=09=09=09file=3D"C:/Documents and Settings/HaroldoOliveira/truststo= re_nfe.jks" /> > =09=09=09 > =09=09=09 > =09=09=09=09 > =09=09=09=09.*_EXPORT_.* > =09=09=09=09.*_EXPORT1024_.* > =09=09=09=09.*_WITH_DES_.* > =09=09=09=09.*_WITH_NULL_.* > =09=09=09=09.*_DH_anon_.* > =09=09=09 > =09=09 > =09=09 > =09 > > > > > =20 > > {noformat}=20 > And this is my test code: > {noformat}=20 > @RunWith(SpringJUnit4ClassRunner.class) > @ContextConfiguration(locations=3D{"spring-context-cxf.xml"}) > public class NFeCXFTest { > =09 > =09private static String XML_TESTE_STATUS =3D > =09=09"" + > =09=09" 2" + > =09=09" 31" + > =09=09" STATUS" + > =09=09""; > =09 > =09private NfeStatusServico2Soap12 statusServ; > =09@Test > =09public void commitNfeStatusServicoNF() { > =09=09NfeCabecMsg cabec =3D new NfeCabecMsg(); > =09=09cabec.setCUF("31"); > =09=09cabec.setVersaoDados("2.00"); > =09=09 > =09=09NfeDadosMsg dados =3D new NfeDadosMsg(); > try { > =09 DocumentBuilderFactory dbf =3D DocumentBuilderFactory.newInsta= nce(); > =09=09=09DocumentBuilder db =3D dbf.newDocumentBuilder(); > =09 InputSource is =3D new InputSource(); > =09 is.setCharacterStream(new StringReader(XML_TESTE_STATUS)); > =09 Document contentDoc =3D db.parse(is); > =09 dados.getContent().add(contentDoc.getDocumentElement()); > =09=09} catch (ParserConfigurationException e) { > =09=09=09throw new IllegalArgumentException("Erro ao empacotar o conte=C3= =BAdo, ", e); > =09=09} catch (SAXException e) { > =09=09=09throw new IllegalArgumentException("Erro ao empacotar o conte=C3= =BAdo, ", e); > =09=09} catch (IOException e) { > =09=09=09throw new IllegalArgumentException("Erro ao empacotar o conte=C3= =BAdo, ", e); > =09=09}=09=09=09 > =09=09 > =09=09NfeStatusServicoNF2Result ret =3D this.statusServ.nfeStatusServicoN= F2(dados, cabec); > =09=09Object retVal =3D ret.getContent().iterator().next(); > =09=09System.out.println(retVal.getClass()); > =09=09System.out.println("***.***.***"); > =09=09try { > =09=09=09Result stringResult =3D new StringResult(); > =09=09=09TransformerFactory tFactory =3D TransformerFactory.newInstance()= ; > =09=09=09Transformer transformer =3D tFactory.newTransformer(); > =09=09=09transformer.transform(new DOMSource((Node)retVal), stringResult)= ; > =09=09=09System.out.println("O retorno =C3=A9: " + stringResult); > =09=09} catch (TransformerException e) { > =09=09=09throw new IllegalArgumentException("Imposs=C3=ADvel gerar nova r= equisi=C3=A7=C3=A3o, ", e); > =09=09} > =09} > =09 > =09@Resource(name=3D"nfeStatusServicoMGWebService") > =09public void setStatusServ(NfeStatusServico2Soap12 statusServ) { > =09=09this.statusServ =3D statusServ; > =09} > } > {noformat}=20 > --- > Edit: I tried upgrading to 2.4.1 but, sorry, the error persists. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira