setting up an outbound webservice in siebel version

9
Technote 475: Setting up an Outbound Webservice in Siebel version 7.5.2 dified: ust 2003 icrosoft, Oracle rver OS(s): ows 2000 Latest release tested against: V7 (Enterprise) Webservice, WSDL, SOAP Last Mo 25 Aug Area(s): Siebel EAI Release(s): V7 (Enterprise) Database(s): DB2, M App Se AIX, Solaris, Wind Keywords: Background This technical note provides information about how to setup an Outbound Web service definition in the Siebel application to invoke a web service deployed on a ft .NET application server. The Web service can be deployed on any other application server such as IBM Websphere, BEA Weblogic or Tomcat but Microso the same steps can be used to set it up in Siebel application. Summary A Web service is a component on the internet and uses intern HTTP, XML, SOAP and WSDL. It is platform independent. So a designed on .NET platform can be consumed from IBM Webs Weblogic and vice versa. A Web service exposes its funct et technologies like Web service phere or BEA ionality through Web multiple Web eb services exchange data through Simple Object Application Protocol (SOAP) messages. A SOAP message can be carried over different SOAP y. nd outbound Siebel version 7.5.2.x supports WSDL 1.1 and SOAP 1.1. For more information about SOAP and WSDL, please refer http://www.w3.org/TR/2000/NOTE-SOAP- Service Description Language (WSDL). One WSDL can describe services. W protocol like HTTP, SMTP etc. SOAP messages are enclosed in a envelope, which contains two parts, SOAP Header and SOAP Bod Siebel version 7.5.2.x and later versions support both inbound a Web services. 20000508 and http://www.w3.org/TR/2001/NOTE-wsdl-20010315 . For more information about Siebel Web services, see the Siebel Bookshelf, Integration Platform Technologies: Siebel eBusiness Application Integration Volume II, Web Services.

Upload: raffaella-dangelo

Post on 20-Oct-2015

282 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Setting Up an Outbound Webservice in Siebel Version

Technote 475: Setting up an Outbound Webservice in Siebel version 7.5.2

dified: ust 2003

icrosoft, Oracle rver OS(s): ows 2000

Latest release tested against: V7 (Enterprise) Webservice, WSDL, SOAP

Last Mo 25 AugArea(s): Siebel EAI Release(s): V7 (Enterprise) Database(s): DB2, MApp Se AIX, Solaris, Wind

Keywords:

Background

This technical note provides information about how to setup an Outbound Web service definition in the Siebel application to invoke a web service deployed on a

ft .NET application server. The Web service can be deployed on any other application server such as IBM Websphere, BEA Weblogic or Tomcat but Microso

the same steps can be used to set it up in Siebel application. Summary A Web service is a component on the internet and uses internHTTP, XML, SOAP and WSDL. It is platform independent. So a designed on .NET platform can be consumed from IBM WebsWeblogic and vice versa. A Web service exposes its funct

et technologies like Web service

phere or BEA ionality through Web

multiple Web eb services exchange data through Simple Object Application

Protocol (SOAP) messages. A SOAP message can be carried over different SOAP y.

nd outbound

Siebel version 7.5.2.x supports WSDL 1.1 and SOAP 1.1. For more information about SOAP and WSDL, please refer http://www.w3.org/TR/2000/NOTE-SOAP-

Service Description Language (WSDL). One WSDL can describeservices. W

protocol like HTTP, SMTP etc. SOAP messages are enclosed in a envelope, which contains two parts, SOAP Header and SOAP Bod Siebel version 7.5.2.x and later versions support both inbound aWeb services.

20000508 and http://www.w3.org/TR/2001/NOTE-wsdl-20010315. For more information about Siebel Web services, see the Siebel Bookshelf, Integration Platform Technologies: Siebel eBusiness Application Integration Volume II, Web Services.

Page 2: Setting Up an Outbound Webservice in Siebel Version

Outbound Web service development life cycle

Overview

r or another utility e WSDL in Siebel tools

4. Setup the Outbound Web service in Siebel Outbound Web service

