1 Reply Latest reply on Mar 28, 2014 5:56 PM by Keith Babo

    Calling an external SOAP service requiring more than one parameter

    Keith Bjorndahl Newbie

      I'm trying to learn a bit about calling external SOAP services, so I thought I'd play with the common weather SOAP service defined here:

      http://www.webservicex.net/globalweather.asmx?wsdl

       

      I dragged a reference from the Palette and selected Interface Type WSDL and selected the WSDL for the weather service. So far so good, it added the composite reference into my composite.

       

      I selected Generate Java Interface from the composite reference, and it generated a bunch of nice classes and interfaces for me.  This one looked interesting:

      1.jpg

      so I added a reference to my bean implementation using this interface, and it quite happily wired up to my composite reference.

      ...and then threw me an exception telling me "Service operations on a Java Interface must have exactly one parameter."

       

      I saw one other response on this forum referencing the rest-binding example, but when I look at the interface used in that example (Warehouse), all of the methods there already only take one parameter.

       

      Given that the WSDL seems to generate interfaces that like more than one parameter, what would be the appropriate action to take in order to alllow me to call this external service from my bean?

        • 1. Re: Calling an external SOAP service requiring more than one parameter
          Keith Babo Master

          Strange that WSDL->Java is producing that interface given that the source WSDL is actually using document literal with one part for the message.  In other words, the source WSDL has only one "parameter" so to speak.  My recommendation would be to use the generated Java interface as a starting point and patch up any multi-parameter operations.

           

          Out of curiosity, did you try the "Create wrapper for message parts" option?  Doesn't seem like it should make a difference in this case, since there's only a single part.

           

          hth,

          keith