You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Simon Laws (JIRA)" <de...@tuscany.apache.org> on 2011/01/13 15:16:45 UTC
[jira] Assigned: (TUSCANY-3815) Multiple xmlns="" generated when
writing out composite file for parameters with multiple attribures
[ https://issues.apache.org/jira/browse/TUSCANY-3815?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Simon Laws reassigned TUSCANY-3815:
-----------------------------------
Assignee: Simon Laws
> Multiple xmlns="" generated when writing out composite file for parameters with multiple attribures
> ---------------------------------------------------------------------------------------------------
>
> Key: TUSCANY-3815
> URL: https://issues.apache.org/jira/browse/TUSCANY-3815
> Project: Tuscany
> Issue Type: Bug
> Affects Versions: Java-SCA-2.0-Beta1
> Environment: Sun JDK 1.6-20 no wookstox
> Reporter: Simon Laws
> Assignee: Simon Laws
>
> I'm trying to run ASM_4005 using the JVM XML processing, i.e. no Woodstox. I get the following error
> SEVERE: XMLStreamException occured due to : {0}
> org.apache.tuscany.sca.contribution.processor.ContributionReadException: javax.xml.stream.XMLStreamException: ParseError
> at [row,col]:[5,227]
> Message: Attribute "xmlns" was already specified for element "zdef940251576:value".
> The policy processing writes out the composite so it can be read back into a DOM to have XQuery applied. It's on the read that the error occurs. The XML that gets written is as follows....
> <zdef-767159874:composite xmlns=""
> xmlns:zdef-767159874="http://docs.oasis-open.org/ns/opencsa/sca/200912"
> targetNamespace="http://docs.oasis-open.org/ns/opencsa/sca/200912"
> name="" local="true">
> <zdef-767159874:component xmlns="" name="TestClient"
> uri="TestClient">
> <zdef-767159874:implementation.composite
> xmlns="" xmlns:ns0="http://docs.oasis-open.org/ns/opencsa/scatests/200903"
> name="ns0:TestClient_0002"></zdef-767159874:implementation.composite>
> <zdef-767159874:service xmlns="" name="TestInvocation">
> <zdef-767159874:interface.wsdl
> interface="http://test.sca.oasisopen.org/#wsdl.interface(TestInvocation)"></zdef-767159874:interface.wsdl>
> <zdef-767159874:binding.ws name="TestInvocation"></zdef-767159874:binding.ws>
> </zdef-767159874:service>
> <zdef-767159874:reference xmlns="" name="reference1"
> target="TestComponent1/Service1"></zdef-767159874:reference>
> <zdef-767159874:property xmlns="" name="testName"
> mustSupply="false" many="false">
> <value xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912">ASM_4005</value>
> </zdef-767159874:property>
> </zdef-767159874:component>
> <zdef-767159874:component xmlns=""
> name="TestComponent1" uri="TestComponent1">
> <zdef-767159874:implementation.composite
> xmlns="" xmlns:ns1="http://docs.oasis-open.org/ns/opencsa/scatests/200903"
> name="ns1:TestComposite43"></zdef-767159874:implementation.composite>
> <zdef-767159874:reference xmlns="" name="Reference1"
> target="TestComponent2/Service1"></zdef-767159874:reference>
> <zdef-767159874:property xmlns="" name="serviceName"
> mustSupply="false" many="false">
> <value xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912">service1</value>
> </zdef-767159874:property>
> <zdef-767159874:property xmlns="" name="propertyName"
> mustSupply="false" many="false" type="Callback">
> ** <zdef-767159874:value xmlns="" xmlns=""
> ** policySets="bar" requires="foo">
> <binding.sca xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"></binding.sca>
> </zdef-767159874:value>
> </zdef-767159874:property>
> </zdef-767159874:component>
> <zdef-767159874:component xmlns=""
> name="TestComponent2" uri="TestComponent2">
> <zdef-767159874:implementation.composite
> xmlns="" xmlns:ns2="http://docs.oasis-open.org/ns/opencsa/scatests/200903"
> name="ns2:TestComposite1"></zdef-767159874:implementation.composite>
> <zdef-767159874:service xmlns="" name="Service1"></zdef-767159874:service>
> <zdef-767159874:property xmlns="" name="serviceName"
> mustSupply="false" many="false">
> <value xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912">service2</value>
> </zdef-767159874:property>
> </zdef-767159874:component>
> </zdef-767159874:composite>
> Note that the lines marked ** does have xmlns="" xmlns="" which is what's causing the reader to fail.
> Having looked at this there is some rather strange code in the org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor.XAttr nested class. If no namespace URI is provided when writing an attribute then null is chosen.
> public XAttr(String name, String value) {
> this(null, name, value);
> }
> This is despite the class defaulting the uri meber variable to SCA11_NS
> Anyone know why this is defaulted to null?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.