Skip to Content
0
Former Member
Jun 23, 2015 at 09:00 AM

Need help on Integration Directory API

379 Views

Hi All,

I am trying to create ID objects by Using NWDS by using the code as mentioned in below link ( Integration Directory API).

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a0336199-d3c7-2c10-c983-f8a945a4588c?QuickLink=index&…

But while executing the program in NWDS i am getting the below error.

Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -6

at java.lang.String.substring(String.java:1937)

at java.lang.String.substring(String.java:1904)

I have tracked the error. Exactly i am getting the error in below code:

// get port

BusinessSystemIn systemComp = service.getBusinessSystemInPort(); ( Note: NWDS is not allowinggetBusinessSystemInPort() instead of this i am using getBusinessSystemIn_Port())

// setup context and authorization

this.setupContext((javax.xml.ws.BindingProvider) systemComp,

DirectoryApiConfiguration.getUserid(), DirectoryApiConfiguration.getPassword());

String addressTailWithHostAndPort = endpointAddress.substring(endPointPrefix.length());

All these three steps are interlinked.

Could you please check it once and let me know your suggestions where i am doing mistake or where i have to change?