Web Service Consumer Java

When setting up a Web Service Consumer I’m getting the following error stack:

java.rmi.RemoteException: No operation description was found for the service {http://www.webserviceX.NET/}StockQuote

at lotus.domino.websvc.client.Call.invoke(Unknown Source)

at NET.webserviceX.www.StockQuoteSoapStub.getQuote(StockQuoteSoapStub.java:11)

at JavaAgent.NotesMain(Unknown Source)

at lotus.domino.AgentBase.runNotes(Unknown Source)

at lotus.domino.NotesThread.run(Unknown Source)

What am I missing?

Here’s the code in my Agent. The rest is generated by the Web Service Consumer design element when importing wsdl file. Just point to

Home - WebserviceX.net to do so.

Agent Code:

import NET.webserviceX.www.StockQuoteLocator;

import NET.webserviceX.www.StockQuoteSoapStub;

import lotus.domino.*;

public class JavaAgent extends AgentBase {

public void NotesMain() {



  try {

      Session session = getSession();

      AgentContext agentContext = session.getAgentContext();

      

      StockQuoteLocator service = new StockQuoteLocator();

      java.net.URL endpointURL = new java.net.URL(service.getStockQuoteSoapAddress());

      StockQuoteSoapStub thisBinding = new StockQuoteSoapStub(endpointURL, service);

      thisBinding.getQuote("KO");

      



  } catch(Exception e) {

      e.printStackTrace();

   }

}

}

Subject: Java agent

Hi

Ok here below some steps:

  • build a web services consumer

  • create a new agent

  • import the web services consumer

  • on javaAgent file past this:

import lotus.domino.*;

import NET.webserviceX.www.StockQuoteSoap;

import NET.webserviceX.www.StockQuoteLocator;

public class JavaAgent extends AgentBase {

public void NotesMain() {



  try {

      Session session = getSession();

      AgentContext agentContext = session.getAgentContext();



      StockQuoteSoap stub = new StockQuoteLocator().getStockQuoteSoap();

      System.out.println(stub.getQuote("KO"));





  } catch(Exception e) {

      e.printStackTrace();

   }

}

}

Have a nice day.