Skip to main content

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

The naming convention for the SQLOperation has changed: <text> is now <statement> and <secondary-sql> is now <build-statement>

I tested last night's 2.1.2 build:
installer archive- http://www.eclipse.org/downloads/download.php?file=/rt/eclipselink/nightly/2.1.2/20101019/eclipselink-2.1.2.v20101019-r8373.zip
bundles archive - http://www.eclipse.org/downloads/download.php?file=/rt/eclipselink/nightly/2.1.2/20101019/eclipselink-plugins-2.1.2.v20101019-r8373.zip

I extracted the installer archive to c:\toplink\2.1.2:

C:\TOPLINK\2.1.2
|   eclipselink-2.1.2.v20101019-r8373.zip
|   eclipselink-plugins-2.1.2.v20101019-r8373.zip
|  
+---eclipselink
|   |   about.html
...
|      
|   +---jlib
|   |   |   eclipselink.jar  
...
|   |          
|   +---utils
|   |   +---dbws
|   |   |       dbwsbuilder.cmd
|   |   |       dbwsbuilder.sh
|   |   |       eclipselink-dbwsutils.jar
|   |   |       javax.servlet_2.4.0.v200806031604.jar
|   |   |       javax.wsdl_1.6.2.v200806030405.jar
|   |   |       setenv.cmd
|   |   |       setenv.sh    


I edited the utils/dbws/setenv.cmd file to reference the MySql driver:
set DRIVER_CLASSPATH=C:\_eclipselink\extension.lib.external\mysql-connector-java-5.1.13-bin.jar

In a temp directory I created a DBWSBuilder xml file:

<?xml version="1.0" encoding="UTF-8"?>
<dbws-builder xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <properties>
        <property name="projectName">traceTest</property>
        <property name="logLevel">fine</property>
        <property name="username">user</property>
        <property name="password">password</property>
        <property name="url">jdbc:mysql://localhost:3306/emp</property>
        <property name="driver">com.mysql.jdbc.Driver</property>
        <property name="platformClassname">org.eclipse.persistence.platform.database.MySQLPlatform</property>
    </properties>   
    <sql
        name="get_trace"
        returnType="traceType"
        >
        <statement><![CDATA[SELECT * FROM raw_trace WHERE id = ?]]></statement>
        <build-statement><![CDATA[select * from raw_trace where 0=1]]></build-statement>
        <binding name="ID" type="xsd:int" />
    </sql>
</dbws-builder>


where the schema for raw_trace is:

CREATE TABLE raw_trace (
        id INT NOT NULL,
        artifact_name VARCHAR(500),
        PRIMARY KEY (id)
);
INSERT INTO raw_trace (id, artifact_name) VALUES (1, 'this is an artifact name');


Running the dbwsbuilder utility generated an eclipselink-dbws-schema.xsd file as follows:

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:traceTest" xmlns="urn:
traceTest" elementFormDefault="qualified">
   <xsd:complexType name="traceType">
      <xsd:sequence>
         <xsd:element name="id" type="xsd:int" minOccurs="0" nillable="true"/>
         <xsd:element name="artifact_name" type="xsd:string" minOccurs="0" nillable="true"/>
      </xsd:sequence>
   </xsd:complexType>
   <xsd:element name="traceType" type="traceType"/>
</xsd:schema>


Could you try the above version and see if it fixes your problem?


Oracle
Mike Norman | Principal Software Designer
Phone: +6132884638 | Fax: +6132382818
Server Technologies | EclipseLink Product
Oracle Canada | 45 O'Connor Street, Suite 400, Ottawa, Ontario | K1P 1A4

Hardware and
        Software, Engineered to Work Together
Oracle is
        committed to developing practices and products that help protect
        the environment

On 20/10/2010 11:09 AM, todhunter wrote:
I rerun testSQL wich modifications and effect is the same. The same error

Back to the top