[ 
http://issues.apache.org/jira/browse/TUSCANY-27?page=comments#action_12366514 ] 

Fuhwei Lwo commented on TUSCANY-27:
-----------------------------------

Here is the schema I am testing on.

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
  
   <xsd:element name="openStockQuote" type="OpenQuote"/>
   
   <xsd:element name="price" type="xsd:decimal"/>
   
   <xsd:element name="company">
     <xsd:complexType>
        <xsd:sequence>
                <xsd:element name="name" type="xsd:string"/>
        </xsd:sequence>
     </xsd:complexType>
   </xsd:element>

   <xsd:complexType name="OpenQuote">
       <xsd:sequence>
                  <xsd:element name="symbol" type="xsd:string"/>
          <xsd:any maxOccurs="unbounded" namespace="##any"/>
       </xsd:sequence>
   </xsd:complexType>

</xsd:schema>


> "No targetNamespace" in XSD is not fully functional yet
> -------------------------------------------------------
>
>          Key: TUSCANY-27
>          URL: http://issues.apache.org/jira/browse/TUSCANY-27
>      Project: Tuscany
>         Type: Bug
>   Components: Java SDO Implementation
>  Environment: All platforms
>     Reporter: Fuhwei Lwo

>
> If I didn't specify "targetNamespace" in my XSD, I assume I can invoke 
> DataFactory.INSTANCE.create("", "MyType") or 
> DataFactory.INSTANCE.create(null, "MyType") to create a data object of MyType.
> Now, I got the null pointer exception like ..
> Exception in thread "main" java.lang.NullPointerException
>         at org.eclipse.emf.ecore.util.EcoreUtil.create(EcoreUtil.java:2760)
>         at 
> org.apache.tuscany.sdo.helper.DataFactoryImpl.create(DataFactoryImpl.
> java:56)
>         at 
> org.apache.tuscany.sdo.helper.DataFactoryImpl.create(DataFactoryImpl.
> java:43)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to