Web service project 1.2 - .NET Visual Studio will create a template for the Web service. By

function commented out, which has the [WebMethod] attribute associated with it. For example:

ebMethod] // public string HelloWorld() // {

1.3 - The [WebMethod] attribute exposes the method in the generated

one or more functions in the Web service and associate the ] attribute to it if they want it to be exposed to external application. :

)> Public Function Add(ByVal a As Integer, ByVal b As Integer)

Add = a + b

< yVal a As Integer) As Integer subtract = a - 10

This Web service exposes two methods (Add and Subtract) to the external application.

1.4 - Build the project in the .NET Visual Studio. Step 2 – Generate the WSDL from the external application server or another utility

the .NET application server 1. Set up a Web service on

2. Generate the WSDL from the external application serve 3. Import th

administration view Step1 – Set up a Web service in .NET 1.1 - Create an ASP.NET

default, there is one public

// [W

// return "Hello World"; // }

WSDL and it will be available to be called from the external application. Users can add[WebMethodFor example <WebMethod(As Integer

End Function

WebMethod()> Public Function Subtract(B

End Function

Page 3: Setting Up an Outbound Webservice in Siebel Version

2.1 - To generate the WSDL, use the following URL in the IThis example assumes that ASP.NET project was cr

E browser. eated on the localhost and

Service1.asmx.

or/service1.asmx?WSDL

name was Calculator. The Webservice class is http://localhost/calculat

ort the WSDL in Siebel tools to create the proxy objects

. bject Wizards.

ck OK. The WS

3. ation about the Web service in the Siebel eb service, the

to import the Web service includes: e WSDL

b service

e the run-time data extracted from the Calculator ll be stored. This information will be imported

n screen. n and click

ness service into

ates the proxy business service based jects depending

schema in the WSDL. If the schema contains simple data types, the WSDL import wizard does not create integration objects. But if the schema

L import wizard will create integration ill provide the input arguments and output

arguments to the Siebel proxy business service. In the Calculator Web service example, .NET generates the following schema definition. <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">

2.2 - Save the WSDL to a file.

Step 3 – Import the WSDL file in Siebel tools

You have to impin the Siebel repository.

3.1 - Start Siebel tools 3.2 - Choose File > New Object to display the New O

3.3 - Select the EAI tab, select the Web service icon, and cliDL Import Wizard appears.

4 - Provide the informRepository. For example, if importing the Calculator Winformation required a. The Siebel project where objects will be held after th

document is imported. b. The WSDL document that contains the Calculator We

definition from step 2.2. c. The file wher

WSDL document wiinto the Siebel Outbound Web services Administratio

3.5 - Click “Next” to view the summary of the import informatio“Finish” to complete the process of importing the busithe Siebel repository.

3.6 - Compile a new Siebel srf file. The WSDL import wizard will creon class CSSWSOutboundDispatcher and also the integration obon the

contains complex data types, the WSDobjects. The integration objects w

Page 4: Setting Up an Outbound Webservice in Siebel Version

<s:element name="Add"> Type>

pe="s:int" /> minOccurs="1" maxOccurs="1" name="b" type="s:int" />

uence>

ame="AddResponse">

ce> minOccurs="1" maxOccurs="1" name="AddResult"

ype>

pe> uence>

axOccurs="1" name="a" type="s:int" /> e>

ame="subtractResponse"> pe>

uence> maxOccurs="1" name="subtractResult"

/>

rd will four

and rvice1HttpGet

Please note that the .NET generated WSDL also contains HTTP GET and HTTP POST binding. Currently Siebel version 7.5.2.x does not support HTTP GET and HTTP POST bindings. The WSDL import wizard generates the warning but still it creates the proxy business services for these bindings. A change request 12-GTSUIK is already logged for the Siebel Web service Wizard not to create these proxy business services if Siebel application does not supports these bindings. It

<s:complex <s:sequence> <s:element minOccurs="1" maxOccurs="1" name="a" ty <s:element </s:seq </s:complexType> </s:element> <s:element n <s:complexType> <s:sequen <s:elementtype="s:int" /> </s:sequence> </s:complexT </s:element> <s:element name="subtract"> <s:complexTy <s:seq <s:element minOccurs="1" m </s:sequenc </s:complexType> </s:element> <s:element n <s:complexTy <s:seq <s:element minOccurs="1"type="s:int" </s:sequence> </s:complexType> </s:element> <s:element name="int" type="s:int" />

</s:schema>

Since the schema contains ComplexType, Siebel WSDL Import wizacreates the integration objects in Siebel Repository. For this WSDL, integration objects will be created (Add, AddResponse, Subtract SubtractResponse) and three business services (Service1Soap, Seand Service1HttpPost).

Page 5: Setting Up an Outbound Webservice in Siebel Version

is safe to delete the proxy business service from the Siebel Repository for HTTP GET and HTTP POST bindings.

you have to import mation generated in the .xml file though the WSDL Import

Wizard or you can also manually set it up in the Outbound Web service Ad

tration view

Administration ew.

port to display the EAI Web Service Import dialog box and ard in step

4.4 - Click Import. Services

eb service definition in Outbound Web service administration view or Inbound Web service administration view, you have to re-start the Siebel

eb service

Step 4 – Setup the Outbound Webservice definition To setup the Outbound Webservice definition, either the runtime infor

ministration View.

4.1 - In the Siebel client, navigate to the Web Services Adminisvia Site Map.

4.2 - Select Outbound Web services from the Web Servicesvi 4.3 - Click Imspecify the export file (.xml) created from the WSDL Import Wiz3.4.

4.5 - Check that the Service Ports section in the Outbound Webview is populated from the export file.

4.6 - Make sure Web service status is Active. If you change the W

dedicated client or Siebel server as Siebel application caches the Wdefinition for performance reasons. Invoking the Webservice In order to invoke the Web service, it is mandatory to call the pservice created in step 3.5 either through a custom script or fromprocess. In this example,

roxy business the workflow

in order to call the Service1Soap proxy business service ments required by

n argument of t hierarchy

business service requires only the primitive type of input argument, users do not have to build the integration object hierarchy. The following code in the custom business service can be used to build the hierarchy for the “Add” integration object and return it as an output argument from the business service. The name of the output argument for this business service is AddSoapIn:parameters and type is Hierarchy.

from a workflow process, it is necessary to know the input arguthis business service. The Calculator business service requires atype integration object and, users must build the integration objecbefore the proxy service can be invoked. If the

Page 6: Setting Up an Outbound Webservice in Siebel Version

if (MethodName=="GetParam")

var p1 = TheApplication().NewPropertySet();

ject"); p1.SetProperty("IntObjectName","Add");

el Hierarchical");

tion().NewPropertySet(); var pchild1 = TheApplication().NewPropertySet();

Add");

pchild1.SetType("Add"); ("a",10);

pchild1.SetProperty("b",20);

else return (ContinueOperation); This custom business service can now be used in the workflow process to pass the integration object hierarchy to the proxy business service.

{ p1.SetType("AddSoapIn:parameters"); p1.SetProperty("MessageId",""); p1.SetProperty("MessageType","Integration Ob p1.SetProperty("IntObjectFormat","Sieb var pchild = TheApplica pchild.SetType("ListOf

pchild1.SetProperty pchild.AddChild(pchild1); p1.AddChild(pchild); Outputs.AddChild(p1);

return(CancelOperation); }

Page 7: Setting Up an Outbound Webservice in Siebel Version

The workflow process has two main steps. The first step uses the custom business service to get the hierarchy and store it in a process property. The second step invokes the proxy business service and passes the process property as in input argument.

Page 8: Setting Up an Outbound Webservice in Siebel Version
Page 9: Setting Up an Outbound Webservice in Siebel Version

When users run this workflow process through the simulator, users the p2 process property populated with the response fr

should see om the .NET application

server. To debug the Web service, use Microsoft SOAP Trace toolkit to trace the SOAP request from Siebel and SOAP response from .NET server. This trace utility can be used for any application server and not limited to .NET server.