on 06-15-2010 1:38 AM
Hi,
I need to change at the runtime the METADATA_DESTINATION and EXECUTION_DESTINATION in an Adaptive Web Service Model. is this possible?.
Something similar at Multiple Back End Support for the Adaptive RFC Model
http://help.sap.com/saphelp_nw70/helpdata/en/af/84a34098022a54e10000000a1550b0/frameset.htm
but in an Adaptive Web Service Model.
We have EP 701 SP6.
Regards.
Hi,
I have an idea how we could work around the issue, even though I have not tried it yet.
You could try the following:
- locate the auto-generated .java file for your WS model, e.g.
DCs\example.com\com.sapconsulting\demo_app\_comp\gen_wdp\packages\com\sapconsulting\demo_app\demowebservice\model\DemoWSModel.java
- copy the .java file to a place that you can control, e.g. the /src directory
- modify the .java file so that its constructor does not read the destination data from the auto-generated source, but rather from an additional constructor:
old:
private static final String METADATA_DESTINATION = "designtime_dest_meta";
private static final String DEFAULT_EXECUTION_DESTINATION = "designtime_dest_exec";
new:
public DemoWSModel(String destMeta, String destExec) {
super(DESIGN_TIME_WSDL_URL,
destMeta, interfaceQName,
NAMESPACE_MAPPING_AS_STRING, MC_NAME_MAPPING,
destExec, TYPED_MODEL_INFO);
}
Then, during runtime, you might be able to instantiate your model manually and to issue some requests to arbitrary destinations:
DemoWSModel model = new DemoWSModel("runtime_dest_meta", "runtime_dest_exec");
// create + fill request objects here
// ...
request.execute();
I guess you will not be able to use the context with this solution, but maybe this drawback is acceptable.
Good luck
Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Follow the given help
1 [Changing destination at runtime with adaptive web servies |/thread/211455 [original link is broken];
2.[Adaptive Web Service |http://wiki.sdn.sap.com/wiki/display/WDJava/FAQ-Models-AdaptiveWebService]
BR
Satish Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.