[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
FW: [bpel-dev] PartnerLink Creation during the import
|
Simon, I pulled the latest sources after you sent this email. I see the artifact file created when the project is created. However, when I create a partner link and import a service I get this exception in the log when I save:
!ENTRY org.eclipse.core.resources 4 2 2008-06-13 10:02:15.361
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.resources".
!STACK 0
java.lang.NullPointerException
at org.eclipse.bpel.common.ui.editmodel.EditModel.getResourceInfoForLoadedResource(EditModel.java:174)
at org.eclipse.bpel.common.ui.editmodel.EditModel$EditModelCache$1.notifyChanged(EditModel.java:478)
at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:247)
at org.eclipse.emf.common.notify.impl.NotificationChainImpl.dispatch(NotificationChainImpl.java:104)
at org.eclipse.emf.common.notify.impl.NotificationChainImpl.dispatch(NotificationChainImpl.java:92)
at org.eclipse.emf.common.notify.impl.NotifyingListImpl.remove(NotifyingListImpl.java:724)
at org.eclipse.emf.common.util.BasicEList.remove(BasicEList.java:898)
at org.eclipse.bpel.model.resource.BPELResourceSetImpl.resourceChanged(BPELResourceSetImpl.java:224)
at org.eclipse.bpel.model.resource.BPELResourceSetImpl.processDeltas(BPELResourceSetImpl.java:191)
at org.eclipse.bpel.model.resource.BPELResourceSetImpl.processDeltas(BPELResourceSetImpl.java:162)
at org.eclipse.bpel.model.resource.BPELResourceSetImpl.resourceChanged(BPELResourceSetImpl.java:156)
at org.eclipse.core.internal.events.NotificationManager$2.run(NotificationManager.java:282)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:276)
at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:148)
at org.eclipse.core.internal.resources.Workspace.broadcastBuildEvent(Workspace.java:295)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:140)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:235)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Thereafter things seem to be in a bad state.
Are you seeing this as well?
Thanks,
Les Spivey
-----Original Message-----
From: bpel-dev-bounces@xxxxxxxxxxx [mailto:bpel-dev-bounces@xxxxxxxxxxx] On Behalf Of Simon D Moser
Sent: Friday, June 13, 2008 8:43 AM
To: BPEL Designer project developer discussions.
Cc: BPEL Designer project developer discussions.; bpel-dev-bounces@xxxxxxxxxxx
Subject: Fw: [bpel-dev] PartnerLink Creation during the import
Hi all,
I just fixed the inconsistency I found earlier, so in case you are working off the latest HEAD code, pls. update your workspace.
From now on, we will create a <sameNameAsProcess>Artifacts.wsdl when we create a new Process. All PLT's and things will go in there.
That means that the description from below still works, just from now on you would have to add that stuff to the default created <sameNameAsProcess>Artifacts.wsdl, rather than adding it to <sameNameAsProcess>.wsdl (since that doesn't exist now anymore)
Cheers
Simon
ps.: basically, you'd have to do the same stuff as this series of steps:
1.) Add a Partner link by clicking "+" in the tray. Name is somehow.
2.) Go to the details page of that partnerLink.
3.) Click browse
4.) Select any WSDL file shown, Click OK
5.) A new PartnerLinkType Wizard comes up. If you need code examples, take a look at that wizard.
Simon Moser, M.Eng.
Websphere Integration Mail: IBM Deutschland Entwicklung
Developer Development smoser@xxxxxx. GmbH
Team Lead BPEL Editor com Vorsitzender des
Dept. 4722, Bldg. Phone: Aufsichtsrats: Martin Jetter
71032-01, Room 086 +49-7031-16-43 Geschäftsführung: Herbert
Websphere Solutions and 04 Kircher
Services Fax: Sitz der Gesellschaft:
IBM Deutschland +49-7031-16-48 Böblingen
Entwicklung GmbH 90 Registergericht: Amtsgericht
Schönaicherstr. 220, D – Stuttgart, HRB 243294
71032 Boeblingen
----- Forwarded by Simon D Moser/Germany/IBM on 13.06.2008 17:31 -----
|------------>
| From: |
|------------>
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|Simon D Moser/Germany/IBM |
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| To: |
|------------>
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|"BPEL Designer project developer discussions." <bpel-dev@xxxxxxxxxxx> |
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Cc: |
|------------>
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|"BPEL Designer project developer discussions." <bpel-dev@xxxxxxxxxxx>, bpel-dev-bounces@xxxxxxxxxxx |
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Date: |
|------------>
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|13.06.2008 13:15 |
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Subject: |
|------------>
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|Fw: [bpel-dev] PartnerLink Creation during the import |
>--------------------------------------------------------------------------------------------------------------------------------------------------|
I forgot to mention: There is something fishy that you discovered.
Basically, the BPELEditor assumes that there is a backing wsdl file that holds the "partnerLinkTypes" etc. extensions. When creating a new process, we create a file called <sameNameAsProcess>.wsdl that stores them.
In the past, that backing file was named <sameNameAsProcess>Artifacts.wsdl.
When you create a Partner using the tray. it still assumes that the file is called <sameNameAsProcess>Artifacts.wsdl, if none is present.
Problem here is that things are not lined up properly - I have to look into this. As a workaround, just add the PLT to the "<sameNameAsProcess>.wsdl"
after you import - that should just work.
Cheers
Simon
Simon Moser, M.Eng.
Websphere Integration Mail: IBM Deutschland Entwicklung
Developer Development smoser@xxxxxx. GmbH
Team Lead BPEL Editor com Vorsitzender des
Dept. 4722, Bldg. Phone: Aufsichtsrats: Martin
71032-01, Room 086 +49-7031-16-43 Jetter
Websphere Solutions and 04 Geschäftsführung: Herbert
Services Fax: Kircher
IBM Deutschland +49-7031-16-48 Sitz der Gesellschaft:
Entwicklung GmbH 90 Böblingen
Schönaicherstr. 220, D – Registergericht:
71032 Boeblingen Amtsgericht Stuttgart, HRB
243294
----- Forwarded by Simon D Moser/Germany/IBM on 13.06.2008 13:11 -----
|------------>
| From: |
|------------>
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|Simon D Moser/Germany/IBM |
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| To: |
|------------>
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|"BPEL Designer project developer discussions." <bpel-dev@xxxxxxxxxxx> |
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Cc: |
|------------>
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|"BPEL Designer project developer discussions." <bpel-dev@xxxxxxxxxxx>, bpel-dev-bounces@xxxxxxxxxxx |
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Date: |
|------------>
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|13.06.2008 13:10 |
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Subject: |
|------------>
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|RE: [bpel-dev] PartnerLink Creation during the import |
>--------------------------------------------------------------------------------------------------------------------------------------------------|
I would try to do it analogously as the default. That is:
In a Process named "Test", there is usually a "Test.wsdl" file (at least when the process was created with the BPEL designer, this is what we assume for now).
In BPEL, you programmatically add:
<bpel:partnerLinks>
<!--This is there by default -->
<bpel:partnerLink name="client"
partnerLinkType="tns:process"
myRole="processProvider"
partnerRole="processRequester"
/>
<!--This is the new stuff you have to add-->
<bpel:partnerLink name="newClient"
partnerLinkType="tns:process2"
partnerRole="processRequester2"
/>
</bpel:partnerLinks>
You can do this by using the BPELFactory to create a partnerLink object, fill it as shown above, and add it to the Process' PartnerLinks.
You also have to modify the WSDL Resource in order to add the new PartnerLinkType.
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PARTNER LINK TYPE DEFINITION
the process partnerLinkType binds the provider and
requester portType into an asynchronous conversation.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-->
<plnk:partnerLinkType name="process">
<plnk:role name="processProvider" portType="tns:process"/>
<plnk:role name="processRequester" portType="tns:processCallback"/>
</plnk:partnerLinkType>
<!--This is the new stuff you have to add-->
<plnk:partnerLinkType name="process2">
<plnk:role name="processRequester2"
portType="myWSDLNamespace:myPortType"/>
</plnk:partnerLinkType>
Do this analogously: Create a new PartnerLinkType Object, fill it, add it to the WSDL Definition object. Then also save the WSDL. Once this is done, the Partner automatically gets reflected in the tray. You do not have to mess around in the tray or even use command. Just add the things that you want to the appropriate model objects and save their resources - that's it.
Let me know if you have further questions.
Cheers
Simon
Simon Moser, M.Eng.
Websphere Integration Mail: IBM Deutschland Entwicklung
Developer Development smoser@xxxxxx. GmbH
Team Lead BPEL Editor com Vorsitzender des
Dept. 4722, Bldg. Phone: Aufsichtsrats: Martin
71032-01, Room 086 +49-7031-16-43 Jetter
Websphere Solutions and 04 Geschäftsführung: Herbert
Services Fax: Kircher
IBM Deutschland +49-7031-16-48 Sitz der Gesellschaft:
Entwicklung GmbH 90 Böblingen
Schönaicherstr. 220, D – Registergericht:
71032 Boeblingen Amtsgericht Stuttgart, HRB
243294
|------------>
| From: |
|------------>
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|"Maio, Marco" <Marco.Maio@xxxxxxxxxxxxxx> |
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| To: |
|------------>
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|"BPEL Designer project developer discussions." <bpel-dev@xxxxxxxxxxx> |
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Date: |
|------------>
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|11.06.2008 11:42 |
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Subject: |
|------------>
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|RE: [bpel-dev] PartnerLink Creation during the import |
>--------------------------------------------------------------------------------------------------------------------------------------------------|
So, I resume what I did:
- I created a PartnerLinkType object, called "plt", setting its name with the name+"PLT" of the port type found in the wsdl at the import stage.
- I created a role setting his name like for the partnerlinktype but adding "Role" this time. I passed to its method "setporttype" the port type found in the wsdl.
- I add the role to the plt created.
So at this point the plt should be completed.
After that:
- I get the tray related to the partnerlink from the BPELEditor.
- I used the method publicAddEntry() to add(or create) a new Partner Link to this tray.
- I set its name equal to the name of the plt's name and its partner link type to the plt.
- I set the partnerrole to the plt's partnerrole.
So, now I can view a new partner link in the partner link's tray, but saving I get this error in the "Problems" window:
"partnerLinkType" is set to "bpelInitPTPLT" on this <bpel:partnerLink> but it cannot be resolved (check value of "partnerLinkType", imports, WSDLs or XSDs).
Should be due to the fact that I don't add the PartnerLink to the artifacts file?
Anyway I've also tried to add this code:
Definition artifactsDefinition = getBPELEditor().getArtifactsDefinition();
CompoundCommand cmd = new CompoundCommand(); cmd.add( new AddWSDLImportCommand ( artifactsDefinition, itPt.next() ));
cmd.add( new CreatePartnerLinkTypeCommand(artifactsDefinition, actualPl) ); getCommandFramework().execute( cmd );
to my process, but without getting any improvement, I always get the same error.
Thank you for your help.
Marco
-----Original Message-----
From: bpel-dev-bounces@xxxxxxxxxxx [mailto:bpel-dev-bounces@xxxxxxxxxxx] On Behalf Of Simon D Moser
Sent: Tuesday, June 10, 2008 6:38 PM
To: BPEL Designer project developer discussions.
Cc: bpel-dev@xxxxxxxxxxx; bpel-dev-bounces@xxxxxxxxxxx
Subject: Re: [bpel-dev] PartnerLink Creation during the import
Hey Marco,
yes - the purpose of the artifacts.wsdl is to store the BPEL WSDL extensions (such as PartnerLinkTypes and properties and propertyAliases) to a central backing file. Thus, when you create a Partner in the BPEL editor, it gets stored there.
For your scenario, what you'd need to do is: You have to create a PartnerLink (in the BPEL) that points to a PartnerLinkType (in the artifacts WSDL), where the PartnerLinkType has a role (either inbound, or outbound, or both), and that role points to the portType that you just added.
HTH
Simon
Simon Moser, M.Eng.
Websphere Integration Mail: IBM Deutschland Entwicklung
Developer Development smoser@xxxxxx. GmbH
Team Lead BPEL Editor com Vorsitzender des
Dept. 4722, Bldg. Phone: Aufsichtsrats: Martin Jetter
71032-01, Room 086 +49-7031-16-43 Geschäftsführung: Herbert
Websphere Solutions and 04 Kircher
Services Fax: Sitz der Gesellschaft:
IBM Deutschland +49-7031-16-48 Böblingen
Entwicklung GmbH 90 Registergericht: Amtsgericht
Schönaicherstr. 220, D - Stuttgart, HRB 243294
71032 Boeblingen
From: "Maio, Marco" <Marco.Maio@xxxxxxxxxxxxxx>
To: <bpel-dev@xxxxxxxxxxx>
Date: 10.06.2008 17:25
Subject: [bpel-dev] PartnerLink Creation during the import
Hi to all,
I would like to automatically add the partnerlinks while the import of a wsdl file. In this way I read the name of the porttype from the wsdl, I create a PartnerLinkImpl object (givin to it the name of the port type + "plt" extension), then I get the PartnerLink's tray and I add the partnerlink to it.
Should I add it even to the artifatcs file?
Anybody could explain me which is the aim of this file?
Thank you,
Marco_______________________________________________
bpel-dev mailing list
bpel-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/bpel-dev
_______________________________________________
bpel-dev mailing list
bpel-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/bpel-dev