[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.6

help with sending SOAP request to Amazon

Asked by soadfan in ColdFusion Application Server

Tags: soap, coldfusion, request

hi,

i am relatively new using XML/SOAP, however i am working on a project where we must create a data feed of our products and send them to Amazon to be listed on their site as an affiliate seller (please note this is different than the common project of gaining access to Amazon's RSS feed to list their products on your website, we are doing the opposite of listing our products on their website).
i believe i am supposed to use CFHTTP to send the soap request to their server:
1. Post APIs to the following address: https://merchant-api-qa.amazon.com:443/exec/merchantdata/
2.Include your username and password credentials in the http header, and include your merchant ID in the SOAP envelope.

here is a sample of the SOAP i created envelope i need to send amazon:

POST https://MYUSERNAME:MYPASSWORD@https://merchant-api-qa.amazon.com:443/exec/merchantdata/> Accept: text/xml
Accept: multipart/*
Content-Length: 752
Content-Type: text/xml; charset=utf-8
SOAPAction: "nsMerchantDataExchange#getAllPendingDocumentInfo"
<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
xmlns:SOAP-
ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-
ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-
ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><SOAP-
ENV:Body><ns:getAllPendingDocumentInfo
xmlns:ns="nsMerchantDataExchange"><merchant xsi:type="ns:Merchant"><merchantName
xsi:type="xsd:string">*******</merchantName><merchantIdentifier
xsi:type="ns:MerchantIdentifier">********</merchantIdentifi
er></merchant><messageType
xsi:type="ns:MessageType">_GET_ORDERS_DATA_</messageType></ns:getAllP
endingDocumentInfo></SOAP-ENV:Body></SOAP-ENV:Envelope>

here is my problem: how to i go about sending the SOAP request using coldfusion:
i tried saving the SOAP request as a variable and sending it using CFHTTP as follows:

<cfsavecontent variable="xmlSOAPcontent">

<!--- entire SOAP envelope above goes in here --->

</cfsavecontent>
<!--- Send Request --->
<cfhttp url='https://myusername:mypassword@merchant-api-qa.amazon.com/exec/merchantData' method="POST" port="443" resolveurl="NO">
<!--- HTTP Header Values --->
<cfheader name="SOAPAction" value="">
<cfheader name="Content-Type" value="text/xml; charset=utf-8">

<!--- SOAP REQUEST CONTENT --->
<cfhttpparam type="XML" name="CGI" value="#xmlSOAPcontent#">


</cfhttp>
<!--- Assign Results --->
<cfset SOAPResponse ="#cfhttp.filecontent#">

<cfoutput>#SOAPResponse#</cfoutput>


however, i just keep getting 'connection failure' from cfhttp.filecontent
here is the dump of #cfhttp#

struct
Charset [empty string]
ErrorDetail I/O Exception: For input string: "https:"
Filecontent Connection Failure
Header [undefined struct element]
Mimetype Unable to determine MIME type of file.
Responseheader struct [empty]
 
Statuscode Connection Failure. Status code unavailable.
Text YES
requireWait Connection Failure


im not sure if this is a coldfusion error or something on amazon's SOAP server, but they assure me that everything is ok on their end.
does anyone have any experience doing something like this?

help is appreciated.
[+][-]06/08/04 06:18 AM, ID: 11259596Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06/08/04 06:22 AM, ID: 11259634Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06/08/04 06:56 AM, ID: 11259954Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06/08/04 03:26 PM, ID: 11264900Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06/08/04 03:43 PM, ID: 11264970Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06/09/04 06:09 AM, ID: 11269322Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: ColdFusion Application Server
Tags: soap, coldfusion, request
Sign Up Now!
Solution Provided By: PE_CF_DEV
Participating Experts: 3
Solution Grade: A
 
 
Loading Advertisement...
20091021-EE-VQP-81