Corporate Inbound Web Service

Post on 30-Oct-2014

200 views 11 download

Tags:

Transcript of Corporate Inbound Web Service

Corporate Inbound Web Service

WF = HW Query SR Inbound Parent

WF = HW Query SR Inbound Child

Register Inbound Web Service (Binding = RPC)

Inbound Web Service

Namespace NameStatus

http://siebel.com/Service/FS/CopyActivity HWQuerySR Active

Service PortsName HW Service Request QueryType Workflow ProcessBusiness Service/Business Process Name HW Query SR Inbound ParentTransport HTTPAddress http://dcorpcrm.company.com/eai_anon_enu/start.swe?SWEExtSource=SecureWebService&SWEExtCmd=ExecuteBinding SOAP_RPC_LITERAL

OperationsOperation Name Method Display Name Authentication TypeHWQuerySROperation RunProcess Username/Password - clear text

Import WSDL in Siebel Tools. This creates IO and Business Service. Compile Objects.

When UsernameToken needs to be part of Siebel soap request i.e. when Siebel is expected to pass username and password as part of header to target system, modify proxy business service as follows.Add properties called Username and Password to method of Proxy Business Service.BS Name = HW Service Request QueryMethod Name = HWQuerySROperationArguments=

Name Data Type Integration Object Type Storage TypeCustomHeaderContext Hierarchy Input / Output HierarchyHWQuerySROperation_Input:Error Code String Input PropertyHWQuerySROperation_Input:Error Message String Input PropertyHWQuerySROperation_Input:Object Id String Input PropertyHWQuerySROperation_Input:Process Instance Id String Input PropertyHWQuerySROperation_Input:Siebel Operation Object Id String Input PropertyHWQuerySROperation_Output:Error Code String Output PropertyHWQuerySROperation_Output:Error Message String Output PropertyHWQuerySROperation_Output:Object Id String Output PropertyHWQuerySROperation_Output:Process Instance Id String Output PropertyHWQuerySROperation_Output:Siebel Operation Object Id String Output PropertyHWQuerySROperation_Output:ppServiceRequestIO Integration Object ListOfWc_Service_Request_IoTopElmt Output HierarchyXMLHierarchyOutput Hierarchy Output Hierarchyfaultactor String Output Propertyfaultcode String Output Propertyfaultstring String Output Property

Siebel-Soap-Request<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<SOAP-ENV:Header><wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/07/secext">

<wsse:UsernameToken><wsse:Username>E465163</wsse:Username><wsse:Password>WELC0M3</wsse:Password>

</wsse:UsernameToken></wsse:Security>

</SOAP-ENV:Header><SOAP-ENV:Body><rpc:HWQuerySROperation xmlns:rpc="http://siebel.com/Service/FS/CopyActivity"><Object_spcId>2-VUNSE</Object_spcId></rpc:HWQuerySROperation></SOAP-ENV:Body></SOAP-ENV:Envelope>

Siebel-Soap-Reply<!-- This is an example of RPC-Literal Binding--><!-- Body has one element, whose name is <OperationName> + 'Reponse'--><?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<SOAP-ENV:Body><rpc:HWQuerySROperationResponse xmlns:rpc="http://siebel.com/Service/FS/CopyActivity">

<Error_spcCode></Error_spcCode><Error_spcMessage></Error_spcMessage><Object_spcId>2-VUNSE</Object_spcId><Process_spcInstance_spcId>2-YC20N</Process_spcInstance_spcId><Siebel_spcOperation_spcObject_spcId></Siebel_spcOperation_spcObject_spcId><ppServiceRequestIO>

<ListOfWc_Service_Request_Io xmlns="http://www.siebel.com/xml/Service%20Request"><ServiceRequest>

<Id>2-VUNSE</Id><Abstract>test me 1:00 pm</Abstract><Area>Inbound Email</Area><Description>test me 1:00 pm</Description><Owner>E465163</Owner><Priority>2-High</Priority><SRNumber>2-53498606</SRNumber><Severity>3-Medium</Severity><Status>Open</Status><Sub-Area>Inbound Email</Sub-Area><Sub-Status>Not Started</Sub-Status>

</ServiceRequest></ListOfWc_Service_Request_Io>

</ppServiceRequestIO></rpc:HWQuerySROperationResponse>

</SOAP-ENV:Body></SOAP-ENV:Envelope>

150274, 11/25/10,
<<Operation Name>> + ‘Response’
150274, 11/25/10,
<< Root IC >>
150274, 11/25/10,
‘ListOf’ + << Root IC >>
150274, 11/25/10,
Output Argument Name of BS Method
150274, 11/25/10,
Output Argument Name of BS Method

Enterprise Level Changes - NA

Enterprise Level Changes

eApps.cfg[/eai_enu]ConnectString = siebel.TCPIP.None.None://az18u779.company.com:2331/SBLAPPD/EAIObjMgr_enuEnableExtServiceOnly = TRUEWebPublicRootDir = /webapp/siebel_crm_dev/8.0.0.0/public/enuSiebEntSecToken = PtbkUMFMXK0VMAktJ3P9DgEAAE/X

[/eai_anon_enu]ConnectString = siebel.TCPIP.None.None://az18u779.company.com:2331/SBLAPPD/EAIObjMgr_enuEnableExtServiceOnly = TRUEUseAnonPool = TRUEAnonUserPool = 10WebPublicRootDir = /webapp/siebel_crm_dev/8.0.0.0/public/enuSiebEntSecToken = o72iRvfkUqBf8+wdcAq0BQEAAFHM

Database Authentication

LDAP Authentication

Parameter Alias Data Type ValueApplication User ApplicationUser String cn=SiebelQA,ou=ApplicationUsers,o=companyApplication Password ApplicationPassword String ********Base Dn BaseDn String o=companyCRC CRC String ********Credentials Attribute Type CredentialsAttributeType String physicalDeliveryOfficeNameSecurity Adapter Dll Name SecAdptDllName String sscfldapUser Password Hash Algorithm HashAlgorithm String RSASHA1Hash DB Cred HashDBPwd Boolean FALSEHash User Password HashUserPwd Boolean FALSEPort Port Integer 389Propagate Change PropagateChange Boolean FALSEPassword Expire Warn Days (ADSI only) PasswordExpireWarnDays Integer Password Attribute Type PasswordAttributeType String userPasswordRoles Attribute Type RolesAttributeType String Server Name ServerName String qaldap.company.comShared Credentials DN SharedCredentialsDN String cn=SiebelQA,ou=ApplicationUsers,o=company

Shared DB Password SharedDBPassword String ********Shared DB Username SharedDBUsername String Siebel Username Attribute Type SiebelUsernameAttributeType String SSL Database SslDatabase String Single Sign On SingleSignOn Boolean FALSETrust Token TrustToken String ********Username Attribute Type UsernameAttributeType String uidUse SSL (ADSI only, Obsolete) UseSsl Boolean FALSEUse Adapter Defined Username UseAdapterUsername Boolean FALSE

Various Data Sources

Authentication at Object Manager Level

Authentication at EAI Object Manager Level

Understanding WSDL (HWQuerySR)

<service name="HWQuerySR"><port binding="tns:HW_spcService_spcRequest_spcQuery"

name="HW_spcService_spcRequest_spcQuery"><soap:address location="http://dcorpcrm.company.com/eai_anon_enu/start.swe?SWEExtSource=SecureWebService&amp;SWEExtCmd=Execute"></soap:address>

</port></service>

<binding name="HW_spcService_spcRequest_spcQuery" type="tns:HW_spcService_spcRequest_spcQuery"><soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"></soap:binding><operation name="HWQuerySROperation">

<soap:operation soapAction="rpc/http://siebel.com/Service/FS/CopyActivity:HWQuerySROperation"></soap:operation><input>

<soap:body namespace="http://siebel.com/Service/FS/CopyActivity" use="literal"></soap:body></input><output>

<soap:body namespace="http://siebel.com/Service/FS/CopyActivity" use="literal"></soap:body></output>

</operation></binding>

150274, 11/23/10,
Operation Name
150274, 11/23/10,
RPC Literal
150274, 11/23/10,
Transport HTTP
150274, 11/23/10,
Port Type
150274, 11/23/10,
Binding Name referred in Service Tag
150274, 11/23/10,
Service Port Address
150274, 11/23/10,
Service Port Name
150274, 11/23/10,
Web Service Name

<portType name="HW_spcService_spcRequest_spcQuery"><operation name="HWQuerySROperation">

<input message="tns:HWQuerySROperation_Input"></input><output message="tns:HWQuerySROperation_Output"></output>

</operation></portType>

<message name="HWQuerySROperation_Input"><part name="Process_spcInstance_spcId" type="xsd:string"></part><part name="Object_spcId" type="xsd:string"></part><part name="Siebel_spcOperation_spcObject_spcId" type="xsd:string"></part><part name="Error_spcCode" type="xsd:string"></part><part name="Error_spcMessage" type="xsd:string"></part>

</message>

<message name="HWQuerySROperation_Output"><part name="Error_spcCode" type="xsd:string"></part><part name="Error_spcMessage" type="xsd:string"></part><part name="Object_spcId" type="xsd:string"></part><part name="Process_spcInstance_spcId" type="xsd:string"></part><part name="Siebel_spcOperation_spcObject_spcId" type="xsd:string"></part><part name="ppServiceRequestIO" type="xsdLocal0:ListOfWc_Service_Request_IoTopElmt"></part>

</message>

<xsd:element name="ListOfWc_Service_Request_Io" type="xsdLocal0:ListOfWc_Service_Request_Io"></xsd:element>

<xsd:complexType name="ListOfWc_Service_Request_IoTopElmt"><xsd:sequence>

<xsd:element name="ListOfWc_Service_Request_Io" maxOccurs="1" minOccurs="1" type="xsdLocal0:ListOfWc_Service_Request_Io">

</xsd:element></xsd:sequence>

</xsd:complexType>

<xsd:complexType name="ListOfWc_Service_Request_Io"><xsd:sequence>

<xsd:element name="ServiceRequest" maxOccurs="unbounded" minOccurs="0" type="xsdLocal0:ServiceRequest">

150274, 11/23/10,
Referred in portType
150274, 11/23/10,
Referred in portType
150274, 11/23/10,
Operation Name

</xsd:element></xsd:sequence>

</xsd:complexType>

<xsd:complexType name="ServiceRequest"><xsd:sequence>

<xsd:element name="Id" maxOccurs="1" minOccurs="0" type="xsdLocal0:string30"></xsd:element><xsd:element name="Created" maxOccurs="1" minOccurs="0" type="xsdLocal0:string30"></xsd:element><xsd:element name="Updated" maxOccurs="1" minOccurs="0" type="xsdLocal0:string30"></xsd:element>....

Web Service: Binding DOC_LITERALStyle = DocumentUse = Literal

Generate WSDL on server Import this WSDL on local New BS and IOs would get created in local

BS Name = HWServiceRequestQueryDLPortMethod Name = HWQuerySROperationDLArguments =

Name Data Type Integration Object TypeStorage Type

CustomHeaderContext Hierarchy Input / Output Hierarchy

HWQuerySROperationDL_Input:HWQuerySROperationDL_Input Integration Object HWQuerySROperationDL_Input Input Hierarchy

HWQuerySROperationDL_Output:HWQuerySROperationDL_Output Integration Object HWQuerySROperationDL_Output Output Hierarchy

XMLHierarchyOutput Hierarchy Output Hierarchy

faultactor String Output Property

faultcode String Output Property

faultstring String Output Property

Service<service name="HWQuerySRDL"><port binding="tns:HWServiceRequestQueryDLPort" name="HWServiceRequestQueryDLPort"><soap:address location="http://dcorpcrm.company.com/eai_anon_enu/start.swe?SWEExtSource=SecureWebService&amp;SWEExtCmd=Execute"></soap:address></port></service>

Binding<binding name="HWServiceRequestQueryDLPort" type="tns:HWServiceRequestQueryDLPort">

<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"></soap:binding><operation name="HWQuerySROperationDL"><soap:operation soapAction="document/http://siebel.com/Service/FS/HWQuerySRDL:HWQuerySROperationDL"></soap:operation>

<input><soap:body use="literal"></soap:body>

</input><output>

<soap:body use="literal"></soap:body></output>

</operation></binding>

Port & Messages<portType name="HWServiceRequestQueryDLPort">

<operation name="HWQuerySROperationDL"><input message="tns:HWQuerySROperationDL_Input"></input><output message="tns:HWQuerySROperationDL_Output"></output>

</operation></portType>

<message name="HWQuerySROperationDL_Input"> <part name="HWQuerySROperationDL_Input" element="tns:HWQuerySROperationDL_Input"></part></message>

<message name="HWQuerySROperationDL_Output"> <part name="HWQuerySROperationDL_Output" element="tns:HWQuerySROperationDL_Output"></part></message>

