|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
Teamcenter二次开发源码:通过teamcenter SOA 开发查找Item% Y9 P7 D7 K, _
; G- i3 v) I* V) G3 zpublic static Item findExistingItem( DataManagementService dmService, String itemIDs){
" W& @4 p* ^* h" Scom.teamcenter.services.strong.core._2007_01.DataManagement.GetItemFromIdInfo infos[] = new com.teamcenter.services.strong.core._2007_01.DataManagement.GetItemFromIdInfo[1];1 ~$ W9 T6 r. a& d( Z
infos[0] = new com.teamcenter.services.strong.core._2007_01.DataManagement.GetItemFromIdInfo();
+ F$ b! O: K; M6 J9 U$ Y4 ]( B. s xinfos[0].itemId = itemIDs;1 e$ D" H( V" j
com.teamcenter.services.strong.core._2007_01.DataManagement.GetItemFromIdPref pref = new com.teamcenter.services.strong.core._2007_01.DataManagement.GetItemFromIdPref();
8 y6 I- w& {5 K# E$ t. bpref.prefs = new com.teamcenter.services.strong.core._2007_01.DataManagement.RelationFilter[0];* l+ U# ?% x7 l! t
GetItemFromIdResponse resp = dmService.getItemFromId(infos, 0, pref);
' M; O( U1 G6 w# n9 n! O5 KItem result[] = new Item[ resp.output.length ];
: _$ R4 e3 A5 r: V! g1 j/ Jfor ( int i = 0; i < resp.output.length; i++ )- i2 R9 Q9 f* d5 B
result = resp.output.item;
4 q) T. b, N7 J) Y$ ^, R3 S+ P. S7 h2 s( u. P
if ( resp.output.length > 0 )- O5 ^; {* y( @1 o( v. Z. P
return result[0];
. s. C7 o0 `* A: L; xelse
) K1 ]0 }- r0 C; z1 F) vreturn null;
. r% B4 M. e6 ]/ R; |0 G4 a}
, E: G1 v3 |+ e" ^6 n2 ~$ @9 E f- E( w* b' S, l" {
1 m6 ]3 v8 W! Z& T9 v6 a: [ |
|