You need to sign in to do that
Don't have an account?
Apex SOAP Web Service Error - 501 Labs
Hello All,
I am trying to complete this lab (8-1 Creating a Custom SOAP Web Service) from 501 Labs.
When I did this with the assigned org during our training, I did not have any issues.
When I tried doing the same exercise in my own developer edition I am seeing this error.
Objective of the exercise : To allow insertion of job candidate and application via webservice API.In this the webservice is called from a VF page.
webservice name =
CandidateKeyWebService
and it has a method called "submitEmployeeReferral"
This is the contents from the pop up window
=========
AJAX Toolkit Shell
Features: autocompletion of property names with Tab, multiline input with Shift+Enter, input history with Up/Down Values and functions: ans, print(string), props(object), blink(node), clear(), load(scriptURL), scope(object)
Request: server- /services/Soap/package/CandidateKeyWebService
<textarea cols=80 rows=5 wrap=hard><se:Envelope xmlns:se="http://schemas.xmlsoap.org/soap/envelope/"><se:Header xmlns:sfns="http://soap.sforce.com/schemas/package/CandidateKeyWebService"><sfns:SessionHeader><sessionId>00D90000000qFRD!AREAQMLtrkAQzPhCsf_KMIB5rE5rnPPap0YFtJyDdsz_3GcQs_fom5q7dGXJyBdG1TGaMY83V7CI0.gU.93nw49Bdt5hDKnx</sessionId></sfns:SessionHeader></se:Header><se:Body><submitEmployeeReferral xmlns="http://soap.sforce.com/schemas/package/CandidateKeyWebService"><a>a009000000PLJx8AAH</a><b><type>Candidate__c</type><First_Name__c>a</First_Name__c><Last_Name__c>b</Last_Name__c><Phone__c></Phone__c><Mobile__c></Mobile__c><Email__c>a@a.com</Email__c></b></submitEmployeeReferral></se:Body></se:Envelope></textarea>
Response : status - 500
<textarea cols=80 rows=5 wrap=hard><?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><soapenv:Fault><faultcode>soapenv:Client</faultcode><faultstring>No such parameter a defined for the operation, please check the WSDL for the service.</faultstring></soapenv:Fault></soapenv:Body></soapenv:Envelope></textarea>
faultcode soapenv:Client
faultstring No such parameter a defined for the operation, please check the WSDL for the service.
====================
Q : I am new to webservices debugging etc and since this error did not come during our training, I am at a loss to understand where and how to start debugging.
Can someone point me out in a right direction or give me a clue as to what could be wrong ?
Hi Nurav
That's because the call to the web service from your VF page is not using the right parameters.
If you open up your VF page, look for the function called save, you have this line
you will need to change the a and b so that they match what's defined in your webservice method's signature, that is, if your submitEmployeeReferral has this signature:
then your call to the web service needs to look like this:
That fixes the problem for me.
King
All Answers
Hi Nurav
That's because the call to the web service from your VF page is not using the right parameters.
If you open up your VF page, look for the function called save, you have this line
you will need to change the a and b so that they match what's defined in your webservice method's signature, that is, if your submitEmployeeReferral has this signature:
then your call to the web service needs to look like this:
That fixes the problem for me.
King