8 Replies Latest reply on Nov 23, 2006 8:51 AM by cf_rog

    SOAP and WSDL help.

      I'll try to make this as simple as possible in hope I get a response. I have a particular web service I need to consume. Using its WSDL file I have locally, how can I make a direct SOAP call to it using the actual XML SOAP envelope? It balks when trying to use cfinvoke with CFinvokearguments, giving me a "method doesn't exit" error. I figure I can invoke the service somehow using CFHTTP and using the entire soap envelope to call the web service. Am I barking up the wrong tree here?

      Looking at the actual soap body inside the envelope, Since its XML there are a number of child tags inside i.e.


      Thats it, no magic, no soap headers, nothing. Its all contained within the body. Side note: How does CFinvoke arguments keep track of what child elements they are under in the call? Any help would be appreciated..

      Thanks! Jeff
        • 1. Re: SOAP and WSDL help.
          MikerRoo Level 1
          Your question lacks the needed details.

          Anyway, the attached example uses cfinvoke to make a soap call to the headerservice.cfc from the docs.

          cfinvokeargument uses the argument name to know which arguments go where. The name must match the WSDL.

          • 2. Re: SOAP and WSDL help.
            Big_Jeff Level 1
            I wish I could give more details. Heck, I would post the entire WSDL and soap call, but I am under NDA with the company that I am implementing it from. I am also in between a rock and hard place, because they DO NOT have any coldfusion implementation of their product and know nothing about the language. So, I am SOL when I am having problems with consuming their web service.

            With that being said, I have used CFINVOKE and CFinvoke arguement. Odd thing is that when I do and pass the correct arguments, it tells me that the method doesn't exist. Now, I have even heard that you must include all optional arguments with some web services. I tried that too, still it tells me the method I chose doesn't exist. Very frustrating.

            Thats why I thought there might be a way to use the entire soap envelope against the WSDL to produce a result other than "method doesn't exist".

            • 3. Re: SOAP and WSDL help.
              MikerRoo Level 1
              Well that makes it pretty hard to help you here.

              One thought... I have never seen it but are some of the functions over loaded? (Same function name more than once but with different arguments?)
              • 4. Re: SOAP and WSDL help.
                MikerRoo Level 1
                Sent you a private message on this (PM's don't trigger emails, posts here do).
                • 5. Re: SOAP and WSDL help.
                  Big_Jeff Level 1
                  Sent you one back!

                  • 6. Re: SOAP and WSDL help.
                    MikerRoo Level 1
                    Well that's good news.

                    Unfortunately, there doesn't seem to be much we can post here to help anyone else with SOAP issues.
                    • 7. Re: SOAP and WSDL help.
                      Big_Jeff Level 1
                      Well I can think of couple things to help people here.

                      1. Check that your WSDL (If housed on your server) can communicate properly with the web service.

                      2. If cfinvoke doesn't work, you can always send the entire SOAP envelope to the WSDL using CFHTTP.

                      3. Some WSDL's are funny. Some are straight forward. Check to make sure you don't need any weird SOAP headers. Some WSDL's require you to pass ALL arguments, even optional ones, for that you need to use CFMX7+ and use the omit="yes" parameter of cfinvokeargument.

                      IN short its a big giant puzzle that you have to fit the pieces together, and sometimes it takes a lot of experimentation to get right.

                      • 8. Re: SOAP and WSDL help.
                        cf_rog Level 1
                        Hi & thanks for this post, I'm trying to send a SOAP envelope using CFHTTP as suggested.

                        Am I heading in the right direction? I've doubled up any quote marks in the XML.

                        If I output the result directly it displays a description of what the method does, not the response from the web service.
                        Using CFDUMP displays the WSDL file.

                        Any advice much appreciated, thanks.