cancel
Showing results for 
Search instead for 
Did you mean: 

communicatin between two differnt wd apps?

sandeep_kumar60
Participant
0 Kudos

HI

Can Any one explain me how can we communicate between two differnet webdynpro (java) applications?

i have one component A with A1 as its application and Componet B with B1 as its application.

individullay both runs independently, but is it possible to make both to communicate?

how can we communicate between these two different webdynpro applications?

pls give me an idea regarding this.

Regards,

sandeep kumar

Accepted Solutions (1)

Accepted Solutions (1)

junwu
Active Contributor
0 Kudos

they can communicate via portal event.

you can search this in sdn, a lot of example

Answers (4)

Answers (4)

p330068
Active Contributor
0 Kudos

Dear Sndeep,

Please check the [Inter Application Communication and Navigation (Design Time) in WebDynpro|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a0ae5f90-1679-2c10-4183-8c64cf932088?quicklink=index&overridelayout=true]

Refer to [Web Dynpro Java in the Portal |http://help.sap.com/saphelp_nw70/helpdata/en/d0/f6584289e59041e10000000a1550b0/content.htm]

Hope it will helps

Best Regards

Arun Jaiswal

lokesh_kamana
Active Contributor
0 Kudos

Hi,

Please follow the below process for passing data between two webdynpro applications using portal eventing.

Step1:-

Webdynpro Application 1 (Iview1)

Create an input field bind a context variable and have a button and write the following code in the button onaction.



public void onActionOK(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
  {
  com.sap.tc.webdynpro.clientserver.event.api.WDPortalEventing.fire("urn:com.sap.tc.portaleventing.example","show",
				wdContext.currentContextElement().getHi());
  }


Here Hi-->is the context variable binded to the input field.

Step2:-

Webdynpro Application 2 (Iview2)

WDDOINIT write the following code:-



com.sap.tc.webdynpro.clientserver.event.api.WDPortalEventing.subscribe("urn:com.sap.tc.portaleventing.example","show",wdThis.wdGetRaiseFireAction());

While creating the action it should have the following 3 parameters.

1.dataObject-->Type String

2.namespace-->Type String

3.name-->Type String

Your action code should look like something below.


 public void onActionRaiseFire(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, java.lang.String dataObject, java.lang.String namespace, java.lang.String name )
 {
    wdComponentAPI.getMessageManager().reportSuccess("Value in the input field"+dataObject);
  }

Note:-

1.Make sure your using portal along with domain

Eg:-http://<hostname>:<port>:50000/irj/portal--->wrong

http://<hostname>.<domain>:<port>/irj/portal--->right

2.EPCF level should be 1.

3.Check whether both applications run on the same domain.Sometimes portal eventing does not work between cross domain applications.We should do domian relaxing in order to achieve this.

Thanks & Regards,

Lokesh Kamana

Edited by: lokesh kamana on Jul 28, 2011 7:33 PM

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

This message was moderated.