Process: com.example.vicevirus.myapplication, PID: 13471       java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.google.firebase.auth.FirebaseUser.getUid()' on a null object reference               at com.example.vicevirus.myapplication.RegisterActivity$1.onComplete(RegisterActivity.java:48)               at com.google.android.gms.tasks.zzc$1.run(Unknown Source)               at android.os.Handler.handleCallback(Handler.java:751)               at android.os.Handler.dispatchMessage(Handler.java:95)               at android.os.Looper.loop(Looper.java:154)               at android.app.ActivityThread.main(ActivityThread.java:6119)               at java.lang.reflect.Method.invoke(Native Method)               at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)               at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)   This is on android monitor. How do I solve this?  package com.example.vicevirus.myapplication;  import android.app.ProgressDialog;          import android.support.annotation.NonNull;          import android.support.v7.app.AppCompatActivity;          import android.os.Bundle;          import android.view.View;          import android.widget.EditText;          import android.widget.Toast;          import com.google.android.gms.tasks.OnCompleteListener;          import com.google.android.gms.tasks.OnSuccessListener;          import com.google.android.gms.tasks.Task;          import com.google.firebase.auth.AuthResult;          import com.google.firebase.auth.FirebaseAuth;          import com.google.firebase.database.DatabaseReference;          import com.google.firebase.database.FirebaseDatabase;  public class RegisterActivity extends AppCompatActivity {     private EditText email,name,password;     DatabaseReference databaseReference;     FirebaseAuth mAuth;     private DatabaseReference userIdRef;     ProgressDialog registerDialog;     @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_register);         email=(EditText)findViewById(R.id.email);         name=(EditText)findViewById(R.id.name);         password=(EditText)findViewById(R.id.password);         databaseReference= FirebaseDatabase.getInstance().getReference().child("chat_users");         mAuth=FirebaseAuth.getInstance();         registerDialog=new ProgressDialog(this);         registerDialog.setMessage("Registering..");     }     public void submit(View view) {         registerDialog.show();         mAuth.createUserWithEmailAndPassword(email.getText().toString(),password.getText().toString()).addOnCompleteListener(this, new OnCompleteListener&lt;AuthResult&gt;() {             @Override             public void onComplete(@NonNull Task&lt;AuthResult&gt; task) {                 if(task.isComplete())                 {                     registerDialog.dismiss();                     Toast.makeText(getApplicationContext(),"Registered successfully",Toast.LENGTH_SHORT).show();                     userIdRef=databaseReference.child(mAuth.getCurrentUser().getUid());                     userIdRef.child("name").setValue(name.getText().toString());                     finish();                 }                 registerDialog.dismiss();             }         });     } }
129
What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?
107801
I posted the code below to the Sun developers forum since I thought it was erroring (the true error was before this code was even hit).  One of the responses I got said it would not work and to throw it away.  But it is actually working.  It might not be the best code (I am new to Java) but is there something inherently "wrong" with it?   =============  CODE:   private static void ImportFromCsvToAccessTable(String mdbFilePath, String accessTableName  , String csvDirPath , String csvFileName ) throws ClassNotFoundException, SQLException {      Connection msConn = getDestinationConnection(mdbFilePath);     try{          String strSQL = "SELECT * INTO " + accessTableName + " FROM [Text;HDR=YES;DATABASE=" + csvDirPath + ";].[" + csvFileName + "]";         PreparedStatement selectPrepSt = msConn.prepareStatement(strSQL );         boolean result = selectPrepSt.execute();                 System.out.println( "result = " + result );      } catch(Exception e) {         System.out.println(e);     } finally {         msConn.close();     } }
45672
This question has been asked before, but none of the answers on those threads have helped so far.  Getting the following error when trying to deploy a test class from the sandbox to production in the Force.com IDE:  System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, LeadPerson: execution of AfterInsert caused by: System.Exception: Too many SOQL queries: 101  LeadPerson trigger looks OK, e.g., no SOQL calls inside a loop.  trigger LeadPerson on Lead (after insert) {     Map&lt;Id, Lead&gt; leadMap = new Map&lt;Id, Lead&gt;();     Map&lt;String, Lead&gt; leadEmailMap = new Map&lt;String, Lead&gt;();      for(Lead lead : Trigger.new) {         if (lead.Email != null) {             leadMap.put(lead.Id, lead);             leadEmailMap.put(lead.Email, lead);         }     }      Map&lt;String, Person__c&gt; personMap = new Map&lt;String, Person__c&gt;();     for (Person__c p : [SELECT Id, Email__c FROM Person__c WHERE Email__c IN :leadEmailMap.keySet()]) {         personMap.put(p.Email__c, p);     }      List&lt;Person__c&gt; addPersons = new List&lt;Person__c&gt;();     List&lt;PersonHistory__c&gt; addPersonHistorys = new List&lt;PersonHistory__c&gt;();     List&lt;Lead&gt; addPersonLead = new List&lt;Lead&gt;();     Map&lt;String, String&gt; addPersonEmails = new Map&lt;String, String&gt;();      for(Lead lead : Trigger.new) {         if (lead.Email != null) {             if (personMap.containsKey(lead.Email)) {                 // Create PersonHistory__c record for existing Person__c records                 Person__c getPerson = personMap.get(lead.Email);                 PersonHistory__c newPersonHistory = new PersonHistory__c();                 newPersonHistory.Person__c = getPerson.Id;                 newPersonHistory.RecType__c = 'LEAD';                 newPersonHistory.RecSubType__c = lead.inq_type__c;                 newPersonHistory.SFID__c = lead.Id;                 newPersonHistory.RecTypeStatus__c = 'NEW';                 addPersonHistorys.add(newPersonHistory);             } else {                 // Create Person__c and PersonHistory__c record for NEW Person__c records                 String firstInitial = '';                 if (lead.FirstName != null) {                     firstInitial = lead.FirstName.substring(0, 1);                 }                  if (!addPersonEmails.containsKey(lead.Email)) {                     addPersonEmails.put(lead.Email, 'EMAIL');                     Person__c newPerson = new Person__c();                     newPerson.Email__c = lead.Email;                     newPerson.AltKey__c = firstInitial + lead.LastName + lead.PostalCode;                     newPerson.Current_Status__c = 'NEW';                     addPersons.add(newPerson);                     addPersonLead.add(lead);                 }             }         }     }      // INSERT NEW Person__c records     List&lt;Database.SaveResult&gt; newPersonResult = Database.Insert(addPersons);     for (integer i = 0; i &lt; newPersonResult.size(); i++) {         // Create PersonHistory__c records for new Person__c records         PersonHistory__c newPersonHistory = new PersonHistory__c();         newPersonHistory.Person__c = newPersonResult.get(i).getId();         newPersonHistory.RecType__c = 'LEAD';         newPersonHistory.RecSubType__c = addPersonLead.get(i).inq_type__c;         newPersonHistory.SFID__c = addPersonLead.get(i).Id;         newPersonHistory.RecTypeStatus__c = 'NEW';         addPersonHistorys.add(newPersonHistory);     }     insert addPersonHistorys; }   The debug log doesn't show a transaction having more than 5 out of 100 SOQL queries in the CUMULATIVE_LIMIT_USAGE sections. Not sure where to look next. Any help is appreciated.
28494
I have an apex class which fetches and upserts data from external source to Salesforce. Below is the batch class: global class PolicyCalloutBatchClass implements Database.Batchable&lt;Integer&gt;,Database.AllowsCallouts, Database.Stateful {     global Iterable&lt;Integer&gt; start(Database.BatchableContext context) {         Integer[] values = new Integer[0];         while(values.size() &lt; 2999 || Test.isRunningTest()) values.add(values.size());         return values;     }     global void execute(Database.BatchableContext context, Integer[] values) {                  HttpRequest policyreq = new HttpRequest();         policyreq.setMethod('GET');         policyreq.setTimeout(120000);         policyreq.setEndpoint('&lt;endpoint&gt;');         policyreq.setHeader('Authorization', 'Bearer ' + &lt;token&gt;);         Http policyhttp = new Http();         HTTPResponse policyres = policyhttp.send(policyreq);         String policyresponse = policyres.getBody();         JsonParser objJsonParser = (JsonParser) JSON.deserialize(policyresponse, JsonParser.class);                    JsonParser.cls_value clsValue = objJsonParser.value;         Map&lt;String, JsonParser.cls_data&gt; clsDataMap = new Map&lt;String, JsonParser.cls_data&gt;();         for(JsonParser.cls_data objClsData: clsValue.data){             clsDataMap.put(objClsData.id, objClsData);         }         list&lt;Policy__c&gt; updatelist = new list&lt;Policy__c&gt;();         for (String eachIdFromMap : clsDataMap.keySet()){                          Policy__c policy = new Policy__c(                 unique_id__c = clsDataMap.get(eachIdFromMap).id,                 agent_id__c = clsDataMap.get(eachIdFromMap).agentId);             updatelist.add(policy);           }         try{             upsert updatelist unique_id__c;             }         catch(DmlException e){             system.debug('This class didnt compile');         }     }     global void finish(Database.BatchableContext context) {              } }  Below is my Mock test class: @isTest global class MockHttpResponseGenerator implements HttpCalloutMock {     // Implement this interface method     global HTTPResponse respond(HTTPRequest req) {           HttpRequest policyreq = new HttpRequest();         policyreq.setMethod('GET');         policyreq.setTimeout(120000);         policyreq.setEndpoint('&lt;endpoint&gt;');         policyreq.setHeader('Authorization', 'Bearer ' + &lt;token&gt;);         Http policyhttp = new Http();         HTTPResponse policyres = policyhttp.send(policyreq);         String policyresponse = policyres.getBody();                         return policyres;     } }  Below is my test class: @isTest  private class PolicyUpdateController_Test {     static testMethod void testPostCallout() {         Test.setMock(HttpCalloutMock.class, new MockHttpResponseGenerator());                    Test.startTest();       Database.executeBatch(new PolicyCalloutBatchClass(), 50);          Test.stopTest();              } }  Now, when I run the above test class, either the test class runs forever without any output or I could see the error as  System.LimitException: Too many callouts: 101  Can anyone please let me know if there is any way to get this done? Thanks!
439
Consider:  namespace WindowsApplication1 {     public partial class Form1 : Form     {         public Form1()         {             InitializeComponent();         }          private void button1_Click(object sender, EventArgs e)         {             //int[] val = { 0, 0};             int val;             if (textBox1.Text == "")             {                 MessageBox.Show("Input any no");             }             else             {                 val = Convert.ToInt32(textBox1.Text);                 Thread ot1 = new Thread(new ParameterizedThreadStart(SumData));                 ot1.Start(val);             }         }          private static void ReadData(object state)         {             System.Windows.Forms.Application.Run();         }          void setTextboxText(int result)         {             if (this.InvokeRequired)             {                 this.Invoke(new IntDelegate(SetTextboxTextSafe), new object[] { result });             }             else             {                 SetTextboxTextSafe(result);             }         }          void SetTextboxTextSafe(int result)         {             label1.Text = result.ToString();         }          private static void SumData(object state)         {             int result;             //int[] icount = (int[])state;             int icount = (int)state;              for (int i = icount; i &gt; 0; i--)             {                 result += i;                 System.Threading.Thread.Sleep(1000);             }             setTextboxText(result);         }          delegate void IntDelegate(int result);          private void button2_Click(object sender, EventArgs e)         {             Application.Exit();         }     } }   Why is this error occurring?     An object reference is required for the nonstatic field, method, or property 'WindowsApplication1.Form1.setTextboxText(int)
23661
Context Around this Code: I am making a schedulable class run each Sunday to track a couple of metrics important to the team.   Question: I am looking to consolidate DML operations and a big part of this is understanding pass by reference vs pass by value.  I want to pass the salesOps user object to the method SDREfficiencyLastWeek. I made the return type void, because I figured that I will be passing this by reference and I can make all the updates in the method without having to anything.   Why I am confused:    I read the above article and am thrown off by the following statement:  "Non-primitive data type arguments, such as sObjects, are also passed into methods by value. "   If the object is indeed passed by reference, then the query for the salesOps user in my code should be sufficient enough to edit all fields on that object without actually having to state each field in the query.  global class SDREfficientMetricsSchedulable implements Schedulable  {     global void execute(SchedulableContext sc)      {         User salesOps = [SELECT ID FROM USER WHERE id = '0056A000002Z3p9QAC'];         List&lt;String&gt; queries = new List&lt;String&gt;();          String contactsWorked_lastWeek  = 'select count(id) results from contact where LastActivityDate = last_week';         queries.add(contactsWorked_lastWeek);          String demosSet_lastWeek            = 'select count(id) results from form__c where CreatedDate = last_week';         queries.add(demosSet_lastWeek);          String demosCompleted_lastWeek  = 'select count(id) results from opportunity where (stagename = \'Unqualified Demo Completed\'  OR stagename = \'Qualified Demo Completed\' )  and RecordTypeId = \'0126A000000yudDQAQ\' and CloseDate = last_week';         queries.add(demosCompleted_lastWeek);          String qualifiedDemos_lastWeek  = 'select count(id) results  from opportunity where RecordTypeId = \'0126A0000004Ao6QAE\' and isclosed = false and  SDR_Owner__c != null and CreatedDate = last_week';         queries.add(qualifiedDemos_lastWeek);          String closedWon_lastWeek       = 'select count(id) results  from opportunity where RecordTypeId = \'0126A0000004Ao6QAE\' and iswon = true and  SDR_Owner__c != null and CloseDate = last_week';         queries.add(qualifiedDemos_lastWeek);            SDREfficiencyLastWeek(queries, salesOps);          update salesOps;     }       public void SDREfficiencyLastWeek(List&lt;String&gt; queries, User salesOps )     {        }  }
72983
I have been struggling with this error for a few days now. I get this error every time I try to run a test for a method that has an httpCallout. I followed the architecture from  , but to no avail. I thought it could be something I was messing up in my code, so I copied all three of the classes from the documentation, and I am still getting the error when I try to run the test. All of the classes are on Salesforce API 29. Has anyone run into this before?
81052
// Insert an account  Account a = new Account(Name='Test',                      annualRevenue=100.0);  insert a;  // Create an approval request for the account Approval.ProcessSubmitRequest req1 =        new Approval.ProcessSubmitRequest(); req1.setObjectId(a.id); req1.setNextApproverIds(new Id[] {'***************'}); // Submit the approval request for the account Approval.ProcessResult result =                     Approval.process(req1);   Am trying to execute this code in anonymous block. How ever when tried in trigger i got same error all the time. Hard coded next approvers ID. No luck.  Any suggestions on what am I doing wrong ? Please help!!
6182
I have written the following batch apex class and corresponding test class. Tests are successful but the execute method is never called. I have attempted to debug to try to pinpoint the problem but have had no luck.   Batch Class  global class BatchAddToCampaign implements Database.Batchable&lt;sObject&gt;,  Database.Stateful {     global final Id campaignId;     global final Set&lt;Id&gt; qKeys;      global BatchAddToCampaign(Id campaignId, Set&lt;Id&gt; qKeys){         this.campaignId = campaignId;         this.qKeys = qKeys;     System.Debug('this.campaignId is ' + campaignId);              System.Debug('this.qkeys is ' + qKeys);                       }      global Database.QueryLocator start(Database.BatchableContext BC) {         return Database.getQueryLocator('Select Id From Lead Where Id In :qKeys');     }      global void execute(Database.BatchableContext BC, List&lt;Lead&gt; scope) {         System.Debug('Starting Execute Method!');                  Integer collsize;          List&lt;CampaignMember&gt; cm = new List&lt;CampaignMember&gt;();            Map&lt;Id, Campaign&gt; cmMap = new Map&lt;Id, Campaign&gt;([Select (Select LeadId From CampaignMembers) From Campaign c Where Id = :campaignId]);          for(Lead myLeads : scope) {              CampaignMember newCM = new CampaignMember(              CampaignId = campaignId,              LeadId = myLeads.Id,              status = 'Added' );                   if (!cmMap.containsKey(myLeads.Id)) {                      cm.add(newCM);                       collsize = cm.size();                  }          }           try {              Database.insert(cm);           } catch (DmlException ex) {             System.Debug('Insert failed ' + ex);          }             }      global void finish(Database.BatchableContext BC) {         AsyncApexJob a = [SELECT Id, Status, NumberOfErrors, JobItemsProcessed,  TotalJobItems, CreatedBy.Email From AsyncApexJob Where Id = :BC.getJobId()];         // Send an email to the Apex job's submitter notifying of job completion.         Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();         String[] toAddresses = new String[] {a.CreatedBy.Email};         mail.setToAddresses(toAddresses);         mail.setSubject('Add to Campaign ' + a.Status);         String campaignURL = URL.getSalesforceBaseUrl().toExternalForm() + '/' + campaignId;         mail.setPlainTextBody('The batch Apex job processed ' + a.TotalJobItems + ' batches with '+ a.NumberOfErrors + ' failures. ' + 'Link to Campaign: ' + campaignURL);         Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });     } }   Test Class  @isTest public class BatchAddToCampaignTest {     static testMethod void testMethod1()     {         List&lt;Lead&gt; lstCM= new List&lt;Lead&gt;();         for(Integer i=0 ;i &lt;1;i++){             Lead myLead = new Lead();             myLead.Id = '00Q1U00000KqFcDUAV';             lstCM.add(myLead);             Integer collSize = lstCM.size();              System.debug('List Collection Size is ' + collSize);                 {                  System.debug('Start Set');                 Set&lt;Id&gt; leadIds = (new Map&lt;Id,SObject&gt;(lstCM)).keySet();                 System.debug('End Set');                 Integer collSizeSet = leadIds.size();                  System.debug('Set Collection Size is ' + collSizeSet);                 Id workingCampaignId = '7011U000000RWRAQA4';                  Test.startTest();                  //BatchAddToCampaign ba = new BatchAddToCampaign(workingCampaignId, leadIds);                 DataBase.executeBatch(new BatchAddToCampaign(workingCampaignId, leadIds));                  Test.stopTest();                   }             }      } }
112290
This code throws a NullReferenceException when it calls ExecuteScalar:  selectedPassengerID = 0;  //SqlCommand command = GenericDataAccess.CreateCommand();   // 2nd test string connectionString = ""; SqlConnection conn;  connectionString = ConfigurationManager.     ConnectionStrings["ConnST-MHM"].ConnectionString; conn = new SqlConnection(connectionString); SqlCommand command = new SqlCommand(); command.CommandType = CommandType.StoredProcedure ; command.Connection = conn; command.CommandText = "SearchForPassenger";  SqlParameter param;  param = command.CreateParameter(); param.ParameterName = "@name"; param.Value = pName; // Session[""]; param.DbType = DbType.String; command.Parameters.Add(param);  param = command.CreateParameter(); param.ParameterName = "@flightDate"; param.Value = date;  param.DbType = DbType.String; command.Parameters.Add(param);  param = command.CreateParameter(); param.ParameterName = "@ticketNo"; param.Value = ticketNumber;  param.DbType = DbType.Int32; command.Parameters.Add(param);  int item;  command.Connection.Open(); item = (int)command.ExecuteScalar();
38112
Here's the scenario...    if (entry.Properties["something"].Value != null)   attribs.something = entry.Properties["something"].Value.ToString();   While effective and working correctly, this looks ugly to me.  If I don't check for a null before performing the ToString() then it throws an exception if the property was null.  Is there a better way to handle this scenario?  Much appreciated!
8114
I have same exception can please   The previous post issue is resolved.  Exception: :System.CalloutException: You have uncommitted work pending. Please commit or rollback before calling out  Visualforce Page   &lt;apex:page controller="Controller" action="{!init}" showHeader="false" sidebar="false"&gt;     &lt;center&gt;         &lt;apex:pageBlock title="Request Listener"&gt;&lt;/apex:pageBlock&gt;               &lt;/center&gt; &lt;/apex:page&gt;   Controller :            PUBLIC with sharing class Controller {        PUBLIC String fromNumber      = ApexPages.currentPage().getParameters().get('From');     PUBLIC String toNumber        = ApexPages.currentPage().getParameters().get('To');     PUBLIC String body            = ApexPages.currentPage().getParameters().get('Body');        PUBLIC PageReference init()     {                    System.debug('From Phone Number :' +fromNumber);         System.debug('To phone NUmber :' + toNumber);         System.debug('Message Body :' + body);          TwilioRestClient Client = TwilioAPI.getDefaultClient();                                                                SYSTEM.DEBUG('FROM AND To  Number is NOT NULL');                      String formattedNumber='+919876543210';                 IF(body != NULL)                 body = body;             ELSE                 body = '';             Case c = NEW Case (Subject = formattedNumber,Description = body,Origin = 'Phone');             INSERT c;                               Map&lt;String,String&gt; params1 = new Map&lt;String,String&gt;             {                'To'   =&gt; fromNumber,                'From' =&gt; '+1908280****',                'Body' =&gt; 'Conformation to customer'             };             TwilioMessage message = client.getAccount().getMessages().create(params1); /* Valid conformation SMS sent to the Customer.*/                                            return null ;     } }   While loin as admin then click preview on visualforce page executed but case is not created.I have checked the the debug log it throw the exception.
98616
I can hookup to AppDomain.CurrentDomain.UnhandledException to log exceptions from background threads, but how do I prevent them terminating the runtime?
8224
Since many users are facing the NullReferenceException: Object reference not set to an instance of an object error in Unity, I thought that it would be a good idea to gather from multiple source some explanation and ways to fix this error.  Symptoms I am getting the error below appearing in my console, what does it mean and how do I fix it?  NullReferenceException: Object reference not set to an instance of an object
94655
I was experimenting with C++ and found the below code as very strange.   class Foo{ public:     virtual void say_virtual_hi(){         std::cout &lt;&lt; "Virtual Hi";     }      void say_hi()     {         std::cout &lt;&lt; "Hi";     } };  int main(int argc, char** argv) {     Foo* foo = 0;     foo-&gt;say_hi(); // works well     foo-&gt;say_virtual_hi(); // will crash the app     return 0; }   I know that the virtual method call crashes because it requires a vtable lookup and can only work with valid objects.   I have the following questions    How does the non virtual method say_hi work on a NULL pointer? Where does the object foo get allocated?   Any thoughts?
4404
Im getting above error when i was trying to run my test class. In my test class i will create an Account, Contact. And this contact id will be used in my original code to create Community user.  I noticed following help article from SFDC. But couldn't figure out how to achieve.   Here they asked to create User on the Test class and Runas this user. But in my case, the community user will be created in the code. Please share any thoughts.  Here is the detailed exception,     System.DmlException: Insert failed. First exception on row 0; first   error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, caused by:   System.DmlException: Insert failed. First exception on row 11; first   error: UNKNOWN_EXCEPTION, portal account owner must have a role: []
18034
when i try to save the following code, i got the error below. Following same instructions given in this link, but still errors. Am i doing anything wrong here? please suggest.    @isTest private class WebSvcCalloutTest {     @isTest static void testEchoString() {         Account a = new Account(name='Tester',SAP_KUNNR__c='1172');         insert a;                       // This causes a fake response to be generated         Test.setMock(WebServiceMock.class, new WebServiceMockImpl());      } }   Error:  Save error: Method does not exist or incorrect signature: Test.setMock(Type, WebServiceMockImpl)    WebSvcCalloutTest.cls         @isTest global class WebServiceMockImpl implements WebServiceMock {    global void doInvoke(            Object stub,            Object request,            Map&lt;String, Object&gt; response,            String endpoint,            String soapAction,            String requestName,            String responseNS,            String responseName,            String responseType) {          sapComDocumentSapSoapFunctionsMcS.Z_GSSMWFM_HNDL_EVNTRQST00 sap1 = new sapComDocumentSapSoapFunctionsMcS.Z_GSSMWFM_HNDL_EVNTRQST00();                Map&lt;String,String&gt; mapSAP = new Map&lt;String,String&gt; {};         sapComDocumentSapSoapFunctionsMcS.ZgssmbstDatarcrd01 req = new sapComDocumentSapSoapFunctionsMcS.ZgssmbstDatarcrd01();               sapComDocumentSapSoapFunctionsMcS.ZGssmwfmHndlEvntrqst00Response_element ret =  sap1.ZGssmwfmHndlEvntrqst00('',req);         response.put('response_x', ret);     } }