• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Help with first Web Service please

New Here ,
Apr 15, 2006 Apr 15, 2006

Copy link to clipboard

Copied

Just getting up to speed on Web Services, CFMX 7 and XML. ANy help would be appreciated!

Below is what the SOAP request will look like and what the client wants back. (my webmail may have munched it slightly)

I have taken out the XML in the middle of the SOAP request and successfully parsed it and placed the Order in my SQL database. But will it work when I get the SOAP request from the client's .NET application? I am not sure how to test that without contacting the client for testing... (last resort).

The second attached code show what I thinking about doing with the request so far... but now I am stuck...

Thanks in advance for your help.
TOPICS
Advanced techniques

Views

286

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 22, 2006 May 22, 2006

Copy link to clipboard

Copied

Hi,

This is what I use to test an external web service from plain ASP. You can use this to test your coldfusion web service as well. I currently have an issue calling my own coldfusion web service so let me know how you get on. Hope this helps.

Edwin.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN">
<html lang="en">
<head>
<title>Using the XML HTTP Request object</title>
<script src="xmlhttp.js" type="text/javascript">
xmlhttp=false
</script>
</head>
<body>

<h1>Using the XML HTTP Request object</h1>
<script type="text/javascript">
if (xmlhttp) {
document.write('<p class="example"><a href="/2002/1/asyncget.html" onclick="example1();return false;">Try the example.</a></p>')
}
function example1() {
xmlhttp.open("POST", " http://www.oorsprong.org/websamples.countryinfo/CountryInfoService.wso",true);
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState==4) {
alert(xmlhttp.responseText)
}
}
xmlhttp.setRequestHeader("Man", "POST /websamples.countryinfo/CountryInfoService.wso HTTP/1.1")
xmlhttp.setRequestHeader("MessageType", "CALL")
xmlhttp.setRequestHeader("Content-Type", "text/xml")

xmlhttp.send("<?xml version='1.0' encoding='UTF-8'?>"+"\n\n"+"<soap:Envelope"+
' xmlns:soap=" http://schemas.xmlsoap.org/soap/envelope/"'+
' xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"'+
' xmlns:xsd=" http://www.w3.org/2001/XMLSchema">'+
' <soap:Body><CountryCurrency'+
' xmlns=" http://www.oorsprong.org/websamples.countryinfo"'+
' soap:encodingStyle=" http://schemas.xmlsoap.org/soap/encoding/">'+
' <sCountryISOCode xsi:type="xsd:string">NL</sCountryISOCode>'+
' </CountryCurrency>'+
' </soap:Body></soap:Envelope>')
}
</script>

</body>
</html>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 22, 2006 May 22, 2006

Copy link to clipboard

Copied

LATEST
Oops, forgot to include the js file code.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation