Check out thwack Ambassador, Derek Schauland's newest post on Storage Arrays.
Also, don't forget to update your email address in your profile!

Search 140,365 posts and 1,367 resources contributed by 129,116 members or post a topic.

Already Joined? Sign in
Trouble getting the Java Client example to work

rated by 0 users
This post has 4 Replies | 1 Follower | 108 Views



Posts 4
Points 10
tcwatkins replied on Fri, Jan 27 2012 10:34 AM
rated by 0 users

Hello

I am trying to get the JavaClient example from the SDK to work. Here is the error I keep getting:

Exception in thread "main"

 

 

javax.xml.ws.WebServiceException: javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLException: java.net.SocketException

: Connection reset

at com.sun.xml.internal.ws.streaming.TidyXMLStreamReader.close(Unknown Source)

at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parseWSDL(Unknown Source)

at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parse(Unknown Source)

at com.sun.xml.internal.ws.client.WSServiceDelegate.parseWSDL(Unknown Source)

at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown Source)

at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown Source)

at com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown Source)

at javax.xml.ws.Service.<init>(Unknown Source)

at org.tempuri.InformationService_Service.<init>(

 

 

InformationService_Service.java:46

)

at SwisClient.getSwisClient(

 

 

SwisClient.java:90

)

at SwisClient.main(

 

 

SwisClient.java:42

)

Caused by:

 

 

javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLException: java.net.SocketException

: Connection reset

at com.sun.net.ssl.internal.ssl.SSLSocketImpl.checkEOF(Unknown Source)

at com.sun.net.ssl.internal.ssl.AppInputStream.available(Unknown Source)

at java.io.BufferedInputStream.available(Unknown Source)

at sun.net.www.MeteredStream.available(Unknown Source)

at sun.net.www.http.KeepAliveStream.close(Unknown Source)

at java.io.FilterInputStream.close(Unknown Source)

at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.close(Unknown Source)

... 11 more

Caused by:

 

 

javax.net.ssl.SSLException: java.net.SocketException

: Connection reset

at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)

at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)

at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)

at com.sun.net.ssl.internal.ssl.SSLSocketImpl.handleException(Unknown Source)

at com.sun.net.ssl.internal.ssl.SSLSocketImpl.handleException(Unknown Source)

at com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown Source)

at java.io.BufferedInputStream.fill(Unknown Source)

at java.io.BufferedInputStream.read1(Unknown Source)

at java.io.BufferedInputStream.read(Unknown Source)

at sun.net.www.MeteredStream.read(Unknown Source)

at java.io.FilterInputStream.read(Unknown Source)

at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(Unknown Source)

at com.sun.org.apache.xerces.internal.impl.XMLEntityManager$RewindableInputStream.read(Unknown Source)

at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(Unknown Source)

at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(Unknown Source)

at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.scanQName(Unknown Source)

at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)

at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)

at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(Unknown Source)

at com.sun.xml.internal.ws.util.xml.XMLStreamReaderFilter.next(Unknown Source)

at com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil.next(Unknown Source)

at com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil.nextContent(Unknown Source)

at com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil.nextElementContent(Unknown Source)

at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parseBindingOperation(Unknown Source)

at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parseBinding(Unknown Source)

... 10 more

Caused by:

 

 

java.net.SocketException

: Connection reset

Any help would be greatly appreciated

  • | Post Points: 1


Posts 4
Points 10
tcwatkins replied on Fri, Jan 27 2012 12:31 PM
rated by 0 users

So I connected to https://localhost:17778/SolarWinds/InformationService. It has a certificate error saying that the certificate is invalid. Also I tried running svcutil.exe https://localhost:17778/SolarWinds/InformationService?wsdl and that also gave an error about not trusting the certificate. I tried installing the certificate in the trusted authorities and now I get a mismatch address certificate error. How can I move pass the certificate error.

  • | Post Points: 3


Posts 739
Points 3,569
SolarWinds Employee
tdanner replied on Fri, Jan 27 2012 12:57 PM
rated by 0 users

The certificate errors you are getting are because the certificate SWIS uses for HTTPS is intentionally not a valid certificate. It is self-signed rather than issued from a proper certificate authority like Verisign, and its common name is CN=SolarWinds-Orion instead of whatever the FQDN of your server is. In this mode, HTTPS provides confidentiality and replay protection, but not host authentication.

svcutil.exe doesn't have a way to tell it to skip the certificate validation. Visual Studio's "Add Service Reference" dialog will let you ignore the error and generates the same kind of proxy as svcutil.exe. There's also a method to trick svcutil.exe using Fiddler.

The Java sample has code for skipping certificate validation, so I don't think that's the problem you are getting there. I recommend looking in C:\ProgramData\Solarwinds\InformationService\v2.0\Orion.InformationService.log to see if you see any errors there. You can also check that the HTTPS endpoint for SWIS is working by using SWQL Studio (which is installed with the SDK) to connect using the "Orion over HTTPS" server type.

Tim Danner
SolarWinds Development Team

  • | Post Points: 3


Posts 4
Points 10
tcwatkins replied on Mon, Jan 30 2012 3:37 PM
rated by 0 users

Hello

I am trying to create a SWIS Client using c#. I used the "Add Service Reference" in Visual Studio to get the proxy classes. When I run my client code, when it goes to query the database I get a "RunQuery failed, check fault information" error. Here is my code:

 

static void Main(string[] args)

        {

            byte[] response = new byte[256];

 

            ServiceReference1.InformationServiceClient client = new ServiceReference1.InformationServiceClient("BasicHttpBinding_InformationService");

            client.ClientCredentials.UserName.UserName = "admin";

            client.ClientCredentials.UserName.Password = "";

 

            string query = "SELECT NodeID, Caption FROM Orion.Nodes";

 

            ServiceReference1.QueryOptions options = new ServiceReference1.QueryOptions();

            options.outputFormat = 0;

           

            Trust.InitiateSSLTrust();

            response = client.Query(query,options);

           

            client.Close();

        }

 

The error happens at "response = client.Query(query,options);"

Thanks 

  • | Post Points: 3


Posts 739
Points 3,569
SolarWinds Employee
tdanner replied on Mon, Jan 30 2012 3:46 PM
rated by 0 users

The Query method is unfortunately broken in the current release. Use the QueryXml method instead (just pass null for the second parameter).

In the current development branch, we have removed the Query method. QueryXml has been the recommended method for the past several releases.

Sorry for the confusion!

Tim Danner
SolarWinds Development Team

  • | Post Points: 1
Page 1 of 1 (5 items) | RSS

© 2003 - 2012 SolarWinds, Inc. All Rights Reserved.

Who is SolarWinds?

SolarWinds is rewriting the rules for how companies manage their networks. Guided by a global community of network engineers, SolarWinds develops simple and powerful network management software and network monitoring software for networks of all sizes. SolarWinds also offers a network certification program to become a SolarWinds Certified Professional (SCP).

What is thwack?

thwack, SolarWinds online community site, was designed by network engineers, for network engineers. thwack is a vibrant, growing community of more than 30,000 IT pros who share a passion for technology.

Explore Resources, Answers, Templates, and Advice

Download Free Networking Tools


Learn More About SolarWinds Products