You are viewing a plain text version of this content. The canonical link for it is here.
Posted to announce@apache.org by Luciano Resende <lr...@apache.org> on 2010/10/24 04:23:52 UTC

[ANNOUNCE] Apache Tuscany SCA Java 2.0-M5.1 released

The Apache Tuscany team is pleased to announce the 2.0-M5.1 release of
the Java SCA 2.0 project.

Apache Tuscany/SCA provides a runtime environment based on Service
Component Architecture (SCA), which is a set of OASIS specifications
aimed at simplifying SOA application development. The main purpose of
this minor release is to fix the Tuscany Runtime to restore support
for running SCA applications in the Google AppEngine environment.

See the RELEASE_NOTES and CHANGES file for more details about the
release, and to download the distributions please go to:

http://tuscany.apache.org/sca-java-2x-releases.html

To find out more about OASIS Open CSA go to:

http://www.oasis-opencsa.org

Apache Tuscany welcomes your help. Any contribution, including code,
testing, contributions to the documentation, or bug reporting is
always appreciated. For more information on how to get involved in
Apache Tuscany visit the website at:

http://tuscany.apache.org

Thank you for your interest in Apache Tuscany!

-- 
Luciano Resende
http://people.apache.org/~lresende
http://twitter.com/lresende1975
http://lresende.blogspot.com/

Re: DOMSource cannot be loaded as SDO correctly

Posted by ext2 <xu...@tongtech.com>.
This is a simple test, xml encoding isn’t needed.(although it’s critical
in practice)

because I just using standard ANSI characters in the simple test; 

 

  _____  

Sender: lili [mailto:llwang0455@163.com] 
Time: 2010-12-13 15:00
Receiver: dev@tuscany.apache.org

Subject: Re:DOMSource cannot be loaded as SDO correctly

 

Maybe your string xml is not right,it should include "<?xml version="1.0"
encoding="UTF-8"?>" element.

 




At 2010-12-13 14:30:52,ext2 <xu...@tongtech.com> wrote:
 
