Dear all,
Could anyone help me about creating PartnerLink? I believe that you are much more familiar with
the code than me. Your help means a lot to me!
I can create PartnerLink through the following approach:
BpelBuilderImpl bpelBuilder = new BpelBuilderImpl((BpelModelImpl) model);
PartnerLink partnerLink = bpelBuilder.createPartnerLink();
Three properties are needed to setup: name, WSDLReference<PartnerLinkType> and
WSDLReference<Role>. Setting up name is pretty easy. However, I don't know how to setup the last
two. I have tried the following approaches:
First approach, I load the external WSDL file and get WSDLModel. From WSDLModel, I can get
PartnerLinkType. However, I don't know if I can construct WSDLReference from PartnerLinkType, and
how? If I can, this approach seems the eaist approach.
Second approach, I tried to create WSDLReference from WSDLReferenceBuilder like following:
WSDLReferenceBuilder wsdlRB = WSDLReferenceBuilder.getInstance();
WSDLReference wsdlRPLT = wsdlRB.build(PartnerLinkType.class, (AbstractDocumentComponent)?,
"ns1:partnerlinktype1");
However, I don't know how to construct AbstractDocumentComponent. Through the source code, the
constructor of AbstractDocumentComponent needs AbstractDocumentModel and org.w3c.dom.Element. I
guess org.w3c.dom.Element is the BPEL model's root element, right? However, how to create or get
AbstractDocumentModel from BpelModel?
Another build of WSDLReferenceBuilder is: (Class<T> clazz , BpelEntityImpl entity , Attribute
attr). I guess clazz should also be PartnerLinkType.class. However, what's BpelEntityImpl and
Attribute? Since BpelEntityImpl is an abstract class, there is no way to instantiate it. Then
which class should be used here? Also how to get Attribute from BpelModel or create it from
scratch?
Third approach, creating "GlobalWSDLReferenceImpl" directly. One of the constructor is: (Class<T>
type, AbstractDocumentComponent parent, String refString , WSDLReferenceBuilder.WSDLResolver
resolver) I guess Class<T> should be PartnerLinkType.class. However, how to create or get
AbstractDocumentComponent from BpelModel or WSDLModel? The same problem is for
WSDLReferenceBuilder.WSDLResolver.
Any hint is greatly appreciated!
Sam
____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs