Skip to Content
avatar image
Former Member

DIR API: Getting error for URL entry

All,

I am following William Li's blog for using DIR API (http://scn.sap.com/community/pi-and-soa-middleware/blog/2008/10/20/directory-api-development--part-2-of-3)

Per part 3 I have created the following

"ChangeList class contains 3 methods: 


createChangeList: This method creates a new change list and returns its changelist id.
activate: This method activates the changelist, using the changelist id.
setURL: This method sets the URL on where the webservice is to be executed. By default, the webservice will executed on the server as set in the binding and endpoint of the WSDL configuration in part 2. We can change this configuration by using this method. Consequently, this code can be used to execute the webservice on any server. "

However I am getting an error for the following statement:

   

this.url = this.url.concat("</span><a class="jive-link-external-small" href="http://">http://</a><span>").concat(serverPort).concat(apiURL );

ERROR when trying to run the program:

Exception in thread "main" java.lang.Error: Unresolved compilation problems:
Syntax error on token "jive", delete this token
Syntax error on token "" href="", ? expected
Syntax error, insert ": Expression" to complete Expression
Syntax error, insert ")" to complete MethodInvocation
Syntax error, insert ";" to complete Statement

at com.test.commchan.ChangeList.setURL(ChangeList.java:51)
at com.test.commchan.ChangeList.main(ChangeList.java:91)

Pls advice.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Jul 09, 2013 at 12:45 PM

    Hello Vicky,

    could it be that you need to escape the quotation characters in the HTML text? Otherwise the compiler would mix it up with the quotations for the concat command.

    Is this Java? I would expect then all strings in one concat command, the concatenation of concat commands in this way should give some error.

    Regards,

    Jörg

    Add comment
    10|10000 characters needed characters exceeded