0

I am currently trying to implement the CVENT WSDL in Java -

I am using Eclipse -

I have Created a WebService Client with the given WSDL address and had it auto generate code utilizing Axis. (Try catch removed)

   V200611Locator locator = new V200611Locator(); 
   V200611Soap binding = locator.getV200611Soap();
   V200611SoapStub stub = (V200611SoapStub) binding;
   LoginResult lr = stub.login("Account", "User", "Password");

From there simply trying to Stub gives me a connection error.

AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: java.net.ConnectException: Connection timed out: connect faultActor: faultNode: faultDetail:

      {http://xml.apache.org/axis/}stackTrace:java.net.ConnectException: Connection timed out: connect
   at java.net.DualStackPlainSocketImpl.connect0(Native Method)
   at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
   at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
   at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
   at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
   at java.net.PlainSocketImpl.connect(Unknown Source)
   at java.net.SocksSocketImpl.connect(Unknown Source)
   at java.net.Socket.connect(Unknown Source)
   at sun.security.ssl.SSLSocketImpl.connect(Unknown Source)
   at sun.security.ssl.SSLSocketImpl.<init>(Unknown Source)
   at sun.security.ssl.SSLSocketFactoryImpl.createSocket(Unknown Source)
   at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:92)
   at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)
   at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)
   at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
   at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
   at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
   at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
   at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
   at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
   at org.apache.axis.client.Call.invoke(Call.java:2767)
   at org.apache.axis.client.Call.invoke(Call.java:2443)
   at org.apache.axis.client.Call.invoke(Call.java:2366)
   at org.apache.axis.client.Call.invoke(Call.java:1812)
   at com.cvent.api._2006_11.V200611SoapStub.login(V200611SoapStub.java:3621)
   at wsdlTest.main(wsdlTest.java:46)

   {http://xml.apache.org/axis/}hostname:COMPUTERNAME

For This Connection exception I have tried extending the timeout value on the stub

stub.setTimeout(600000);

AND also modifying

System.setProperty. // Modifying run arguments

I know I have access to the WSDL (via IP Whitelist) because I can access it / make Powershell Calls

Cvent developer notes

  • I would give Axis a miss firstly. Last update was 12 years ago according to https://axis.apache.org/axis/. Try it with CXF and see if it works. – Namphibian Jul 09 '18 at 05:04
  • @Namphibian - I tried with CXF also - however it was a security issue and I still was banging my head against the wall. Thank you for the advice because you are totally correct about how old axis is. – Andrew Riznyk Jul 09 '18 at 15:45

1 Answers1

1

This issue took WAY too long to figure out - Security settings prevented me from accessing the WSDL and the Proxy settings in the Window->Preferences->General->Network Connection Are for the Eclipse Apps (I guess). To make a connection I had to manually set the Proxy settings in the application.

System.setProperty("http.proxyHost",host);
System.setProperty("http.proxyPort",port);

This problem is a duplicate of - Web Service Client - Construction Failing Due To Timeout (Proxy Issue)

For me the web service actually constructed just fine - the stub methods would time out.

If you are having similar problems -

Try accessing the WSDL from your web browser - If you can access it then go into your advanced network settings to get the HOST and PORT proxy settings.

If you can not access it from your web browser then you may be having firewall issues (You may need Cvent to white list your IP).