Tuesday, June 8, 2010

How to create Outbound Web Service in Siebel?

Today, lets talk about how we can invoke an Outbound Web Service from Siebel. In the last post we learned how to test the WSDL using SOAPUI and I will use the same WSDL today (CurrencyConverter.wsdl) as the sample wsdl in this post.

1. Import the WSDL into Siebel Tools.
Create New Object. File Menu -> New Object -> EAI -> Web Service



Select the WSDL file path



Business Service will get created with name "CurrencyConverter" and its method "CoversionRate"



ConversionRate method has got its Input/Output Arguments. The point to be notice here is the Integration Objects i.e. "ConversionRate" and "ConversionRateResponse". These are the external integration objects which defines the Request and Response XML of the Web Service.



If you query for Integration Object (Input): "ConversionRate", it will look like this:
and these are the two Input arguments of the Request XML of the Web Service.



Similarly, the Output IO will have a single output argument:



2. Create the UI. (Applet based on Opportunity BC)



3. Create Workflow to get the response from Web Service.






4. Call the Workflow from button click. To do this just create a BC User Prop on Opportunity BC

Named Method 1 : "Invoke", "INVOKESVC", "Opportunity", "Workflow Process Manager", "RunProcess", "'ProcessName'", "CurrencyConverter"

Where "Invoke" is Method Invoked from button on the opportunity applet.

5. Compile the objects and test.



After button click:




I am assuming that you are connected to internet while doing this test and this is how you can play with the live web service.

20 comments:

  1. Hi Gaurav,

    very nicely done (and scriptless ;-). I like your use of the Workflow Utilities/Echo and dot notation.

    Keep up the good foot

    @lex

    ReplyDelete
  2. if you provided currencyconverter .wsdl file and .xml file as example it will be really help ful please post them or mail me please..............
    balajikonagalla@gmail.com
    thanking in advnce

    ReplyDelete
  3. where do i find currencyconverter.log file

    ReplyDelete
  4. Hi Maya,

    Please refer the below post and let me know if you still face any issue on this.

    http://siebelmantra.blogspot.com/2010/06/how-to-test-wsdl-if-it-is-working-or.html

    --GG

    ReplyDelete
  5. Hi Gaurav,
    This post is really helpful for an EAI beginner and works like a charm. Your usage of the Echo method got me curious and i ran into Neel's blog post on the same
    http://siebelunleashed.com/setting-a-property-echo-method/
    One interesting thing i observed was that he made use of the PRM ANI Utility service in his eg to create an empty property before making use of the Workflow utility BS. However in the above case you have used the echo method straightaway.
    Is there a difference between the 2 approaches. I might be wrong but the scenarios cited in the posts seem similar
    Regards,
    Himanshu

    ReplyDelete
  6. Thanks Gaurav.This is one of the best explanation on Web Services i could find. Really very helpful.
    Please keep up the good work.

    ReplyDelete
  7. Can you please explain how the workflow utility and dot notation is working here. Thanks

    ReplyDelete
  8. Hi Arvind,

    You can use the Workflow Utilities->Echo method with the help of dot notation to construct the hierarchy and this is the trick demostrated in the post. Please note that, dot notation doesn't work for multiple childs hierarchy.

    Cheers
    Gaurav

    ReplyDelete
  9. Hi Gaurav,

    i am new to siebel and have done all steps correct what you have explained but i am not getting the output by pressing the button in Opportunity Applet. is there any specific mistake i am making or something else. please advice.

    Thanks & regards
    Abhas

    ReplyDelete
  10. Hi Gaurav

    dotnotaion doesn't work for mutiple Chaild Hierarchy.but
    if we want to create mutiple Chaild Hierarchy.
    how its possible
    can you please explain it.

    ReplyDelete
  11. Anyone had experience getting a resopnse back from an Outbound web service that contains "multi-part" WSDL response? I've configured a WF to call a WS which would return 2 different types of XML (data result XML or a "Not found" error message XML).

    In the Output Argument when you call the Web Service (your "Call Web Service" step in WF above), you can only specify one output argument.

    ReplyDelete
  12. Hi Gaurav,

    I am Manuj Garg & working in siebel since last 4 yrs.I would like to say that you are doing a fabulous job & this is really a nice post for all the new learners but i would like to point that the post is not complete.

    An xml is generated on the path specified while importing the WSDL into the siebel tools as mentioned in the step 1 of the post above.

    1) Goto Administration - Web Services --> Outbound Web Services
    2) Click the 'Import' button present on the Header List Applet.
    3) Import the XML (created while importing the WSDL in the siebel tools) here.
    4) A new record for you Outbound Web Service is automatically created after the xml is imported.

    You can go ahead & test your outbound web service now as mentioned in the post above.

    ReplyDelete
  13. Thank You so much for the valuable feedback Manuj !!!

    Cheers
    Gaurav

    ReplyDelete
  14. Excellent pieces. Keep posting such kind of information on your blog. I really impressed by your blog.

    ReplyDelete
  15. Hi Gaurav,

    your blog is very useful learnt a lot in siebel from here,
    Can you give me some idea how to create a workflow to insert an account using siebel operation and get the row id of the inserted account as output argument. Here the input account record is given in the .xml file.
    so that I could deploy the workflow as a webservice and test it in soap ui.



    Thanks,
    Venkat

    ReplyDelete
  16. It is very useful.
    Simple and helpful.

    Thanks!!

    ReplyDelete
  17. Gaurav, I know from the day one, this blog is unique in the world of CRM.

    ReplyDelete
  18. Hi Gaurav,
    Please add a step for Process property and its type. I want to know how did you configured process properties in this example. thanks.

    ReplyDelete
  19. I folllowed this great guide, thanks. I have the WSDL, but it's impossible to create a new contact using SOAP. Seems like it just does not affect siebel in this particular case.

    ReplyDelete
  20. Please add definitions of Process properties and its type . I think, its important to know about the process properties specifically InputXML ones.

    Thank you in advance

    ReplyDelete