on 08-01-2014 10:58 AM
Hi experts ,
In earlier 7.01 NWDS we were consuming wsdl of type deprecated and were able to change the endpoint at run time , i.e
wdContext.currentWSDLelement().modelObject()._setEndPoint("endpoint");
now in nwds 7.31 we are consuming adaptive wsdls , and here we dont have any option to maintain the endpoints at run time , if any knows how to maintain the endpoint of the wsdl at run time please suggest
Regards
Govardan
Hi,
you can an invocation modifier on the 'request' method of your service.. ie:
final String endpointUrl = [someEndpoint];
request[Method].wdSetInvocationModifier(
new IWDWSInvocationModifier() {
public void doModifyInvocation(Object port) {
HTTPControlInterface httpControlInterface = HTTPControlFactory.getInterface(port);
if (null != endpointUrl)
httpControlInterface.setEndpointURL(endpointUrl);
}
public void doModifyAfterInvocation() { }
}
);
in the code above, the request[method] is the model you call the .execute() on which extends WSTypedModelClassExecutable - it will be straight forward, it's just a bit more hidden now.
Hope it helps,
D.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jun,
bother to do what? - take the time to post a code sample when he cannot find something like Service Group documentation?
IMO, documentation with SAP is not easy to find, and also not clear when you do find it.. when I had to perform the same task (exactly the same method he mentioned to modify the endpoint on runtime) it took me a while to find out how to do it - of course, one more time, because documentation within 'SAP' is total garbage.
D.
Thanks a lot Daniel ,
It is really helpfull because we are using the PI webservices and we have development , quality and prd landsacpe where i have to change the endpoint of the wsdl every time when i move my component from development to quality or prd , so we are chaning that dynamically at runtime..
@jun wu
Had gone through service Group and service Reference even that is usefull but still not implemented .
Regards
Govardan Raj
using service group in 7.1+
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.