Re: [Openslp-devel] OpenSLP 2.0 Java API?
Brought to you by:
jcalcote
From: HIRD M. <Mat...@uk...> - 2013-07-01 09:38:59
|
I never use the Java API, I use jSLP, find it much better but I'm not sure what's happening with it these days - http://jslp.sourceforge.net/ -----Original Message----- From: Jim Marshall [mailto:jim...@wb...] Sent: 14 June 2013 21:25 To: ope...@li... Subject: [Openslp-devel] OpenSLP 2.0 Java API? Has anyone done any work with IPv6 and the Java API? I am getting an error from ServiceURL when it tries to parse an IPv6 address, this happens because IPv6 uses colon (":") as a separator and ServiceURL looks for the first ":" after the scheme, looking to see if there is a port specified. For example an IPv6 URL might be https://[fe80:0:0:0:2999:2222:9602:1e69%12]:5989 I have a "fix" which utilizes the Java URL class but I'm not 100% sure that is valid for SLP 18a19,20 > import java.net.MalformedURLException; > import java.net.URL; 61c63,64 < _type = new ServiceType(_url.substring(0, transportSlash1++)); --- > String serviceTypeStr = _url.substring(0, transportSlash1++); > _type = new ServiceType(serviceTypeStr); 70a74,84 > String tURL = _url.substring(serviceTypeStr.lastIndexOf(":") + 1); > URL jURL; > try { > jURL = new URL(tURL); > } catch (MalformedURLException e) { > throw new RuntimeException(e); > } > _port = jURL.getPort(); > _host = jURL.getHost(); > _path = jURL.getPath(); > /* 95a110 > */ ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ Openslp-devel mailing list Ope...@li... https://lists.sourceforge.net/lists/listinfo/openslp-devel |