Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
I'm new to Windchill and Info Engine.
Here is where I am at in my learning process:
- I have been able to run the default tasks that I found on this WSDL (<host>/Windchill/servlet/SimpleTaskDispatcher?CLASS=com.ptc.windchill.ws&VERSION=1.1&STYLE=document) using SOAP.
- I am also able to create tasks using the Info Engine Task Editor and then run them externally with a http request.
I'm trying to query a product structure externally based on some user input (product name). I need each parts' structure level, number, name, version, quantity and unit.
Ideally i would prefer not having to modify the server at all and use only out of the box tasks, but can modify if necessary.
Looking through the documentation I found the following task that looks like it is exactly what i'm looking for.
_______________________________________________________________________________________________________________
Multilevel_BOM_Report
com.infoengine.connector.Group Multilevel_BOM_Report (String partOid, String locale, String hostName, String sessionId, String moduleName, String ncId)
Queries for a product structure and returns a multi-level Bill of Materials. {resourceBundle: com.ptc.windchill.enterprise.reports.bomReportsRB}
Parameters:
partOid
- Specifies the top level part object Id.
locale
- Specifies the locale.
hostName
- Specifies the host name.
sessionId
- Specifies the session Id.
moduleName
-
ncId
-
Returns:{columns: java.lang.String level, java.lang.String indent, java.lang.String image, java.lang.String numberURL, java.lang.String Number, java.lang.String Version, java.lang.String Name, java.lang.String orgName, java.lang.String usedLineNumber, java.lang.String usedFindNumber, java.lang.String quantityAmount, java.lang.String quantityUnit, java.lang.String State, java.lang.String refDesignator, java.lang.String orgIdLabel, java.lang.String orgIdRef, java.lang.String recursivePath[4000], java.lang.String recursiveMark, java.lang.String recursive}
Task:
/com/ptc/windchill/enterprise/reports/WBRMultiLevelBOM.xml
_______________________________________________________________________________________________________________
My problem is, i'm not sure how to call this externally. Is there a WSDL that includes this? If so how do i find it?
I tried:
<host>/Windchill/servlet/SimpleTaskDispatcher?CLASS=com.ptc.windchill.enterprise.report.ReportTask&STYLE=document&VERSION=1.1
but that returns an empty xml document. I also can't find the URL to call it with a direct http request.
Any help would be greatly appreciated.
-Jon
Solved! Go to Solution.
I ended up creating a task on the server to get the BOM. I used a query-object webject to query a wt.part.WTPart based on a part number (given as a parameter). Then I used the resulting oid to get the product structure with a query-tree webject.
I found another question that helped a lot.
- Jon
I ended up creating a task on the server to get the BOM. I used a query-object webject to query a wt.part.WTPart based on a part number (given as a parameter). Then I used the resulting oid to get the product structure with a query-tree webject.
I found another question that helped a lot.
- Jon