Schema<xsd:schema

elementFormDefault="qualified" attributeFormDefault="unqualified" targetNamespace="http://siebel.com/Service/FS/HWQuerySRDL" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<xsd:import namespace="http://www.siebel.com/xml/Service%20Request"></xsd:import>

<xsd:element name="HWQuerySROperationDL_Input"><xsd:complexType>

<xsd:sequence><xsd:element name="Process_spcInstance_spcId" type="xsd:string"></xsd:element><xsd:element name="Object_spcId" type="xsd:string"></xsd:element><xsd:element name="Siebel_spcOperation_spcObject_spcId" type="xsd:string"></xsd:element><xsd:element name="Error_spcCode" type="xsd:string"></xsd:element><xsd:element name="Error_spcMessage" type="xsd:string"></xsd:element>

</xsd:sequence></xsd:complexType>

</xsd:element>.

Schema…Continued...

<xsd:element name="HWQuerySROperationDL_Output"><xsd:complexType>

<xsd:sequence><xsd:element name="Error_spcCode" type="xsd:string"></xsd:element><xsd:element name="Error_spcMessage" type="xsd:string"></xsd:element><xsd:element name="Object_spcId" type="xsd:string"></xsd:element><xsd:element name="Process_spcInstance_spcId" type="xsd:string"></xsd:element><xsd:element name="Siebel_spcOperation_spcObject_spcId" type="xsd:string"></xsd:element><xsd:element ref="xsdLocal1:ListOfWc_Service_Request_Io"></xsd:element>

</xsd:sequence></xsd:complexType>

</xsd:element></xsd:schema>

SOAP - Request<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<SOAP-ENV:Header><wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/07/secext">

<wsse:UsernameToken><wsse:Username>E465163</wsse:Username><wsse:Password>WELC0M3</wsse:Password>

</wsse:UsernameToken></wsse:Security>

</SOAP-ENV:Header><SOAP-ENV:Body>

<HWQuerySROperationDL_Input xmlns="http://siebel.com/Service/FS/HWQuerySRDL"><Object_spcId xmlns="http://siebel.com/Service/FS/HWQuerySRDL">2-VUNSE</Object_spcId>

</HWQuerySROperationDL_Input></SOAP-ENV:Body>

</SOAP-ENV:Envelope>

SOAP – Reply<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<SOAP-ENV:Body><ns:HWQuerySROperationDL_Output xmlns:ns="http://siebel.com/Service/FS/HWQuerySRDL">

<ns:Error_spcCode></ns:Error_spcCode><ns:Error_spcMessage></ns:Error_spcMessage><ns:Object_spcId>2-VUNSE</ns:Object_spcId><ns:Process_spcInstance_spcId>2-YC98X</ns:Process_spcInstance_spcId><ns:Siebel_spcOperation_spcObject_spcId></ns:Siebel_spcOperation_spcObject_spcId><ListOfWc_Service_Request_Io xmlns="http://www.siebel.com/xml/Service%20Request">

<ServiceRequest><Id>2-VUNSE</Id><ModId>5</ModId><Abstract>test me 1:00 pm</Abstract><Account>USA</Account><AccountId>1-2M8Y</AccountId><Area>Inbound Email</Area><Severity>3-Medium</Severity><Status>Open</Status><Sub-Area>Inbound Email</Sub-Area><Sub-Status>Not Started</Sub-Status><Type></Type><Version></Version>

</ServiceRequest></ListOfWc_Service_Request_Io>

</ns:HWQuerySROperationDL_Output></SOAP-ENV:Body></SOAP-ENV:Envelope>

Calling Web Service using BS SimulatorBS Name = HWServiceRequestQueryDLPortMethod = HWQuerySROperationDL

Input Arguments:Property1 Username = E465163Property2 Password = ********Child1 HWQuerySROperationDL_Input:HWQuerySROperationDL_Input

+ ListOfHWQuerySROperationDL_Input+ HWQuerySROperationDL_Input

- Property Object_spcId = 2-VUNSE

Output Arguments:

Child1 HWQuerySROperationDL_Output:HWQuerySROperationDL_Output+ ListOfHWQuerySROperationDL_Output

- MessageId- MessageType = Integration Object- IntObjectName = HWQuerySROperationDL_Output- IntObjectFormat = Siebel Hierarchical+ HWQuerySROperationDL_Output

