Solved

SOAP Request - Works in soapUI, but not in Coldfusion

Posted on 2009-06-30
5
1,097 Views
Last Modified: 2013-12-20
Hi Folks,

As a newcoming to the world of webservices, I've been using soapUI to build requests, test them for output, then code the CFML from them.  So far, with the small number of web services I've worked with, it's been fine.

However, I've come across one that works fine in soapUI, but isn't working once I bring it into my Coldfusion page.

A <cfdump> shows the return is giving a '404 Not Found'.  There's obviously something wrong somewhere, but I'm not sure where!
<!--- soap request (xml) from soapUI --->
 
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:api="http://api.wsdomain.com/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
   <soapenv:Header>
      <api:getQuota></api:getQuota>
      <api:UserAuthentication>
         <api:iId>myuserID</api:iId>
         <api:sPassword>mypassword</api:sPassword>
         <api:sType>myusertype</api:sType>
      </api:UserAuthentication>
   </soapenv:Header>
   <soapenv:Body>
      <api:getTransactionList>
         <!--Optional:-->
         
         <api:dStartDate>2009-01-01T00:00:00</api:dStartDate>
         <api:dEndDate>2009-02-01T00:00:00</api:dEndDate>
         <api:sDateType>transaction</api:sDateType>
         <api:iLimit>100</api:iLimit>
      </api:getTransactionList>
   </soapenv:Body>
</soapenv:Envelope>
 
<!--- Coldfusion Page --->
 
<cfsavecontent variable="localscope.soapRequest">
<cfoutput>
        
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:api="http://api.wsdomain.com/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
   <soapenv:Header>
      <api:getQuota></api:getQuota>
      <api:UserAuthentication>
         <api:iId>myuserid</api:iId>
         <api:sPassword>mypassword</api:sPassword>
         <api:sType>myusertype</api:sType>
      </api:UserAuthentication>
   </soapenv:Header>
   <soapenv:Body>
      <api:getTransactionList>
         <!--Optional:-->
         
         <api:dStartDate>2009-01-01T00:00:00</api:dStartDate>
         <api:dEndDate>2009-02-01T00:00:00</api:dEndDate>
         <api:sDateType>transaction</api:sDateType>
         <api:iLimit>100</api:iLimit>
      </api:getTransactionList>
   </soapenv:Body>
</soapenv:Envelope>
 
</cfoutput>
</cfsavecontent>
<cfdump var="#xmlparse(localscope.soapRequest)#">
 
<cfhttp url="http://api.wsdomain.com/V3/AffiliateService" method="POST" resolveurl="NO">
<cfhttpparam type="header" name="content-type" value="text/xml">
<cfhttpparam type="header" name="charset" value="utf-8">
<cfhttpparam type="header" name="Content-Length" value="#len(trim(localscope.soapRequest))#">
<cfhttpparam type="xml" name="body" value="#trim(localscope.soapRequest)#">
</cfhttp>
 
<!--- Note that the cfhttp url is what soapUI is posting to (shown in the RAW display).  I have, however, tried both --->

Open in new window

0
Comment
Question by:Reveroom
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 13

Assisted Solution

by:srikanthmadishetti
srikanthmadishetti earned 250 total points
ID: 24744214
You are hitting http://api.wsdomain.com/V3/AffiliateService url isn't it?

Is this the correct url .
Try hit the url with cfhttp method head and print cfhttp.responseheader.status_code if it  has 404 then it is broken link
0
 

Author Comment

by:Reveroom
ID: 24744300
Thanks for the reply.

The status code does indeed return a 404 error - both with that url and with the alternative referenced in the request (same, minus the /v3/etc etc).

That's what puzzles me more than anything - it returns fine in soapUI.
0
 

Accepted Solution

by:
Reveroom earned 0 total points
ID: 24744487
I've found the solution :-)

It turned out to be as simple as the capitalization within the URL.  In my CFhttp I was using /V3/ - changing it to /v3/ fixed it.
0
 
LVL 13

Expert Comment

by:srikanthmadishetti
ID: 24761387
Thats what even i was suggesting , IF you hit that url it was returning 404 so there was problem with url u gave  so check and pass the correct url.


0
 
LVL 13

Expert Comment

by:srikanthmadishetti
ID: 24761399
Any way glad that you resolved your problem
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

736 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question