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 !!

12 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. Harsh PunnooseMay 8, 2011 10:38 PM

    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