title: Webservice client for Java 6 not working in Java 8
body: <p>I am using wsimport to generate client for a WSO2 webservice (/services/RemoteUserStoreManagerService?wsdl).</p>
  
  <p>WSO2 is running on a separate server on JAVA 6.</p>
  
  <p>My problem is that when the client is generated using JAVA 8. I am not able to invoke the webservice.</p>
  
  <p><strong>JAVA 6</strong> </p>
  
  <p>The stub generation and invocation works fine when JAVA 6 is used. I specify the url dynamically by changing the client constructor to accept ULR.</p>
  
  <p><strong>JAVA 8</strong></p>
  
  <p>When the client is generated using JAVA 8 and I use the default the constructor (It has the url hardcoded in the static block) to invoke the web service client it works fine but gives below mentioned error for methods with void return type.</p>
  
  <pre><code>Exception in thread "main" javax.xml.ws.WebServiceException: No response returned.
  at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:98)
  at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:77)
  at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:147)
  at com.sun.proxy.$Proxy34.updateRoleListOfUser(Unknown Source)
  at com.abc.xyz.portal.service.UserAdminServiceClient.updateUser(UserAdminServiceClient.java:181)
  at com.abc.xyz.portal.service.UserAdminServiceClient.main(UserAdminServiceClient.java:192)
  </code></pre>
  
  <p>But when i try to invoke the client by specifying the WSDL LOCATION using the generated method constructor(URL url) I get below exception:</p>
  
  <pre><code>Exception in thread "main" java.lang.NullPointerException
  at com.sun.xml.internal.ws.model.JavaMethodImpl.freeze(JavaMethodImpl.java:379)
  at com.sun.xml.internal.ws.model.AbstractSEIModelImpl.freeze(AbstractSEIModelImpl.java:105)
  at com.sun.xml.internal.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:320)
  at com.sun.xml.internal.ws.db.DatabindingImpl.&lt;init&gt;(DatabindingImpl.java:85)
  at com.sun.xml.internal.ws.db.DatabindingProviderImpl.create(DatabindingProviderImpl.java:59)
  at com.sun.xml.internal.ws.db.DatabindingProviderImpl.create(DatabindingProviderImpl.java:43)
  at com.sun.xml.internal.ws.db.DatabindingFactoryImpl.createRuntime(DatabindingFactoryImpl.java:105)
  at com.sun.xml.internal.ws.client.WSServiceDelegate.buildRuntimeModel(WSServiceDelegate.java:875)
  at com.sun.xml.internal.ws.client.WSServiceDelegate.createSEIPortInfo(WSServiceDelegate.java:892)
  at com.sun.xml.internal.ws.client.WSServiceDelegate.addSEI(WSServiceDelegate.java:855)
  at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:435)
  at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:404)
  at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:386)
  at javax.xml.ws.Service.getPort(Service.java:119)
  at com.abc.xyz.remoteuserstore.client.RemoteUserStoreManagerService.getRemoteUserStoreManagerServiceHttpsSoap11Endpoint(RemoteUserStoreManagerService.java:72)
  at com.abc.xyz.portal.service.UserAdminServiceClient.&lt;init&gt;(UserAdminServiceClient.java:47)
  at com.abc.xyz.portal.service.UserAdminServiceClient.main(UserAdminServiceClient.java:190)
  </code></pre>
  
  <p>Is this because WSO2IS is working on JAVA6 and i am using JAVA8 to invoke the service?</p>
  
  <p>I am not able to understand where am i going wrong.</p>
  
  <p>Any help would be grateful.</p>