Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic SYNERGY (steve huntington)
Decrease font size
Increase font size
Topic Title: XML returned be getXmlData() is not well-formed -- How to work around?
Topic Summary:
Created On: 19-Jul-2006 17:24
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 19-Jul-2006 17:24
User is offline View Users Profile Print this message


Michael Rinne

Posts: 2
Joined: 7-Jun-2006

Hi,

I am using the Perl API for ChangeSynergy. I wrote a small XSL stylesheet to display the XML data returned by method getXmlData() of class apiObjectVector.

Now, I noticed that the < signs are not escaped, if these were used in text fields like a description. The browser quits processing the XML data with the error message that these XML data are not well-fromed.

I tried to work around the problem in several ways, but without success:

1. Using the methods toShowXml(), toSubmitXml(), or toXML() returns only a small subset of the data returned by getXmlData(). Unfortunately, all important data are missing.

2. I iterated though the apiObjectVector using the method getDataObject( $index ) and manipulated the apiObjectData with method setValue( $data ). Retrieving the data again with getValue() proofs they were successfully modified, but getXmlData() still shows the original data!? I tried to use the method setIsModified() for apiObjectData and toSubmitXml() on apiObjectVector, but this returns an empty XML element for the apiObjectVector.

It looks like I am missing something here which would be helpfull to understand how the ChangeSynergy Perl API works.

Any help or small hints are highly appreciated.

Thanks in advance,
Michael



Edited: 19-Jul-2006 at 17:29 by Michael Rinne
Report this to a Moderator Report this to a Moderator
 25-Jul-2006 10:01
User is offline View Users Profile Print this message


Palle Clausen

Posts: 11
Joined: 17-Oct-2005

I dont if you can use this but here is another example for using data from a query # Now find the CR $queryString = "service_report_no= '". ."'"; $data = $csapi->QueryData($user, "Basic Summary", $queryString, undef, undef, undef); Fo r(my $i = 0; $i < $data->getDataSize(); $i++) { #Get the child data, this is the associated data, the sub-report data. my $childData = $data->getDataObject($i)->getDataObjectByName("setValue('); $tmpstr = $csapi->ModifyCR($user, $tmp); }
Report this to a Moderator Report this to a Moderator
 25-Jul-2006 18:15
User is offline View Users Profile Print this message


Michael Rinne

Posts: 2
Joined: 7-Jun-2006

Hi Palle,

thanks for the answer. Unfortunately, the sample got crippled by this forum software.

However, I found a work around for my problem. While iterating through the data objects I set them ALL to modified, then they all show up in the output of method toShowXml(). I attached the modified script.

Thanks,
Michael
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic SYNERGY forum.
There are currently 0 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 15:34.
There are currently 0 guests browsing this forum, which makes a total of 0 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.