Problems with Coldfusion Web Services

Discussion in 'Programming' started by SoulAssassin, Sep 25, 2007.

  1. #1
    Hi,

    I am trying to get a web service to run through Coldfusion for the first time and I'm having some problems (to say the least).

    The web service I am connecting to requires an XML string as an argument which must take the form of

    <?xml version="1.0"?>
    <Request RequestType="AvailableToSell">
      <Data Product="1169_7" MtrxCode1="F" MtrxCode2="135" MtrxCode3="" MtrxCode4=""/>
    </Request>
    Code (markup):
    I have tried building this as just a string and then passing that to the web service e.g.

    
    <cfsavecontent variable="blah">
    	<?xml version="1.0"?> 
    	<Request RequestType="AvailableToSell">
    		<Data Product="1169_7" MtrxCode1="F" MtrxCode2="135" MtrxCode3="" MtrxCode4=""/>
    	</Request>
    </cfsavecontent>
    
    <cfinvoke webservice="http://test.co.uk/wsdl?targetURI=urn:omlink" method="wsomhandler" argumentscollection="#blah#" returnvariable="sResult">
    Code (markup):
    But this returns an error

    Web service operation "wsomhandler" with parameters {ARGUMENTSCOLLECTION={ <?xml version="1.0"?> <Request RequestType="AvailableToSell">  <Data Product="1169_7" MtrxCode1="F" MtrxCode2="135" MtrxCode3="" MtrxCode4=""/>  </Request> },} could not be found.
    Code (markup):
    I've also tried several other ways using cfinvokeargument etc but still no luck. Can anybody out there help? I'm running out of ideas as to what I'm doing wrong. :confused:

    Thanks
     
    SoulAssassin, Sep 25, 2007 IP