Siebel CRM On Demand Web Services – Contact Search using SoapUI

Before we begin using Siebel CRM On Demand’s web services, we require the WSDL files. The WSDL files are specific to the account and can be downloaded by logging in to Siebel COD.

Create a new SoapUI project and add the WSDL as initial WSDL. SoapUI will create a new project with placeholder requests for all operations. Let’s open ContactQueryPage operation from SoapUI.

The endpoint path will be something like – https://secure-ausoxxxxx.crmondemand.com/Services/Integration
This path is  unique to your instance of Siebel COD.

Next lets remove the body of input and replace it with -

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
     <con:ContactQueryPage_Input xmlns:con="urn:crmondemand/ws/ecbs/contact/" xmlns:quer="urn:/crmondemand/xml/Contact/Query">
        <quer:ListOfContact startrownum="0" pagesize="100" recordcountneeded="true">
            <quer:Contact searchspec="[ContactFirstName] LIKE 'John'">
                <quer:Id/>
                <quer:ContactFirstName/>
                <quer:ContactLastName/>
                <quer:AccountId/>
            </quer:Contact>
        </quer:ListOfContact>
    </con:ContactQueryPage_Input>
</soapenv:Body>
</soapenv:Envelope>

This results in Soap Fault response with Siebel error code SBL-ODU-01006 and message : “Internal Error: Session is not available. Aborting.”
This is because we still haven’t added username/password for authentication. There is another option to first get the session and then pass that value in header of the request. However I prefer to use the Stateless version above, as it separates the responsibility of handling session.

Let’s make 2 changes to fix this error.
1) Replace first line of the SOAP request with -

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/07/secext">

2) Add these lines just below the SOAP Envelope element -

<soapenv:Header>
   <wsse:Security>
      <wsse:UsernameToken>
         <wsse:Username>your_siebel_username</wsse:Username>
         <wsse:Password Type="wsse:PasswordText">your_siebel_password</wsse:Password>
      </wsse:UsernameToken>
   </wsse:Security>
</soapenv:Header>

What we’ve done here is added WS-SECURITY headers to the SOAP request.
Now the request should run just fine.

Note -
1) You need to add any fields you need to the request before they can be returned by Siebel CRM. e.g., <ContactFirstName/>
2) Its better to confirm data actually exists by logging through web-console.

About these ads

10 thoughts on “Siebel CRM On Demand Web Services – Contact Search using SoapUI

  1. am using PHP. Is the below one correct way of passing args? how to specify searcspec? Is there any documentation for PHP
    $args = array(‘ListOfContact’=>array(
    ‘Contact’ => array(
    ‘ContactFirstName’ => ‘test’,
    ‘ContactLastName’ => ”,
    ‘AccountId’ => ”
    )
    ));

  2. Am using the below inputs, but am getting the error Error: HTTP Error: Unsupported HTTP response status 400 Bad Request (soapclient->response has contents of the response) for customobject4 … I got output for contact and customobject3 WSDL.

    $param = ”

    “;
    $namespace= “urn:crmondemand/ws/customobject4/10/2004″;
    $soapaction = “document/urn:crmondemand/ws/customobject4/10/2004:CustomObject4QueryPage”;
    $method = “CustomObject4WS_CustomObject4QueryPage_Input”;

  3. Hello,

    i got a error Message, does anybody know the reason for the problem?

    SOAP-ENV:Client
    Argument ‘urn:crmondemand/ws/contact/10/2004:ContactQueryPage_Input’ für Vorgang ‘ContactQueryPage’ ist unbekannt.(SBL-EAI-04304)

    OnDemandServicesObjMgr_enu_97261.log

    (SBL-EAI-04304)

    Argument ‘urn:crmondemand/ws/contact/10/2004:ContactQueryPage_Input’ für Vorgang ‘ContactQueryPage’ ist unbekannt.(SBL-EAI-04304)

    Regards
    Johannes

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s