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

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Coerce Windchill Task to Output XML of our own design?

MartyRoss
1-Newbie

Coerce Windchill Task to Output XML of our own design?

Group,

Is there any way to force a Windchill task to output XML according to our own schema?

We'd like to create SOAP services to Windchill using Windchill tasks with webjects (or other high-level constructs), but the consumer of these services requires we produce the responses according to their XML schema. It appears that all @return types that I've been able to find construct XML according to some "wc:" namespace, and that we can't control that - is that true??

If not possible to do what we wish (as indicated above), is our only / best option to write our own SOAP services using servlets?

Thank you in advance,

-- Marty Ross

5 REPLIES 5

XSLT and or use java code to execute task and output desired XML by traversing group(s) sent back in webject task response.

Sent from my Verizon Wireless BlackBerry

... ok, but how can I produce the result and get it back to the consumer - shall I wrap that in a custom servlet, or is there a better way?

In Reply to Dave DeMay:
XSLT and or use java code to execute task and output desired XML by traversing group(s) sent back in webject task response.

Sent from my Verizon Wireless BlackBerry

Yeah, similar to what Dave said, you could write your own web service which basically just sits between your consumer and the IE servlet and calls the task for you, then rewrite the XML.

XSLT is pretty much designed to do this, but if you don't have control of the consumer then you'll have to put up a middleman for them.

-Thomas R. Busch
Sr. Software Developer
Stryker Instruments
(269) 323-7700 x4014
tom.busch@stryker.com<">mailto:tom.busch@stryker.com>

Are you suggesting calling the task by a wrapper that would produce my XML?

Is thereany way to get the task itself to produce my XML - i.e., so that when I call the task directly using http://wchost/Windchill/servlet/IE/tasks/com/mycompany/task.xml it returns XML conforming to my schema?

I've tried using XSLT inside a task (e.g. using Windchill's "Translate-Group" webject), butI've only had luckwith that iftheXSLT produces output that looks like serialized Info*Engine groups (i.e., begins with "<wc:collection>", etc.)

In Reply to Dave DeMay:

XSLT and or use java code to execute task and output desired XML by traversing group(s) sent back in webject task response.

The task URL you reference can not output something different because you are using the I*E servlet.

So you would need a wrapper to invoke and translate the XML output by the I*E servlet.

Your time is well spent on adding your own jsp or servlet whose content type sent to the client is xml.


Sent from my Verizon Wireless BlackBerry
Top Tags