cancel
Showing results for 
Search instead for 
Did you mean: 

Maintaining the endpoint of Adaptive WSDL at run Time in 7.31 sp 12

govardan_raj
Contributor
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

daniel_ruiz2
Active Contributor
0 Kudos

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.

junwu
Active Contributor
0 Kudos

why bother to do so?

daniel_ruiz2
Active Contributor
0 Kudos

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.

junwu
Active Contributor
0 Kudos

don't get me wrong,

why you need to change it at runtime? why not just use the standard(service group)?

daniel_ruiz2
Active Contributor
0 Kudos

Hi Jun,

because the endpoint is dynamic.

Also, the whole concept of the 'Service Groups' does not apply to solve the problem I had to solve at the time, and I never use 'standard' functionality if they are conceptually incorrect even when I could to resolve a given problem.

Cheers,

D.

govardan_raj
Contributor
0 Kudos

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

junwu
Active Contributor
0 Kudos

in you case you have to use service group. that's the standard way.

Answers (1)

Answers (1)

junwu
Active Contributor
0 Kudos

using service group in 7.1+

govardan_raj
Contributor
0 Kudos

hi jun wu.,

can u please explain breifly how to achive maintenance of endpoints using service group in 7.1+ ....

Regards

Govardan