+ ListOfListOfWc_Service_Request_Io- Error_spcMessage- Error_spcCode- Object_spcId = 2-VUNSE- Process_spcInstance_spcId = 2-YC98X- Siebel_spcOperation_spcObject_spcId+ ListOfWc_Service_Request_Io

+ ListOfServiceRequest+ ServiceRequest

- SRNumber = 2-53498606- Id = 2-VUNSE- Abstract = test me 1:00 pm- Area = Inbound Email- Sub-Area = Inbound Email

150274, 11/25/10,
<< Grand Child IC >>
150274, 11/25/10,
<< Child IC >>
150274, 11/25/10,
<<Root IC Name>>
150274, 11/25/10,
ListOf<<Root IC Name>>
150274, 11/25/10,
Output Argument Name of proxy BS method
150274, 11/25/10,
<<Element Name>>
150274, 11/25/10,
<<Root IC Name>>
150274, 11/25/10,
ListOf<<Root IC Name>>
150274, 11/25/10,
Input Argument name of proxy BS Method

RPC Literal DOC LiteralSupports transport type HTTP, MQ, MSMQ and JMS Only supports HTTPThere can be multiple child under BODY tag of the SOAP request

There can be only one child under BODY tag

HPS: Outbound Web Service AuthenticationBS Name = EAI HTTP Transport

function Service_PreInvokeMethod (MethodName, Inputs, Outputs){

if( MethodName == "SendReceive"){

var Auth = TheApplication().InvokeMethod("LookupValue","HW_SAP_AUTHENTICATION","Username:Password");Inputs.SetProperty("HDR.Authorization", "Basic " + Auth);

}

return (ContinueOperation);}

How to create a totally anonymous web service in Siebel? [ID 601681.1]

How to create a totally anonymous web service in Siebel so that no credential is needed to call the web service?

Solution

Please note it is only possible to create anonymous web services on Siebel 7.8 and above.

1. Make sure the eapps.cfg entry for the OM you will use has the following entries:

UseAnonPool = TRUEAnnonUserPool = <size of the pool>

If you want, you can use the [/eai_anon_enu] as it should already contain all the parameters required. Just check it to make sure.

You may also create another entry on the eapps.cfg with the information required. Just make sure you create the corresponding entry on the web server too.

1.1 Make sure you have the below parameters set either on the eai_anon_enu section or on the [defaults] section of the eapps.cfg. If you set it on the eai_anon_enu section it will override the defaults section values.

AnonUserName = SADMINAnonPassword = bHQAOzFCFHoBm4r3VQ==

The user set as AnnonUserName will be the one used for the web service so if you want only the eai_anon_enu anonymous user to be different then you need to set it up on the eai_anon_enu section.

2. You need to have a named subsystem with the following parameters:

AllowAnonymous = TRUEImpersonate = FALSE

You can copy the WebService or SecureWebService named subsystems and give it a name like AnonWebService and set the above parameters.

3. Locate the Siebel server\bin\enu\<language>\eai.cfg file, open the eai.cfg file and review the [HTTP Services] section. Add the 'AnonWebService' service to the eai.cfg file as follows:

[HTTP Services]....WebService = WebServiceSecureWebService = SecureWebService....AnonWebService = AnonWebService

4. On your web service you need to change the address from for example:

http://MyWebServer/eai_enu/start.swe?SWEExtSource=WebService&SWEExtCmd=Execute&Username=SADMIN&Password=SADMINto

http://MyWebServer/eai_anon_enu/start.swe?SWEExtSource=AnonWebService&SweExtCmd=Execute

Note the change on the address to point to the eai_anon_enu (or the one you created) and change the SWEExtSource to point to AnonWebService (assuming this was the name you gave to the named subsystem).

Along with that, make sure the operations have the Authentication Type set to None.

After the changes are made, restart the Siebel Server, Gateway and web server so that all the changes take effect.

Please note that using the Anonymous Session Pool for web services has a side effect that any web service that needs to use it MUST use the same named subsystem, that is, there should be no other call to any web service using the Anonymous Session Pool with a named subsystem different from the original one.

If more than one named subsystem is used, the Siebel response after the second named subsystem is used will be just an 'OK' encoded in UTF-16 for any other anonymous web service call.

This behavior is reported on the Change Request 12-1V7F8WH which is planned to be fixed on a future version.