Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] DBWS output format

Could you re-run with the following modifications to your testSQL.xml file:
<dbws-builder>
  <properties>
    <property name="projectName">testSQL</property>
    <property name="driver">oracle.jdbc.OracleDriver</property>
    <property name="url">jdbc:oracle:thin:@xxx:1521:xe</property>
    <property name="username">test</property>
    <property name="password">test123</property>
    <property name="platformClassname">org.eclipse.persistence.platform.database.oracle.Oracle10Platform</property>
  </properties>
  <sql
    name="tablewithpk" 
    isCollection="false" 
    returnType="testSQLType" 
    >
    <statement><![CDATA[select id,text from TEST.TABLEWITHPK]]></statement>
    <build-statement><![CDATA[select id,text from TEST.TABLEWITHPK where 0=1]]></build-statement>
  </sql>
</dbws-builder>

On 20/10/2010 1:09 AM, todhunter wrote:
Hello 
I readed again instruction on
http://wiki.eclipse.org/EclipseLink/Development/DBWS/CustomSQLDesignTimeSchema 
and I see that there have been changes, but still it doesnt work
I have testSQL.xml( http://old.nabble.com/file/p30006695/testSQL.xml
testSQL.xml ) which generates error

Exception in thread "main" java.lang.NullPointerException
        at
org.eclipse.persistence.oxm.record.UnmarshalRecord.startCDATA(UnmarshalRecord.java:1035)
        at
org.eclipse.persistence.internal.oxm.record.XMLReader$LexicalHandlerWrapper.startCDATA(XMLReader.java:226)
        at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startCDATA(AbstractSAXParser.java:625)
        at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:484)
        at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
        at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
        at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
        at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
        at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
        at
org.eclipse.persistence.internal.oxm.record.XMLReader.parse(XMLReader.java:147)
        at
org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:650)
        at
org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:264)
        at
org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:251)
        at
org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:215)
        at
org.eclipse.persistence.oxm.XMLUnmarshaller.unmarshal(XMLUnmarshaller.java:306)
        at
org.eclipse.persistence.tools.dbws.DBWSBuilder.start(DBWSBuilder.java:297)
        at
org.eclipse.persistence.tools.dbws.DBWSBuilder.main(DBWSBuilder.java:263)

Can you help me? Am I using correct version (my is
eclipselink-2.1.2.v20100928-r8243)?


todhunter wrote:
Hello
I want to use EclipseLink DBWS and have a question. When I create WS from
procedure or table the result is in format retrived from db metadata, this
is OK.
When I use sql insteed it returns in simple-xml-format. I want to return
in some schema. I can set returnType parameter in builder file but when I
deploy this app I recieve error:

Exception Description: Result type [{urn:testSQL}twpkType] for operation
[twpk] has no O-X mapping

OK I understand that, I need to create eclipselink-dbws-or.xml and
eclipselink-dbws-ox.xml files.
How can I do that when I know select sql and I know column types?
I can create simple xsd file but how to create from  that xo an or files?
Maybe is another, simpler, method to generate WS from sql with returns in
some schema?
Is there any method to convert simple-xml-format to ox, or files with no
type declared? (for example all columns ar strings)


    

Back to the top