• About

On Technology

~ SOA and Integration blog

On Technology

Tag Archives: web service

Siebel CRM On Demand Web Services – Contact Search using SoapUI

11 Monday Apr 2011

Posted by Padmarag Lokhande in Camel, Integration, Java, Siebel, SOA

≈ 10 Comments

Tags

integration, siebel, soa, soapui, web service

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.

Advertisement

Share this:

  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)
  • Click to share on Tumblr (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Reddit (Opens in new window)
  • Click to share on Pinterest (Opens in new window)
  • Click to email a link to a friend (Opens in new window)
  • Click to print (Opens in new window)

Like this:

Like Loading...

Reading WSDL

11 Friday Mar 2011

Posted by Padmarag Lokhande in Java, SOA

≈ Leave a comment

Tags

soa, web service, wsdl

While SOA offers all the goodies of loose-coupling, it does require understanding of some basic concepts and formats.
SOAP and WSDL are the prime candidates (or culprits, depending on your view)

SOAP is just a protocol for passing information, important is WSDL.

A WSDL(Web Service Description Language) file defines the contract for web service. It is just like the menu in a restaurant or a table of contents of a book. It tells about what is offered.

Without wasting more time, lets just get to work – understanding WSDL.

A WSDL file may be provided to you or it can generally be accessed by appending “?wsdl” at the end of a web service address.

A WSDL file is best-read bottom-up. It consists of abstract as well as concrete parts. Important parts to focus are (concrete)-

  • wsdl:service – this is the tag which tells you about the name of the service. Consider it synonymous with class file.
  • wsdl:port or port – this tag tells about the place where you can connect to. There can be multiple ports. Each port will have an “address” element. The location attribute specifies the endpoint address of the service. Pay attention the binding attribute of the port.
  • wsdl:binding – this tag refers to the actual implementation of the service. It’ll be further up in the wsdl document. It contains the methods of the service.
  • wsdl:operation – this tag refers to the operations provided by the port. wsdl:operation will contain soap:operation or similar tag depending on the binding.
  • wsdl:input and wsdl:output – specifies the form of input/output. This is because it can be either literal or encoded.

Now focus on the Type attribute of the wsdl:binding, and trace it up in the document. It leads you to portType element. portType is the abstract part of the wsdl.

  • portType – is something like an Interface, in fact it is called as interface in wsdl 2.0. It’ll have a no. of operations.
  • operation – specifies input and output message variable types. These types are specified further up in the wsdl.

Share this:

  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)
  • Click to share on Tumblr (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Reddit (Opens in new window)
  • Click to share on Pinterest (Opens in new window)
  • Click to email a link to a friend (Opens in new window)
  • Click to print (Opens in new window)

Like this:

Like Loading...

Subscribe

  • Entries (RSS)
  • Comments (RSS)

Archives

  • April 2020
  • February 2019
  • April 2018
  • July 2015
  • July 2013
  • October 2012
  • June 2012
  • May 2012
  • September 2011
  • April 2011
  • March 2011
  • December 2010
  • August 2010

Categories

  • Camel
  • Database
  • Devops
    • Amazon AWS
    • Docker
    • Kubernetes
  • Integration
  • Java
  • JMS
  • MuleSoft
  • Oracle
  • Siebel
  • SOA
    • BPEL
    • REST
  • Uncategorized
  • Zapier

Meta

  • Register
  • Log in

Blog at WordPress.com.

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
  • Follow Following
    • On Technology
    • Already have a WordPress.com account? Log in now.
    • On Technology
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar
%d bloggers like this: