Global webservice weather deploy successfully but with startProcessInstanceByKey null pointer exception occur

I am calling global webservice weather .The import wsdl is working fine but When i start process by key
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(“weather” , variables);
Giving me exception .

11:28:02.321 [main] DEBUG org.flowable.engine.impl.history.AbstractHistoryManager - Current history level: FULL, level required: ACTIVITY
11:28:02.324 [main] DEBUG org.flowable.engine.impl.history.AbstractHistoryManager - Current history level: FULL, level required: FULL
11:28:02.326 [main] ERROR org.flowable.engine.common.impl.interceptor.CommandContext - Error while closing command context

Exception in thread “main” java.lang.NullPointerException
at org.flowable.engine.impl.bpmn.webservice.Operation.sendMessage(Operation.java:54)
at org.flowable.engine.impl.bpmn.behavior.WebServiceActivityBehavior.execute(WebServiceActivityBehavior.java:136)
at org.flowable.engine.impl.agenda.ContinueProcessOperation.executeActivityBehavior(ContinueProcessOperation.java:256)
at org.flowable.engine.impl.agenda.ContinueProcessOperation.executeSynchronous(ContinueProcessOperation.java:154)
at org.flowable.engine.impl.agenda.ContinueProcessOperation.continueThroughFlowNode(ContinueProcessOperation.java:111)
at org.flowable.engine.impl.agenda.ContinueProcessOperation.continueThroughSequenceFlow(ContinueProcessOperation.java:303)
at org.flowable.engine.impl.agenda.ContinueProcessOperation.run(ContinueProcessOperation.java:77)
at org.flowable.engine.impl.interceptor.CommandInvoker.executeOperation(CommandInvoker.java:88)
at org.flowable.engine.impl.interceptor.CommandInvoker.executeOperations(CommandInvoker.java:72)
at org.flowable.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:56)
at org.flowable.engine.impl.interceptor.BpmnOverrideContextInterceptor.execute(BpmnOverrideContextInterceptor.java:25)
at org.flowable.engine.common.impl.interceptor.TransactionContextInterceptor.execute(TransactionContextInterceptor.java:53)
at org.flowable.engine.common.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:72)
at org.flowable.engine.common.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:35)
at org.flowable.engine.common.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:56)
at org.flowable.engine.common.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:51)
at org.flowable.engine.impl.RuntimeServiceImpl.startProcessInstanceByKey(RuntimeServiceImpl.java:103)
at org.activity.Main.main(Main.java:43)

Unit test case is

package org.activiti;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Scanner;

import javax.sql.DataSource;

import org.flowable.engine.ProcessEngine;
import org.flowable.engine.ProcessEngineConfiguration;
import org.flowable.engine.RepositoryService;
import org.flowable.engine.RuntimeService;
import org.flowable.engine.TaskService;
import org.flowable.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration;
import org.flowable.engine.runtime.ProcessInstance;
import org.flowable.task.api.Task;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
public class ProcessUnitTest {

public static void main (String args[]) {
	

	 ProcessEngine processEngine = ProcessEngineConfiguration.createStandaloneInMemProcessEngineConfiguration().buildProcessEngine();
	 RepositoryService repositoryService = processEngine.getRepositoryService();
   RuntimeService runtimeService = processEngine.getRuntimeService();
   TaskService taskService = processEngine.getTaskService();   

   repositoryService.createDeployment().addClasspathResource("service-activity.bpmn20.xml").deploy();
   

   Map<String, Object> variables = new HashMap<String, Object>();
  variables.put("employee", "abc");
  ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("weather");

bpmn20

  System.out.println("********** id ********" + processInstance.getId());
   
}

}

BPMN file is available on https://expirebox.com/download/c367fea8b5ddad1b48d3d78a1b5dbfb9.html

The nullpointer is thrown when the operation is looked up it seems. Can you paste the wsdl to check what the operations defined are?

Also note that you’re creating variables in your code, but not pass it into the startProcessInstanceByKey method

@joram thanks alot for reply please find the wsdl link is http://www.webservicex.net/globalweather.asmx?WSDL
and BPMN file is available on https://expirebox.com/download/e9a73860f9bfe2b73c09d43167c14610.html

Related to variables i checked also with variables its not an issue