Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
PTC Windchill 11.
gives below error while opening the URI from the visul.xxx.xml. URI is something like http://xxxxx/Windchill/servlet/IE/tasks/com/ptc/RepresentationDownload.xml?object_ref=wt.viewmarkup.DerivedImage:81490@
<?xml version="1.0" encoding="UTF-8"?>
<wc:COLLECTION xmlns:wc="http://www.ptc.com/infoengine/1.0"><exception STATUS="-1" TYPE="Exception" NAME="exception">
<wc:MESSAGE>Syntax error in ELEMENT parameter
</wc:MESSAGE><wc:INSTANCE>
<hierarchy>com.infoengine.procunit.webject.GroupWebjectException
</hierarchy><hierarchy>
com.infoengine.exception.fatal.IEFatalServiceException</hierarchy>
<hierarchy>com.infoengine.exception.fatal.IEFatalException
</hierarchy><hierarchy>
com.infoengine.util.IEException</hierarchy>
<hierarchy>javax.servlet.jsp.JspException
</hierarchy><hierarchy>
java.lang.Exception</hierarchy>
<hierarchy>java.lang.Throwable
</hierarchy><hierarchy>
java.lang.Object</hierarchy>
</wc:INSTANCE></exception>
</wc:COLLECTION>
Just in case it is not properly visible, Below is the error
<wc:COLLECTION>
<exception NAME="exception" TYPE="Exception" STATUS="-1">
<wc:MESSAGE>Syntax error in ELEMENT parameter</wc:MESSAGE>
<wc:INSTANCE>
<hierarchy>com.infoengine.procunit.webject.GroupWebjectException</hierarchy>
<hierarchy>com.infoengine.exception.fatal.IEFatalServiceException</hierarchy>
<hierarchy>com.infoengine.exception.fatal.IEFatalException</hierarchy>
<hierarchy>com.infoengine.util.IEException</hierarchy>
<hierarchy>javax.servlet.jsp.JspException</hierarchy>
<hierarchy>java.lang.Exception</hierarchy>
<hierarchy>java.lang.Throwable</hierarchy>
<hierarchy>java.lang.Object</hierarchy>
</wc:INSTANCE>
</exception>
</wc:COLLECTION>
Could you share RepresentationDownload.xml??
Thanks Binesh for the reply. Below is the RepresentationDownload.xml
<!--
To use this task from a browser type the following into your address
The address above contains an argument that is passed into the task specifying
the object ID for a WTPart (object_ref = VR:wt.part.WTPart:38573).
This ID 38573 can be found by looking at the database in the WTPart table.
Alternatly, you can add an additional argument that specifies the name of the group used
for getting Part structure by adding the following to the end of the address (&group_out=jason_test).
If this is not specified, it uses the name (output) as a default. I do not know why this feature was added.
-->
<!-- ** Import standard JSP page directive and standard JSP taglib directive (required for all Info Engine tasks) -->
<%@page language="java" session="false" access="http|soap|internal"%>
<%@taglib uri="http://www.ptc.com/infoengine/taglib/core" prefix="ie"%>
<!-- ** Import Java classes -->
<%@page import="java.io.FileNotFoundException"%>
<%@page import="java.io.FileOutputStream"%>
<%@page import="java.io.PrintWriter"%>
<%@page import="java.io.File"%>
<!-- ** Unnessessary Java Imports, the task runs without this here -->
<%@page import="java.io.IOException"%>
<%@page import="java.util.*"%>
<!-- ** Unnessessary Info Engine Imports, the task runs without this here -->
<%@page import="com.infoengine.object.factory.Group"%>
<%@page import="com.infoengine.object.factory.Att"%>
<%@page import="com.infoengine.object.factory.Element"%>
<%@page import="com.infoengine.SAK.BasicTasklet"%>
<%@page import="com.infoengine.util.IEException"%>
<%@page import="com.ibaset.plm.windchill.custom.VisualizationDownloader"%>
<%
boolean debug = true;
// if(debug) System.out.println writes to the Methodserver log file. This is used to help debug the program and to log errors.
if(debug) System.out.println("\nDebug: Starting queryChildren Task");
// String adapter = getLocalAdapter();
// if(debug) System.out.println("Debug: Adapter: "+adapter);
// Create a generic object that is the process created by this Task
Object me = this;
// Create a BasicTasklet object and assign the process to it.
BasicTasklet ie = null;
ie = (BasicTasklet) me;
// The group_out value can be passed in as an argument, but if not specified, the default value set below is "output"
String gout = (String) ie.getParam("group_out", "output");
if(debug) System.out.println("Debug: group_out argument: "+gout);
// obj_ref is passed in as an argument, see above in the example web address (VR:wt.part.WTPart:38573).
String obj_ref = (String) ie.getParam("object_ref");
if(debug) System.out.println("Debug: obj_ref argument: "+obj_ref);
String temp = "";
VisualizationDownloader ah = new VisualizationDownloader ();
temp = ah.downloadRepresentationFile (obj_ref);
String pvsfile = "PvsFile="+temp;
String type = "Type=Representation";
%>
<ie:webject name="Create-Group" type="GRP">
<ie:param name="ELEMENT" data="<%= pvsfile%>"/>
<ie:param name="ELEMENT" data="<%= type%>"/>
<ie:param name="CLASS" data="EmployeeData"/>
<ie:param name="GROUP_OUT" data="createdgroup"/>
</ie:webject>
// Group createdgroup = ie.getGroup("createdgroup");
<!-- ** Returns the groups created by this task. These groups can be now be used by other tasks or JSP pages. -->
<ie:webject name="return-groups" type="grp">
<ie:param name="group_in" data="createdgroup"/>
</ie:webject>
<%
if(debug) System.out.println("Debug: Ending queryChildren Task\n");
%>