Wednesday 16 March 2011

Siebel WebService Call - From - PHP

This blog will explain how to call Siebel Web Service from PHP.

This will also shows, how to handle the Siebel complex XML structure in PHP.

Here I am using following WSDL file, I am also giving the Request and Response for the same.

WSDL --> SSO_Service.WSDL (This file is physically located in the PHP code folder)

Note : Please test your Webservice from SOAP Client before you start coding in PHP, so that it will be easy to code.

SOAP Request :

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:zeb="http://siebel.com/SOService">
<soapenv:Header/>
<soapenv:Body>
<ns:SSO_spcService_Get_spcUser_spcInfo_Input>
<!--Optional:-->
<ns:User_spcId>SADMIN</ns:User_spcId>
</ns:SSO_spcService_Get_spcUser_spcInfo_Input>
</soapenv:Body>
</soapenv:Envelope>
SOAP Response :


<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:SSO_spcService_Get_spcUser_spcInfo_Output xmlns:ns="http://siebel.com/SSOService">
<ns:NumOutputObjects>1</ns:NumOutputObjects>
<ListOfSsoContact xmlns="http://www.siebel.com/xml/SSOContact">
<Contact>
<EmailAddress>sadmin@company.com</EmailAddress>
<FirstName>Siebel</FirstName>
<LastName>Administrator</LastName>
<LoginName>SADMIN</LoginName>
<Status/>
<Id>0-1</Id>
<ListOfAccount/>
<ListOfResponsibility>
<Responsibility>
<Name>Siebel Administrator</Name>
</Responsibility>
<Responsibility>
<Name>Marketing Analytics Super User</Name>
</Responsibility>
</ListOfResponsibility>
</Contact>
</ListOfSsoContact>
</ns:_spcSSO_spcService_Get_spcUser_spcInfo_Output>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


PHP Code to Handle above SOAP Method :

$soapClient = new SoapClient("SSO_Service.WSDL"); 
$inputParam = array('User_spcId' => 'SADMIN'); 
try  
{   
$info = $soapClient->__call("Get_spcUser_spcInfo", array($inputParam));  
}
catch (SoapFault $fault) { 
echo ' ************ Error ***********' . $fault->faultcode; 
echo ' *************** Error ************' . $fault->faultstring . '
'; 
}

 //NumOutputObjects is Immediate Output 
 echo "
<p> # of Records : " . $info->NumOutputObjects . "</p>";  

$ListOfSsoContact = $info->ListOfSsoContact;
 //Pick the first Contact 
$Contact = $ListOfSsoContact->Contact;
echo '<p> Email Address : ' .$Contact->EmailAddress . ' </p>'; 
echo '<p> First Name : ' .$Contact->FirstName . ' </p>'; 
echo ' <p> Last Name : ' .$Contact->LastName . ' </p>';
?>

Please post your questions if you need more information.... 

Wednesday 12 January 2011

Siebel Tools / Web Client in Windows 7

  1. Started installing Siebel Tools / Web Client in Windows 7
  2. Installed Oracle Client OK. tnsping to server worked OK.
  3. When I install Siebel Tools first time, i got the error "Class not Registered" error.
  4. Installed "http://support.installshield.com/kb/files/Q108312/ikernelupdate.exe" as per metalink suggestion.
  5. Now, started Siebel Tools Installation, it crossed "Class Not Registered" Error.
  6. Tools 8.0.0.0 installed without error.
  7. WebClient 8.0.0.0 installed with one Error, It could not open IE
  8. Tools 8.0.0.10 installed with out error.
  9. Web Client 8.0.0.10 installed with the one Error. It could not open IE.
  10. Started the Siebel tools -- with Local Database. First Time Login, running the DB Extract.
  11. DB Extract completed and Downloaded the Local DB with out errors.
  12. Check the Screen shot of the Tools in Windows 7
  13. Checked out some objects from Server, that went well.
  14. Started Full Compile from Tools, got errors, then Started Full compile from batch file. with the following Command

    C:\Siebel\Tools\bin\siebdev.exe /BC "Siebel Repository" "C:\Siebel\Web Client\OBJECTS\ENU\siebel_sia.srf" /TL ENU /d Local /u UNAME /p PASSWORD
  15. Launch the Web Client, Remember you need to Right click onthe icon, and select "Run As Administrator".

    If you want it to be automatic, Right Click on the Web Client icon, Properties, and slect the check box as in the following Screen shot.
  16. The Siebel Active X gave me some problems, other wise, it went well.
  17. Here are some screen shots of the Siebel Web Client in windows 7
         Initial Active X Install

         Pick Applet

         MVG Applet



    All the best if any one trying after me, and share your thoughts.