Upgrade Guide
In WebLogic Workshop 7.0 SP2, you could create Java Web Services (JWS) that used Application View controls for accessing enterprise systems through a J2EE Connector Architecture adapter. In WebLogic Integration 8.1, these controls have been completely restructured, and the API has changed. Therefore, you will need to manually upgrade your Application View controls, as described in the following steps:
http://download.oracle.com/docs/cd/E13226_01/workshop/docs81/doc/en/workshop/guide/migration/conMigratingWorkshopApplications.html
For example, in a file called DMBS1Service.jws
:
public class DBMS1Service
{
/**
* @jws:control
*/
private DBMS1Controlm_dbms
;
/** @jws:context */
JwsContext context;
...
For example, in the DBMS1Control.ctrl
file:
import weblogic.jws.control.ApplicationViewControl;
/**
* @jws:av-identity name="DBMS.DBMS1" user-id="system" password="password"
*/
Note: To learn about creating an Application View control, see Creating a New Application View Control in the WebLogic Workshop Help at the following URL:
http://download.oracle.com/docs/cd/E13226_01/workshop/docs81/doc/en/integration/controls/controlsAppViewCreate.html
Note: A control created in WebLogic Workshop 7.0 SP2 has a.ctrl
extension, while a control created in WebLogic Workshop 8.1 has a .jcx
extension.
DBMS1Control
, a service called GetAllCustomers
, and a response schema describing the following document:<Rows>
<Row>
<FIRSTNAME>Joe</FIRSTNAME>
<LASTNAME>User</LASTNAME>
</Row>
</Rows>
The inner class within the DBMS1Control.ctrl
file is as follows:
public static class GetAllCustomersResponse
implements java.io.Serializable
{
public static class Rows implements java.io.Serializable
{
public Row[] Row;
}
public static class Row implements java.io.Serializable
{
public java.lang.String FIRSTNAME;
public java.lang.String LASTNAME;
}
}
Additionally, code would exist in the JWS to get the first and last names from the response rows as follows:
DBMS1Control.GetAllCustomersResponse.Rows rows =
m_dbms.GetAllCustomers();
DBMS1Control.GetAllCustomersResponse.Rows.Row[] custs =
rows.Row;
for (int i=0; i < custs.length; i++)
{
DBMS1Control.GetAllCustomersResponse.Row cust = custs[i];
String firstName = cust.FIRSTNAME;
String lastName = cust.LASTNAME;
System.out.println("First name=" + firstName + "last name=" +
lastName);
}
DBMS1.jcx
as follows:public interface DBMS1 extends ApplicationViewControl
{
public wlai.dbms1GetAllCustomersResponse.RowsDocument
GetAllCustomers()
throws Exception;
}
and the code in the JWS (or a business process JWF file) that looks like this:
wlai.dbms1GetAllCustomersResponse.RowsDocument response =
m_dbms.GetAllCustomers();
wlai.dbms1GetAllCustomersResponse.Rows.Row[] custs =
response.getRows().getRowArray();
for (int i=0; i < custs.length; i++)
{
wlai.dbms1GetAllCustomersResponse.Rows.Row cust = custs[i];
String firstName = cust.getFIRSTNAME();
String lastName = cust.getLASTNAME();
System.out.println("First name=" + firstName + " last name=" +
lastName);
}
As you may have noted, the code is similar in both the WebLogic Integration 7.0 and WebLogic Integration 8.1 JWS files. However, the class/interface names have changed. In general, the name for the XBean type for the request is structured as follows:
wlai.<mangled namespace URI name>.<decapitalized AppView
name><Service name>.<Root element name>Document
Mangling replaces slashes with dots, and changes the first character of each qualifier to lower case.
The mangled namespace URI name
equals the qualified name of the namespace that contains the schema in the application integration (AI) repository. For instance, Folder1.Folder2.Schema1
uses Folder1/Folder2
as the URI. The mangled name is folder1.folder2
. The mangled lower-cased AppView name equals the lower case first letter of the AppView name.