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

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

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

smccoy
12-Amethyst

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

Hi,

Can someone post an example of JavaScript code that is making Integrity Web Service calls? This is for the Web Client only. I have all the Web Services documentation and I simply need an example for making the equivalent of an "im viewIssue" and/or "im editIssue" call using the Web Services from JavaScript. And this is browser-side JavaScript, not server-side behind a Trigger. I currently don't understand the JSONRpcClient and mksCommandRunner wrapper functions that I see in the debugger.

Any guidance would be most helpful. I almost have this functionality working and this is the last portion to complete in our prototype.

Kind regards,

-Sean

addendum...

I have a SOAP example from Jeremy that works great. For our implementation, we will need to make use of the userid/pw that is part of the session for the Web Client. The SOAP example has a hard-coded userid/pw. So I have the basic mechanics in place that demonstrates that our concept is workable. The next step to making this real is integrating with the JavaScript and session information that is running in the Web Client. A simple example would be most helpful.

ACCEPTED SOLUTION

Accepted Solutions
wspadola
12-Amethyst
(To:smccoy)

Hi Sean,

I hope this helps: https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS162601&lang=en_US

Let us know if it helps to resolve your use-case.

Thank You,

Wes

View solution in original post

10 REPLIES 10
smccoy
12-Amethyst
(To:smccoy)

Follow-up...

This capability is crtical to resolve for our next phase of development. In other words, it is a "showstopper" if we cannot find a solution.

I'll create a case for this one to cover the "official channel" of tracking.

Meanwhile, if anyone has suggestions please send them... All ideas are welcome at this point.

-Sean

Hello Sean,

In the case you have opened, you probably want to get your organization associated with RFC 321915/CS91733: Web Services User Guide for Integrity.

Given that you already understand how to make SOAP connections to Integrity, this question on StackOverflow provides an example of how to make a simple SOAP connection.

Regards,

Kael


Kind Regards,
Kael Lizak

Senior Technical Support Engineer
PTC Integrity Lifecycle Manager
smccoy
12-Amethyst
(To:KaelLizak)

Thank you for the information, Kael. I have the XML Services document from PTC that describes the details of the SOAP calls. If the mks_webkit.js file was not obfuscated, we could probably figure this out on our own. The Web Client is already doing what we want to do, and we need to tap into the existing functionality. No new features or rewrite of anything is required.

I've entered a case number for this specific request: C12291207

By next week,our protype will be complete enough to demostrate, with the exception of this one piece.

-Sean

smccoy
12-Amethyst
(To:smccoy)

Bump and refresh this request...

I have an example of a SOAP call for getItem for the 2009 WebServices, which was helpful and I have working.

I'm in need of an example of an editItem WebService call using the 10l.2 WebServices. The XML would be fine at this point. I'm not XML-savy enough to figure out the syntax from the XML schema documentation.

-Sean

wspadola
12-Amethyst
(To:smccoy)

Hi Sean,

I hope this helps: https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS162601&lang=en_US

Let us know if it helps to resolve your use-case.

Thank You,

Wes

smccoy
12-Amethyst
(To:wspadola)

Hi Wes,

Thank you... That was most helpful. I am now posting updates to the Integrity server using WebServices from our own custom JavaScript functions within the web-client.

And they said it could not be done.

-Sean

smccoy
12-Amethyst
(To:wspadola)

A quick follow-up on this item...

We are now using a JSP app on the server to process our post-back functions. This approach solved the session problem, and we can stay out of the JSONrpc transactions and the mks_webkit.js functions. Our JavaScript now simply posts to our custom JSP app(s) instead of using XML/SOAP. Very clean and straightfoward. Switching from XML/SOAP to the JSP app was very little effort.

This solution worthy of note for anyone else that might encounter this need.

Also, if you haven't used SoapUI yet, I highly recommend it. Note that only versions 3.5.1 and previous will work with the Integrity WSDL.

All you need to do is point SoapUI to the Integrity WSDL location (http://hostname:7001/webservices/10/2/Integrity/?wsdl) and you can start plugging-in values to parameters in a GUI to build the SOAP call.

I have also had good results with using Soap Panda.

smccoy
12-Amethyst
(To:JoeBartlett)

Hi Joe,

Thanks for the information. I'll check into WSDL and Soap Panda when I return from my holiday break.

Now that the basics are working, we can look at optimizing and tuning our approach.

Kind regards,

-Sean

PratikJain
6-Contributor
(To:smccoy)

Can you help with viewing item using javascript.

Announcements


Top Tags