tech note 475

Upload: raffaella-dangelo

Post on 03-Jun-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/13/2019 Tech Note 475

    1/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 Webservice definition in the Siebel application to invoke a web service deployed on aft .NET application server. The Web service can be deployed on any

    other application server such as IBM Websphere, BEA Weblogic or Tomcat butMicroso

    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 adesigned on .NET platform can be consumed from IBM Webs

    Weblogic and vice versa. A Web service exposes its funct

    et technologies likeWeb service

    phere or BEA

    ionality through Webmultiple Webeb services exchange data through Simple Object Application

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

    nd outbound

    Siebel version 7.5.2.x supports WSDL 1.1 and SOAP 1.1. For more informationabout 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 aenvelope, which contains two parts, SOAP Header and SOAP BodSiebel version 7.5.2.x and later versions support both inbound aWeb services.

    20000508and 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 IntegrationVolume II, Web Services.

    http://www.w3.org/TR/2000/NOTE-SOAP-20000508http://www.w3.org/TR/2000/NOTE-SOAP-20000508http://www.w3.org/TR/2000/NOTE-SOAP-20000508http://www.w3.org/TR/2000/NOTE-SOAP-20000508
  • 8/13/2019 Tech Note 475

    2/9

    Outbound Web service development life cycle

    Overview

    r or another utilitye WSDL in Siebel tools4. Setup the Outbound Web service in Siebel Outbound Web service

    Web service project1.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.:

    )> PublicFunctionAdd(ByValaAsInteger, ByValbAsInteger)

    Add = a + b

    < yValaAsInteger)AsIntegersubtract = a - 10

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

    1.4 - Build the project in the .NET Visual Studio.

    Step 2 Generate the WSDL from the external application server or anotherutility

    the .NET application server1. 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. Userscan add[WebMethodFor example

    PublicFunctionSubtract(B

    EndFunction

  • 8/13/2019 Tech Note 475

    3/9

    2.1 - To generate the WSDL, use the following URL in the I

    This example assumes that ASP.NET project was crE browser.

    eated on the localhost andService1.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. TheWS3. ation about the Web service in the Siebel

    eb service, theto import the Web service includes:

    e WSDL

    b service

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

    n screen.n and click

    ness service into

    ates the proxy business service basedjects depending

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

    L import wizard will create integrationill provide the input arguments and output

    arguments to the Siebel proxy business service.

    In the Calculator Web service example, .NET generates the following schemadefinition.

    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 inform

    Repository. For example, if importing the Calculator Winformation requireda. 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 informatioFinish 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

    http://localhost/calculator/service1.asmx?WSDLhttp://localhost/calculator/service1.asmx?WSDL
  • 8/13/2019 Tech Note 475

    4/9

    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 willfour

    andrvice1HttpGet

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

  • 8/13/2019 Tech Note 475

    5/9

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

    you have to importmation generated in the .xml file though the WSDL ImportWizard or you can also manually set it up in the Outbound Web service

    Ad

    tration view

    Administrationew.

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

    4.4 - Click Import.Services

    eb service definition in Outbound Web service administrationview 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, eitherthe 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 Wiz

    3.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 businessthe workflow

    in order to call the Service1Soap proxy business servicements required by

    n argument oft hierarchy

    business service requires onlythe primitive type of input argument, users do not have to build the integrationobject hierarchy.

    The following code in the custom business service can be used to build thehierarchy for the Add integration object and return it as an output argumentfrom the business service. The name of the output argument for this businessservice 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

  • 8/13/2019 Tech Note 475

    6/9

    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);

    elsereturn (ContinueOperation);

    This custom business service can now be used in the workflow process to passthe 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);}

  • 8/13/2019 Tech Note 475

    7/9

    The workflow process has two main steps. The first step uses the custombusiness service to get the hierarchy and store it in a process property. Thesecond step invokes the proxy business service and passes the process property

    as in input argument.

  • 8/13/2019 Tech Note 475

    8/9

  • 8/13/2019 Tech Note 475

    9/9

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

    should seeom the .NET application

    server.

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