>Hi:
>If I convert  a xml  to sdo which stand for a xsd's global element;
>The Tuscany SDO always ask for me to using string , and cannot using
>DOMSource.
>If I using DOMSource, the Tuscany cannot aware to the xml element's type,
so
>the converted SDO's type is not correct, it will always be ANYTYPE; 
>       This means I must convert DOM to String first, then convert String
>to SDO, this waste performance;
> 
>I illustrate the bug , using following code, schema and xml:
> 
>Schema: targetNamespace="http://test/sometype"
><xs:element name="st1E" type="ns:ST1"/>
><xs:complexType name="ST1">
>       <xs:sequence>
>              <xs:element name="a1" type="xs:string"/>
>       </xs:sequence>
></xs:complexType>
> 
>XML: defined by the global element {http://test/sometype}st1E
><st1E xmlns="http://test/sometype"><a1>test</a1></st1E>
> 
>The Source code:
>       //the global element's xml
>       String xml="<st1E
>xmlns=\"http://test/sometype\"><a1>test</a1></st1E>"; 
>       DataObject o = context.getXMLHelper().load(xml).getDataObject();
>       //loading string as SDO is correctly, so the assert is passed;
>       assertTrue(o.getType().getURI().equals(xsd_namespace));
> 
> 
>       //here I using DocumentBuilder to convert string to w3c Element;
>       Element e = DOMUtil.string2DOM(xml) 
>       DataObject o = context.getXMLHelper().load(new DOMSource(e), null,
>null).getDataObject();
>       //loaded SDO's type is AnyType, not the schema defined type; so the
>assertion will failure;
>       Try{assertTrue(o.getType().getURI().equals(xsd_namespace));
>}catch(){}
>       
>       //finally  I convert the Element back to string and reload it using
>xml helper , the sdo is also correctly;
>       String s1 = DOMUtil.dom2String(e);//here I using a xsl transformer
>to convert element back to string;
>       DataObject o = context.getXMLHelper().load(xml).getDataObject();
> 
>       //re-loading string as SDO is also correctly, so the assert is
>passed;
>       assertTrue(o.getType().getURI().equals(xsd_namespace));
> 
> 
> 
> 






  _____  

 <http://help.163.com/special/007525G0/163mail_guide.html?id=2716> 网易
163/126邮箱百分百兼容iphone ipad邮件收发 


Re:DOMSource cannot be loaded as SDO correctly

Posted by lili <ll...@163.com>.
Maybe your string xml is not right,it should include "<?xml version="1.0" encoding="UTF-8"?>" element.




At 2010-12-13 14:30:52,ext2 <xu...@tongtech.com> wrote:

>Hi:
>If I convert  a xml  to sdo which stand for a xsd's global element;
>The Tuscany SDO always ask for me to using string , and cannot using
>DOMSource.
>If I using DOMSource, the Tuscany cannot aware to the xml element's type, so
>the converted SDO's type is not correct, it will always be ANYTYPE; 
>	This means I must convert DOM to String first, then convert String
>to SDO, this waste performance;
>
>I illustrate the bug , using following code, schema and xml:
>
>Schema: targetNamespace="http://test/sometype"
><xs:element name="st1E" type="ns:ST1"/>
><xs:complexType name="ST1">
>	<xs:sequence>
>		<xs:element name="a1" type="xs:string"/>
>	</xs:sequence>
></xs:complexType>
>
>XML: defined by the global element {http://test/sometype}st1E
><st1E xmlns="http://test/sometype"><a1>test</a1></st1E>
>
>The Source code:
>	//the global element's xml
>	String xml="<st1E
>xmlns=\"http://test/sometype\"><a1>test</a1></st1E>"; 
>	DataObject o = context.getXMLHelper().load(xml).getDataObject();
>	//loading string as SDO is correctly, so the assert is passed;
>	assertTrue(o.getType().getURI().equals(xsd_namespace));
>
>
>	//here I using DocumentBuilder to convert string to w3c Element;
>	Element e = DOMUtil.string2DOM(xml) 
>	DataObject o = context.getXMLHelper().load(new DOMSource(e), null,
>null).getDataObject();
>	//loaded SDO's type is AnyType, not the schema defined type; so the
>assertion will failure;
>	Try{assertTrue(o.getType().getURI().equals(xsd_namespace));
>}catch(){}
>	
>	//finally  I convert the Element back to string and reload it using
>xml helper , the sdo is also correctly;
>	String s1 = DOMUtil.dom2String(e);//here I using a xsl transformer
>to convert element back to string;
>	DataObject o = context.getXMLHelper().load(xml).getDataObject();
>
>	//re-loading string as SDO is also correctly, so the assert is
>passed;
>	assertTrue(o.getType().getURI().equals(xsd_namespace));
>
>
>
>

DOMSource cannot be loaded as SDO correctly

Posted by ext2 <xu...@tongtech.com>.
Hi:
If I convert  a xml  to sdo which stand for a xsd's global element;
The Tuscany SDO always ask for me to using string , and cannot using
DOMSource.
If I using DOMSource, the Tuscany cannot aware to the xml element's type, so
the converted SDO's type is not correct, it will always be ANYTYPE; 
	This means I must convert DOM to String first, then convert String
to SDO, this waste performance;

I illustrate the bug , using following code, schema and xml:

Schema: targetNamespace="http://test/sometype"
<xs:element name="st1E" type="ns:ST1"/>
<xs:complexType name="ST1">
	<xs:sequence>
		<xs:element name="a1" type="xs:string"/>
	</xs:sequence>
</xs:complexType>

XML: defined by the global element {http://test/sometype}st1E
<st1E xmlns="http://test/sometype"><a1>test</a1></st1E>

The Source code:
	//the global element's xml
	String xml="<st1E
xmlns=\"http://test/sometype\"><a1>test</a1></st1E>"; 
	DataObject o = context.getXMLHelper().load(xml).getDataObject();
	//loading string as SDO is correctly, so the assert is passed;
	assertTrue(o.getType().getURI().equals(xsd_namespace));


	//here I using DocumentBuilder to convert string to w3c Element;
	Element e = DOMUtil.string2DOM(xml) 
	DataObject o = context.getXMLHelper().load(new DOMSource(e), null,
null).getDataObject();
	//loaded SDO's type is AnyType, not the schema defined type; so the
assertion will failure;
	Try{assertTrue(o.getType().getURI().equals(xsd_namespace));
}catch(){}
	
	//finally  I convert the Element back to string and reload it using
xml helper , the sdo is also correctly;
	String s1 = DOMUtil.dom2String(e);//here I using a xsl transformer
to convert element back to string;
	DataObject o = context.getXMLHelper().load(xml).getDataObject();

	//re-loading string as SDO is also correctly, so the assert is
passed;
	assertTrue(o.getType().getURI().equals(xsd_namespace));