Skip to main content



      Home
Home » Newcomers » Newcomers » eclipse doesnt like this line of code(problem with line of java code copied from demo)
eclipse doesnt like this line of code [message #1817633] Tue, 26 November 2019 23:40 Go to next message
Eclipse UserFriend
Hi,

Im new to eclipse, and java and axl

I copied demo code from the cjsco developer site in the docs - axl section called !hello-world-with-java/hello-world-with-java

Presumably the code is good but eclipse flags this line:

String AXLRequest = "<soapenv:Envelope xmlns:soapenv="*****//schemas.xmlsoap.org/soap/envelope/" xmlns:ns="####//www.cisco.com/AXL/API/8.5">";

(substitute the ***** with https: and the #### with http: )
with this error:
Syntax error, insert ";" to complete LocalVariableDeclarationStatement

why? and how do I resolve it?

thanks
Re: eclipse doesnt like this line of code [message #1817636 is a reply to message #1817633] Wed, 27 November 2019 00:42 Go to previous messageGo to next message
Eclipse UserFriend
This isn't really the place for general Java questions, but as String literals in Java are marked by surrounding text with double quotes, you can't have double quotes in the String contents without escaping them with a backslash.

https://docs.oracle.com/javase/tutorial/java/data/strings.html
Re: eclipse doesnt like this line of code [message #1817700 is a reply to message #1817636] Wed, 27 November 2019 22:34 Go to previous message
Eclipse UserFriend
Hi Nitin,

Thanks for the info - since this was from demo code I did not expect to need to modify it out of the chute, so I suspected it was an eclipse oddity. But escaping the extra quotes eliminated the error . The modified line was:

String AXLRequest = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:ns=\"http://www.cisco.com/AXL/API/8.5\">";

Previous Topic:When do forum messages actually post?!
Next Topic:What are the best ways to get answers with Eclipse use?
Goto Forum:
  


Current Time: Wed Nov 05 17:00:22 EST 2025

Powered by FUDForum. Page generated in 0.10333 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top