Tuesday, June 1, 2010

How to test a WSDL if it is working or not?

No matter if you are working in Siebel or not, if you are going to implement any Outbound Web Service, the first thing you wanna check if the WSDL file received from the 3rd party is working or not before you actually consume it and start the development.

Same is the case with Siebel Tools, you require to consume it in Siebel tools which will result in creation of Web Service (which is nothing but the business service of Class: CSSWSOutboundDispatcher) and its corresponding Integration Objects.

So, the best way is to have a 3rd party tools to quickly verify the response from the other system. I have came across lot many tools which solve this purpose but my favourite is SOAPUI and I really find it very handy for this purpose.

This post is related to the very first step that you do while creating the outbound web service. I have picked one WSDL freely available on "http://www.webservicex.net/WS/default.aspx"

Now, lets see how to do it step by step:

1. Save the WSDL from the following link:
http://www.webservicex.net/CurrencyConvertor.asmx?WSDL



2. Get the SOAPUI tools, available at the below link:
http://www.soapui.org/

3. Open SOAPUI and go to File Menu -> Preferences and make sure following check boxes should be unchecked.



4. Now open the WSDL, that you have saved in Step 1. File Menu -> New SOAPUI Project OR Press Crtl N





5. You will see "Currency Converter" Web Service and its associated method in the left (Navigator) panel. Double click on "Request 1". It will bring up the SOAP Request / Response page in the right panel. The request XML will look like this:



6. Input the necessary values in FromCurrecny and ToCurrency tags of the request XML and hit the Go Button. For Eg:



7. Here is the response XML I received:



8. This confirms that WSDL is correct and working fine.

We will see in the next post, how to implement an Outboound WebService in Siebel.

Stay Tuned !!

17 comments:

  1. I dont understand how can you tell that if a .wsdl is being Ok and working with SoapUI, will work as well when imported in Siebel?

    ReplyDelete
  2. Hi Anonymous,

    You are right, I am also NOT saying that WSDL working in SOAPUI will DEFINITELY work in Siebel. It can be a possibility that you might see some error while consuming the WSDL in Siebel, though it is working absolutely fine in SOAPUI.

    But what I want to say here is, using SOAPUI is a quick and easy way to check the correctness of the wsdl. Because if any wsdl you have which doesn't work in SOAPUI then it will never work in Siebel Tools (for sure).

    --GG

    ReplyDelete
  3. Hi,

    I am getting the following error. could you help someone for this.
    Error getting response;java.net.NoRouteToHostException:No route to host:connect

    ReplyDelete
  4. It might happen the host server is not up at that time. You need to give a try after some time.

    Also you can try pinging the server and see if you are getting the response:
    ping http://www.webservicex.net

    --Gaurav

    ReplyDelete
  5. Hi Gaurav,

    Do you know how to test webservices using soap ui on local copy. I have local copy of siebel dev. Can i test webservices pointed to my local copy.

    ReplyDelete
  6. You can test webservices locally using Business Service Simulator.

    ReplyDelete
  7. How do I test the WSDL from SOAP UI if it is password protected?

    ReplyDelete
  8. Thank you for posting this wonderful article..It worked perfectly like the way you described..Its awesome ...
    AN

    ReplyDelete
  9. Use http://www.soapclient.com/soaptest.html for test your wsdl file
    By
    Harsh Punnoose
    harshpunnoose@gmail.com

    ReplyDelete
  10. use http://www.webservicex.net/WS/WSDlAnalyser.aspx or http://www.soapclient.com/soaptest.html for test your wsdl file

    ReplyDelete
  11. Thanks for the post. It was very interesting and meaningful.

    ReplyDelete
  12. Hi! We are new to Siebel, and we're having problems trying to consume a web service from Siebel CRM.

    We imported the WSDL (read from the endpoint URL) and when we test the service, the SOAP message generated by Siebel contains namespaces that are not understood by our web service provider (Spring JAX-WS based). If we remove the namespace, it goes OK.

    Where should we start looking? Are there incompatibility issues between Siebel and JAX-WS or Spring or something like that?

    Thank you very much in advance!

    ReplyDelete
  13. Thank you my Friend for this easy post, which helped me to understand exactly for what SOAPUI is used for :)

    ReplyDelete
  14. Hi...
    My wsdl file working fine in windows machine,But the same wsdl not working linux machine.When i try to test in SOAPUI i,m getting response from windows machine.But it shows the following error from linux machine.

    Error: Could not find element 'dispatchorder'. Do you mean to refer to the element named dispatchorder@http://insertservice.vector.com/ (in DispatchInsertService_3Fwsdl)?

    ReplyDelete
  15. Hi,
    When I tried to import WSDL into Siebel Tools, I am getting the follwoing error

    Error writing XML to file 'C:\Folder_Name\NAMEexp.xml'.(SBL-EAI-04262)
    File could not be created as the directory specified for the file creation is not valid.(SBL-EAI-50228)

    Would appreaciate your input.

    Thanks,
    Anupama

    ReplyDelete
    Replies
    1. Hi Anonymous,
      It might be a folder permission issue. Try to copy the wsdl to some folder you created and then import it from there. And as mentioned in the above post, make sure your wsdl is working fine in soapui.

      Cheers
      Gaurav

      Delete
  16. HI Gurus,

    I need to add one field and then publish the WSDL for an existing inbound web service. I added the field in the IC and then compiled the changes in my local tools and then launched the client and then navigated to the Inbound webservice view... clicked on Generate WSDL button.

    Pls let me know if these are the only steps for publishing the WSDL or i am missing anything more.

    Thanks.

    ReplyDelete