JDeveloper 11g gives you the ability to quickly and easily create an XML schema document (XSD) from an XML document. Below are the steps needed.
1) In JDeveloper, go to File -> New
2) In the New Gallery window be sure the All Technologies tab is select. Scroll down and select the XML category and then select XML Schema from XML Document.
3) A Create XML Schema from XML Document window will come up. In this window you will need to fill in information on the schema file you want to create and you will need to select the XML file you want to use to generate the XSD.
Here is some additional information from the help menu on options on the Create XML Schema from XML Document page.
XML Schema
Enter a name for the new file. By default, the filename that JDeveloper creates for new files appears. The extension .XSD is displayed.
Directory
Enter a directory for the file. By default, the directory that JDeveloper creates to store your files appears. To store the files outside of JDeveloper's directory structure, or to redefine what the file directory is called, enter your changes.
Target Namespace
Enter a URI reference of the namespace of this schema.
Prefix
Enter an identifier for a namespace. For example, you don't need to specify an entire namespage in an XML document when referring to its types. You can instread use the the prefix.
XML Document
Choose the XML file to use to generate the schema.
Generate Enumerations
Select to use all current values in the XML data set as enumerated values for each element/attribute in the generated XML schema.
Showing posts with label JDeveloper. Show all posts
Showing posts with label JDeveloper. Show all posts
Wednesday, January 30, 2013
Monday, January 7, 2013
Creating a Business Service to Access a Database Table in OSB
There are several steps that need to be completed before you can create a business service in OSB to access/modify data in a database table. At a high level you will need to create the JCA Adapter files in JDeveloper, create the data source/connection pools in Weblogic and then import the JCA Adapter files into OSB. Below are the detailed steps.
1. Create JCA Adapter in JDeveloper
a. See Creating a JCA Database Adapter in JDeveloper for more details.
2. Create a zip file with the JCA Adapter files that you need for the import. It needs to be in a zip file to import into OSB. Note: You can get the location of these files by clicking on them in JDeveloper.
a. Add the following to the zip file
i. <Project>.wsdl
ii. <Project>_db.jca
iii. <Project>_db-or-mappings.xml
iv. <Project>_table.xsd
3. Create a New Data Source in Weblogic
a. For more details on this step see Steps for Creating a New Data Source in Weblogic
4. Link DB Adapter outbound connection pool to a data source
a. For more details on this step see Linking DB Adapter Outbound Connection Pool to Data Source
5. Import JCA Adapter files
a. Log into the OSB Console
b. Navigate to the project you are working on
c. Create a directory to hold the JCA Adapter files (<Project>/Resources/jca)
d. In the Create Resource menu, select Bulk -> Zipped Resources
e. Select the zip file created in step 2.
f. Select Next
g. All of the files that you added to your zip file in step 2 should now be displayed on the Review Loaded Resources page.
h. Select Import.
i . Fix Conflicts.
Note: You will need to fix any path conflicts caused by moving all of the files into the same area. In JDev the schema files are in a different directory.
i. Click on View Conflicts.
iii. Activate Changes.
4. Create Business Service
a. Create WSDL that will be used by the Business Service. This WSDL will have the operations that you specified when you were creating the JCA Database Adapter in step 1.
i. Navigate to the *.jca file that was imported in Step 3 (<Project>/Resources/jca)
ii. In the Actions column next to the JCA Binding file imported click on the Generate WSDL and Service from this JCA binding resource button.
iii. Specify the new WSDL Name and New Service Name. Also, choose a location for the new WSDL file. To avoid confusion, we put it in the BuisnessServices folder.
iv. Select Generate.
Labels:
Business Service,
Database,
Enterprise Service Bus,
ESB,
java connector architecture,
jca,
JDeveloper,
Oracle,
Oracle Service Bus,
OSB,
Service,
Service Oriented Architecture,
SOA,
table
Friday, December 28, 2012
Configuring JDeveloper to Work With a Proxy Server
Getting JDeveloper to work with a proxy server can be a little tricky. Specifically, JDeveloper will use the proxy settings of the Default Web Browser instead of the window's proxy settings.
For this example I used FireFox as my default web browser. The way FireFox handles proxy exceptions is much cleaner than Chrome/IE. I found that in Chrome/IE the exceptions could not have a slash “/”. If you have one of these browsers as your default browser, you will need to adjust the steps for how that browser handles proxy exceptions.
1. Configure the proxy and exceptions in FireFox. The exceptions will vary based on what you are trying to do. Also, it seems that the wild card entries don’t always work. If you find this to be the case, you will need to add the full URL.
a. Go to Tools -> Options in FireFox.
b. On the Network tab click on Settings.
c. Select Manual Proxy Configuration and enter the correct proxy information.
d. Add the URLs that you want to exclude in the “No Proxy for:” section.
2. Open JDeveloper to verify the proxy settings are not set. We want to use the settings that we just configured in FireFox.
a. Go to Tools -> Preferences -> Web Browser and Proxy
b. Make sure that Use HTTP Proxy Server is not selected. We want to use the settings in FireFox.
Creating a JCA Database Adapter in JDeveloper
Below
is an outline of the steps needed to create a JCA Database Adapter in
JDeveloper. Specifically they focus on
how to create a JCA Database Adapter that can be imported into OSB. If you are creating a database adapter for an
existing SOA project then you can start on step 7.
1. Open JDeveloper
2. Create a new Generic
Application
3. Enter a name for the Application. You can reuse this same
application to create any JCA Adapters in the future so name it something
generic. For example “Connections”
4. Create a SOA Project
5. Create an Empty Composite
6. Drag the Database Adapter component
from the Component Palette into the External References swim lane.
7. A wizard will pop up which will
guide you through creating the JCA Database Adapter. There are 11 steps in this wizard.
a. Fill in the Service name and
then select Next (Step 2).
b. Select the appropriate
connection. It will automatically
fill in the JNDI Name. (Step 3)
c. Select all of the Operation Types
you want. For this example, we will be
able to Insert and Select from a table (Step 4).
d. Import all of the tables that you
want to operate on. You can import
parent/child tables. In this example, we
only have one table (Step 5).
e. Define the primary keys (Step 6)
f. If you have selected multiple
tables. Define the relationships between
the tables. (Step 7)
g. Exclude any attributes that you do
not want to have access to. (Step 8)
h. If you only want to look at a subset
of data from the table(s), then you can write a query to narrow down the data
you will see. (Step 9)
i. Define Advanced Options. For most cases you can keep all of the defaults.
(Step 10)
j. Click Finish. This will create all of the files that you
need to import this JCA Adapter into OSB.
Subscribe to:
Posts (Atom)






















