|
View:
New views
1 Messages
—
Rating Filter:
Alert me
|
|
|
Problems using the JDBC Binding Component in Netbeans build 200804020004 and 200804170002Hi!
I have generated a WSDL from a database table, and I want to select rows from the database table with some filtering, that is I want to run select query_id from data_queries where event_code = ? and ship_code = ? I did this using the recipe at https://open-esb.dev.java.net/kb/beta2/60/ep-jdbc-bc.html A schema called DATA_QUERY.xsd is generated during the creation of the WSDL. This schema looks like this: <?xml version="1.0" encoding="UTF-8"?> <xsd:schema elementFormDefault="qualified" targetNamespace="http://j2ee.netbeans.org/xsd/tableSchema" xmlns="http://j2ee.netbeans.org/xsd/tableSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:element name="DATA_QUERY" type="DATA_QUERY"></xsd:element> <xsd:complexType name="DATA_QUERY"> <xsd:sequence> <xsd:element maxOccurs="unbounded" ref="record"></xsd:element> </xsd:sequence> </xsd:complexType> <xsd:element name="record"> <xsd:complexType> <xsd:sequence> <xsd:element name="QUERY_ID" type="xsd:string"></xsd:element> <xsd:element name="EVENT_CODE" type="xsd:string"></xsd:element> <xsd:element name="DATA_QUERY_ID" type="xsd:short"></xsd:element> <xsd:element name="DESTINATION_ID" type="xsd:string"></xsd:element> <xsd:element name="SHIP_CODE" type="xsd:string"></xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema> when generated in the Netbeans-build 200804020004 and like this <?xml version="1.0" encoding="UTF-8"?> <xsd:schema elementFormDefault="qualified" targetNamespace="http://j2ee.netbeans.org/xsd/tableSchema" xmlns="http://j2ee.netbeans.org/xsd/tableSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:element name="DATA_QUERY" type="DATA_QUERY"></xsd:element> <xsd:complexType name="DATA_QUERY"> <xsd:sequence maxOccurs="unbounded"> <xsd:element name="QUERY_ID" type="xsd:string"></xsd:element> <xsd:element name="EVENT_CODE" type="xsd:string"></xsd:element> <xsd:element name="DATA_QUERY_ID" type="xsd:int"></xsd:element> <xsd:element name="DESTINATION_ID" type="xsd:string"></xsd:element> <xsd:element name="SHIP_CODE" type="xsd:string"></xsd:element> </xsd:sequence> </xsd:complexType> </xsd:schema> when generated in the Netbeans-build Build 200804170002. My problem: It looks like I need to use the same schema for input-data (binding parameters to preparedstatement) and for output-data. But the first schema only works for output data and the second schema only works for input data... When I use the first schema, there is no filtering, so I get a full dump of the table. When I use the second schema, the output generated by the JDBC BC doesn't conform to the schema, it looks like this: <?xml version="1.0" encoding="UTF-8"?><DATA_QUERY xmlns="http://j2ee.netbeans.org/xsd/tableSchema"> <record><QUERY_ID>M01</QUERY_ID><EVENT_CODE>P1</EVENT_CODE><DESTINATION_ID>ss1</DESTINATION_ID><SHIP_CODE>00013</SHIP_CODE></record> <record><QUERY_ID>M03</QUERY_ID><EVENT_CODE>P1</EVENT_CODE><DESTINATION_ID>ss1</DESTINATION_ID><SHIP_CODE>00013</SHIP_CODE></record> <record><QUERY_ID>M04</QUERY_ID><EVENT_CODE>P1</EVENT_CODE><DESTINATION_ID>ss1</DESTINATION_ID><SHIP_CODE>00013</SHIP_CODE></record> </DATA_QUERY> What should I do? Best regards, Aase Mestad |
| Free Forum Powered by Nabble | Forum Help |