cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

Looking for a JavaScript coding example that makes Integrity Web Service calls.

kjain-2
15-Moonstone

Looking for a JavaScript coding example that makes Integrity Web Service calls.

Looking for a JavaScript coding example that makes Integrity Web Service calls. I wrote a code (Attached) but am not able to update value in Integrity. Urgent help needed if anyone can.

 

<!DOCTYPE html>
<html>
<head>
<title>SOAP JavaScript Client Test</title>
<script type="text/javascript">
function soap() {
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == XMLHttpRequest.DONE) {
alert(xmlhttp.responseText);
}
}
xmlhttp.open('GET', 'http://blrmiespc-1233:7001/webservices/10/2/Integrity/?wsdl', true);
//xmlhttp.send(null);

// build SOAP request
var sr =
'<?xml version="1.0" encoding="utf-8"?>' +
'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:int="http://webservice.mks.com/10/2/Integrity" xmlns:sch="http://webservice.mks.com/10/2/Integrity/schema">' +
'<soapenv:Header/>' +
'<soapenv:Body>' +
'<int:editItem>' +
'<arg0 sch:ItemId="11704">' +
'<sch:Username>lntuser</sch:Username>' +
'<sch:Password>lntlnt</sch:Password> ' +
'<sch:ItemField Name="Summary">' +
'<sch:shorttext>' +
'<sch:value>Changed from web Services.</sch:value>' +
'</sch:shorttext>' +
'</sch:ItemField>' +
'</arg0>' +
'</int:editItem>' +
'</soapenv:Body>' +
'</soapenv:Envelope>';
// Send the POST request
xmlhttp.setRequestHeader('Content-Type', 'text/xml');
xmlhttp.send(sr);
// send request
// ...
}
</script>
</head>
<body>
<form name="Demo" action="" method="post">
<div>
<input type="button" value="Soap" onclick="soap();" />
</div>
</form>
</body>
</html> <!-- typo -->

1 ACCEPTED SOLUTION

Accepted Solutions
kjain-2
15-Moonstone
(To:kjain-2)

Icreated by own..... 🙂 and working perfectly....

View solution in original post

1 REPLY 1
kjain-2
15-Moonstone
(To:kjain-2)

Icreated by own..... 🙂 and working perfectly....

Top Tags