You need to sign in to do that
Don't have an account?
Web service execution error
I drew a small webservice out of my dev org and consumed it into another ...It doesnt have login method so i also drew a second enterprise type wsdl and consumed it also into the other dev org ..So the login problem got sorted as i can see my debug log, but my method gives me null poiter dereferencing error "System.NullPointerException: Attempt to de-reference a null object "
My method goes like this and its written in future method ...
enterpriseSoapSforceCom.LoginResult lr= new enterpriseSoapSforceCom.LoginResult(); enterpriseSoapSforceCom.Soap Esoap= new enterpriseSoapSforceCom.Soap(); // try // { lr=Esoap.login(username,password); //lr.serverUrl; //lr.sessionId; system.debug('lr.userId'+lr.userId); system.debug('lr.sessionId'+lr.sessionId); system.debug('lr.userId'+lr.userId); //MYWebservice34.SessionHeader_element sh = new MYWebservice34.SessionHeader_element(); //sh.sessionId=lr.sessionId; // String authEndPoint = Esoap.Url; // } // catch (SoapException e) // { // Console.WriteLine('An unexpected error has occurred: ' + e.Message + '\n' + e.StackTrace); // } soapSforceComSchemasClassMywebservi.Account myass= new soapSforceComSchemasClassMywebservi.Account(); Account a=[Select BillingCity,Name,BillingCountry,BillingPostalCode,BillingStreet,Phone,Site from Account where id=:aa Limit 1]; //soapSforceComSchemasClassMywebservi.BillingCity=a.BillingCity; myass.Name=a.Name; //myass.BillingCountry=a.BillingCountry; //myass.BillingPostalCode=a.BillingPostalCode; //myass.BillingStreet=a.BillingStreet; //myass.Phone=a.Phone; //myass.Site=a.Site; soapSforceComSchemasClassMywebservi.MyWebService Serv=new soapSforceComSchemasClassMywebservi.MyWebService (); Serv.SessionHeader.sessionId=lr.sessionId; Serv.makeContact('Rick',myass); //error occurs here ....
Help needed ....
What could be possible reason .....
Code of my webservice is this ....
global class MyWebService { webService static Id makeContact(String lastName, Account a) { Contact c = new Contact(lastName = 'Weissman',firstname = a.Name); insert c; return c.id; } }
It simply receives a string and an account which i am sending from the other org as given above ..
Thanks
anyone from integration.....
http://wiki.developerforce.com/page/An_Introduction_to_Salesforce_to_Salesforce
That i am already done with , but to know integration to some differenct vertical i m doing this ...
http://stackoverflow.com/questions/12456222/adding-login-function-in-custom-salesforce-webservice/17922993#17922993
this guy has done this but dont know how ...I am trying the same
Hi VBS any solution ???......If you have reached upon ,, and I really dont got your funda of exposing classes via sites, I am not doing anything regarding sites ......I hope u have got my exact problem as described above .....If any more questions and any kind of help u need i am available ....
Regards
Abhishek