Note that there are some explanatory texts on larger screens.

plurals
  1. POCannot instantiate web service interface from client in java
    text
    copied!<p>I have created a webservice in apache axis 2. But I cannot instantiate the interface from my client. How to create a class to which calls the method from the interface?</p> <p>guide me</p> <p>Service interface: </p> <pre><code> public interface BusService extends java.rmi.Remote { public java.lang.String allepy(java.lang.String starting, java.lang.String ending, java.lang.String comfort) throws java.rmi.RemoteException; public java.lang.String cochin(java.lang.String starting, java.lang.String ending, java.lang.String comfort) throws java.rmi.RemoteException; public java.lang.String ooty(java.lang.String starting, java.lang.String ending, java.lang.String comfort) throws java.rmi.RemoteException; public java.lang.String kanyakumari(java.lang.String starting, java.lang.String ending, java.lang.String comfort) throws java.rmi.RemoteException; public java.lang.String kodaikanal(java.lang.String starting, java.lang.String ending, java.lang.String comfort) throws java.rmi.RemoteException; } </code></pre> <p>my client coding</p> <pre><code>public class Servicecall { String luxury=""; String start=""; String end=""; public void services(String start,String end,String comfort) { try { String endpoint="http://localhost:8080/servicecomposition/services/BusService"; Service service=new Service(); Call call=(Call)service.createCall(); call.setTargetEndpointAddress(new java.net.URL(endpoint)); call.setOperationName(new QName("http://schemas.xmlsoap.org/soap/http","allepyReturn")); String ret = (String) call.invoke( new Object[] {start} ); } catch(Exception e) { System.out.println(e); } } } </code></pre> <p>In the above program I call the service from my jsp page which calls the servlet(I pass some arguements and from that servlet I call the client. But When I call the client I get this error:</p> <pre><code> INFO: Server startup in 22641 ms java.lang.InstantiationException: com.service.BusService </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload