Sun ONE logo     Previous      Contents      Index      Next     
Sun ONE Connector Builder 2.0 Developer's Guide



Working with Sun ONE Integration Server

This module describes the following topics:

The Sun ONE Connector Builder generated adapters can be used in conjunction with the Integration Server in a business process. You should be familiar with both the Sun ONE Connector Builder and the Integration Server before reading this module.

Overview

The Integration Server interacts with the Connector Builder generated resource adapters through the SOAP services layer.'The Integration server includes built-in SOAP support. You can use this feature to instruct the Integration Server to send a SOAP encoded XML message to the deployed adapter through the Apache SOAP servlet. The adapter executes the request against the EIS and sends the response using the SOAP XML back to the Integration Server. Integration Server uses its built-in SOAP services framework to serialize and de-serialize the SOAP messages.

Deploy the Adapter's SOAP Services

Since the interaction between Integration Server and the generated resource adapter happens through the SOAP layer, the resource adapter should have the SOAP services configured. For details on how to configure SOAP services for the resource adapter, refer to "Adding SOAP Services to the Resource Adapter". Connector Builder generated resource adapters require Apache SOAP for their SOAP support. Refer to "Installing Apache SOAP 2.2" for details on how to install the Apache SOAP services. Deploy the adapter's SOAP services on the server.

Define the SOAP Services in Integration Server

In order for the Integration Server to use the SOAP services of the resource adapter that are deployed on a server, the SOAP services need to be defined in the Integration Server either at the Application Dictionary level or at the proxy level. Defining the SOAP service at the Application Dictionary level is functionally equivalent to defining at the proxy level, however, the proxy configuration can optionally override what is already defined at the Application Dictionary level. This module explains defining the SOAP services at the proxy level for ease of understanding. For details about SOAP services definition in the Integration Server, refer to the "Backbone System Guide" of the Integration Server available at

http://docs.sun.com/?p=/coll/S1_IntegrationServer_30.

Sample Backbone/Proxy Definition

The following example provides a sample of the backbone/proxy definition. This definition uses a SOAP service with the URN urn:issample:ISSampleAPITest. This is used to call the 'executeAPI' method of the JIO named 'ISSampleAPITest' in the adapter named 'issample'.

The method signature is as follows:

java.lang.String executeAPI(boolean booleandatavalue, int integerdatavalue, java.lang.String textdatavalue, double doubledatavalue, float decimaldatavalue):



   Sample Backbone/Proxy Defiintion

Sample Backbone/Proxy Defiintion
CommentOn
# Setup the CB example backbone in your IS system.
UsePortable 1

#Confirm that this is the correct version of IS for SOAP DEMO.
SearchFile %{FORTE_ROOT}/install/scripts/FUSION.VER "FN3.0.1"
If %{STATUS} != 0
   Execcmd "echo Error: IS version is incompatible with CB 2.0"
   Execcmd "echo Error: Current version of CB 2.0 requires IS version FN3.0.1"
   setenv FAILED Yes
EndIf
#
if FAILED is set
Execcmd "echo CBDemoProxy Failed. Please resolve errors before continuing "
quit
endif
#
# Note: This delete is just so the script is repeatable with minimum errors.
# Its failure is not a problem.

DeleteBackbone CBDemoBB
CreateBackbone CBDemoBB
FindBackbone CBDemoBB

SetCEngine issampleEng
FindManager
SetNode myhost.acme.com
FindParent
AddProxy CBDemoPxy
FindProxy CBDemoPxy
SetCProfile CBDemoProfile
SetNode myhost.acme.com
SetCSession User=ProxyUser Password=ProxyUser
AddCRole CBDemoServer
SetAPlRetry   Count=2 Wait=1000 WaitChange=100 OnFail=Abort

ClearServiceDefinitions

# Now Add the service definition
# the target method signature is - java.lang.String executeAPI(boolean booleandatavalue, int integerdatavalue, java.lang.String textdatavalue, double doubledatavalue, float decimaldatavalue)
# ApplicationCode is the name defined in the Application dictionary's Application Information.
# methodname is the target method name
# inPar and outPar define the input and return/output parameters in a comma separated list of the format - service parameter name = Process Attribute Name/the data type schema
# NameSpace is the service's urn

AddServiceDefinition ServiceType=soaprpc usetype=true method=executeAPI ApplicationCode=Test inPar=(booleandatavalue=Attr_BooleanData/xsd:boolean,integerdata value=Attr_IntegerData/xsd:int,textdatavalue=Attr_TextData/xsd:s tring,doubledatavalue=Attr_DoubleData/xsd:double,decimaldatavalu e=Attr_DecimalData/xsd:float) outPar=(return=CB_Response/xsd:string) NameSpace=urn:issample:ISSampleAPITest

SetServiceDefinition    UseLocal=TRUE
SetRule BOTH useService=TRUE

# Specify the URL of the Apache SOAP servlet where the SOAP services are deployed
AddAplURL http://localhost:8080/soap/servlet/rpcrouter

SetPort 12664
SetAutoStart ON
SetAutoRestart ON
ShowConfiguration
Validate
FindParent
Validate
# This completes definition. List for diff purposes
ListProxies

Datatype Mappings

The following table lists the data type mappings between Integration Server and CB generated adapters. The left column lists the Integration Server data type for the Integration Server. The right column lists the corresponding mapping in the generated resource adapter.

   Data Type Mappings.

Integration Server Datatype

Java /Generated Adapter Type

BooleanData

 

boolean

 

DateTimeData

 

java.util.Date *

 

DecimalData

 

float

 

DoubleData

 

double

 

IntegerData

 

int

 

IntervalData

 

NO MAPPING

 

TextData

 

java.lang.String

 

XmlData

 

NO MAPPING **

 

where:

* — DateTimeData of IS uses the format 25-JAN-2002 17:57:23 where as the Date of CB/Apache SOAP uses the format 2002-01-25T17:57:23Z. Also IS uses xsd:date for the Date schema whereas Apache SOAP uses xsd:timeInstant. So currently DateTimeData of IS cannot be mapped automatically to the resource adapter/Apache SOAP date and time.

** — "Even though the Integration Server's XmlData data type can be used to store complex types, there is no inherent mechanism in the current Integration Server's SOAP support that maps complex data types to and from the XmlData attributes.

For complete details on the SOAP support in Sun ONE Integration Server, refer to the Integration Server documentation at

http://docs.sun.com/.


Previous      Contents      Index      Next     
Copyright 2002 Sun Microsystems, Inc. All rights reserved.