Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [apex-webservice]

The tag has no usage guidance.

0
votes
0answers
12 views

STATUS_CODE returned for the response: 403 STATUS_MESSAGE returned for the response: Forbidden

Can someone please guide me how to resolve the access forbidden 403 status code error ? What can i do to at least hit the end point? I am executing the code anonymously in developer console string ...
2
votes
0answers
12 views

Outbound messaging, one org to another, can I reference in Apex, the class referred to by the Notifications element in the Outbound Messaging WSDL

I am trying to receive an outbound message sent from a workflow in one Salesforce org, using a SOAP webservice method in another Salesforce org. This would be a nice-to-have, if I can't get this ...
0
votes
3answers
170 views

How to send Post request to Rest API with XML data

I have created a rest API(apex class) in Salesforce. I have multiple nested tags in xml that comes via API request. I am wondering how do I define my post method in apex that could handle the request. ...
0
votes
1answer
43 views

How to Retrieve large data from Salesforce using Rest API?

I have one new requirement where My client wants to retrieve large data set (~80K records) from Salesforce daily. I have created rest web service but it returns only 2k records. for 80k records, do ...
1
vote
1answer
82 views

Understanding authentication for Apex SOAP web service

I have read this post: How authentication works in APEX and since the SF documentation is a bit confusing for me at this point I would like to ask: Is it possible to get the session id with a ...
0
votes
1answer
63 views

Apex Callout HTTP POST with Named Credentials error [closed]

I am constructing something wrong, in the POST request. Please advise. Step 1: Created Named Credential called Stock_Check_For_Materials Step 2: Created Apex Controller as below Continuation con = ...
0
votes
1answer
30 views

SOAP Web Service Method for two top level nodes

I have a client who needs a web service method for a 3rd party to send a SOAP call to. But this soap call has two top level nodes in the body. <body> <blockOne> <data> ...
0
votes
0answers
28 views

How to retrieve files from an external server

I'm not at all that familiar with web service, but we do have this requirement in which, once a month, we need to retrieve some pdf files from a folder in an external server, and then attach them to ...
0
votes
0answers
27 views

Authenticated Callout to Webservice using SSO

We are facing the following problem. We need to make webservice callout through Mulesoft in a way the user is making the call is not a service user, but the logged one: Both Salesforce and ...
0
votes
1answer
37 views

Rest API Response - Break Address into multiple fields

I am working on an assignment where we enabled an external system to search for contacts in Salesforce based on lastName, firstName, BirthDate. I have developed a webservice which queries the Contact ...
0
votes
1answer
53 views

“Element invalid at this location” error in call to Apex web service

I am getting SessionID invalid after taking session id from visualforce page using {!$Api.Session_ID} I am getting the below response from workbench Element {https://soap.sforce.com/schemas/class/...
2
votes
0answers
44 views

Apex SOAP WebService - how to suppress/alter accepted header

I am working with a 3rd party on SOAP integration, and they send a detailed async fault response to any POST done by us. The data they send is rigid and they say they cannot (or won't) change it. I ...
0
votes
0answers
23 views

How to use the Site class outside of the context of 'Lightning Platform sites'

I am currently creating a webservice to integrate an external website to our salesforce instance. This webservice should create a new portal account user and return the id back to the calling code. I'...
2
votes
0answers
148 views

Salesforce API Integration with External Applications [closed]

What is the best way to get external Application's data on a regular interval, let's say the application am integrating has 10+ API's, all the API's data have chances of getting added/updated over ...
0
votes
2answers
676 views

How to stop Read Timed Out

So I have run a apex class that makes a callout to a external application. So I triggered the callout in SFDC and I have gotten hundreds of System Exception Read Timed Out emails. I have went to ...
-3
votes
1answer
71 views

Salesforce webservice [closed]

I developed a custom web service using Soap . The web service is supposed to send 1900+ records which satisfied the conditions in integration. When tested it only sent 1400 records and remaining are ...
1
vote
1answer
216 views

Accessing a Webservice Apex Method via SOAP-UI

So I have created a simple webservice apex class that follows the second example for webservice on this link: https://developer.salesforce.com/page/Apex_Web_Services_and_Callouts#Apex_Web_Services ...
0
votes
1answer
536 views

How to consume external webservice

I got the requirement where I need to consume the WSDL from Workday and create/update contact records in Salesforce. Can someone of you please assist me in how to utilize a WSDL from Workday into apex....
0
votes
1answer
365 views

Webservice @httpPost method authentication

Quick response on this would be helpful. I'm able to send request body from Workbench as source to my org as destination for creation of records. But what i need is how to perform the same operation ...
0
votes
1answer
167 views

The request failed with HTTP status 400: TLS 1.1 or higher required

I'm getting an error"The request failed with HTTP status 400: TLS 1.1 or higher required." on "Add Web Reference" asp.net window. Pls, help me out this.
1
vote
1answer
60 views

Inserting a record after reading XML sent by external app

External app will send XML in their request to salesforce webservice class and webservice class will have to insert a object record.I have written a webservice and it is able to get the xml in string ...
0
votes
0answers
54 views

Map key null when using getContentAsPDF() method

I have a Visualforce page that is used to generate a PDF document by our users. Recently we started experimenting with the Community License, and I'm facing an unusual error with this user. The ...
1
vote
1answer
376 views

External Data source through apex custom adapter

I want to connect the external database from salesforce. I have developed the custom adapter (DataSource.Connection class and DataSource.Provider class). In connection class, Sync method is working ...
0
votes
1answer
2k views

how to get the session Id for web service calls to salesforce

I have implemented a web service in salesforce and generated the WSDL for the web service and provided it to the external system. However while invoking a call, we need to pass the session id in teh ...
0
votes
1answer
64 views

Loading a file form sftp location into salesforce

I am working on a scenario where the file needs to be picked up from a SFTP server and loaded into salesforce. Can salesforce web service pick up a file from sftp location and load it into salesforce?...
2
votes
1answer
1k views

Authentication for custom Apex SOAP web service

I am in the process of creating a custom SOAP apex web service using webservice keyword so that external system can call this apex web service. I am not using Apex REST. From the class I can create ...
1
vote
1answer
567 views

Salesforce WeChat integration

I am relatively new to Salesforce Service console and want to integrate WeChat in Service console. If the mobile number linked to the contact is registered on we chat , I need to able to send messages ...
4
votes
1answer
387 views

How can I deprecate/remove a webservice method/class in a Managed Package?

We have completely changed the way a managed package operates and no longer want a legacy global webservice method. I don't want it to be included in future packages/installs. However, I can't seem to ...
0
votes
1answer
33 views

Checking Users credentials against AD while they are logged in

I am looking to get some suggestions on the best solution for following requirement. Any help will be appreciated. Requirement is to capture user's name using their AD credentials (they will be ...
0
votes
1answer
205 views

Execution of Javascript inside a Custom Button is deferred till the end of function

We display inside a tab in the Sales Console a custom object page layout with a custom Javascript button. Once the user clicks on that button, the custom code performs some operations on a Salesforce ...
2
votes
0answers
2k views

Trailhead Data Integration Specialist Superbadge || Test Class is Failing

I wrote the below test classes - @isTest global class ProjectCalloutServiceMock implements HttpCalloutMock{ global HttpResponse respond(HttpRequest req){ System.Debug('--++-- Inside ...
0
votes
2answers
1k views

Need build webhooks in Saleforce to recieve third party server alerts

I need some guidance/code snippet in developing a webhooks in Salesforce to receive alerts from third party server. Requirements. In our case, Insideview will send alerts to Salesforce whenever they ...
0
votes
1answer
152 views

Display status as Failure in the response of http post method

Need help in catching error message and displaying status as failure in the response, when id is not generated. Apex Code : @HttpPost global static List<SamplesResponse> doPost() { ...
0
votes
1answer
49 views

Code isn't working for a list in the post method? [closed]

What are the changes to be performed to send the list of json's, currently its working only for 1 account record. looking for the list of json as a body to pass it to salesforce. Code: @...
2
votes
3answers
242 views

Rollback changes after future Webservice call in after trigger

We are working on one web-service call in after trigger. As we can not call synchronous web-service call in trigger, we are using future call-out. But we want to rollback the changes if web-service ...
0
votes
1answer
597 views

How to read XML data in salesforce?

I get data in XML from a web service from a connector URL, the xml contains data about people, now I have to read the names, emailids from that xml and compare with my org's contacts and so some ...
0
votes
2answers
2k views

how to pass JSON with Array,String [duplicate]

@RestResource(urlMapping='/v/restAPIKeyGeneration/*') global with sharing class APIforKeyGeneration{ global class Account{ public String sname; public String bp; } @...
0
votes
1answer
593 views

How to call an Apex WebService from an External System

I'm trying to build a webservice that will expose the ability to input data from an external system into salesforce. I've found multiple resources on making a webservice. I can't however find how to ...
0
votes
2answers
75 views

Getting null pointer exception in webservice class?

I am getting System.NullPointerException: Attempt to de-reference a null object Class.exposewsdl.getCaseDetailsFromcsNum: line 47, column 1 global class exposewsdl{ global class ...
0
votes
1answer
975 views

How to return fields to webservice response?

When the user enters his name from third party application, The user needs to get all the records(Account(name,Phone,email),Contact(firstname,Lastname),Lead(email,mobile number)) matching the text ...
1
vote
1answer
364 views

How to display list values in webservice class?

When the user enters his name from third party application, The user needs to get all the records(Account,Contact,Lead) matching the text entered by him. I have used sosl for this purpose.But I cant ...
2
votes
1answer
1k views

pass set of IDs from javascript button to a web service

I need to create a custom button on the list view of a custom object. When user selects multiple records on the list view and I need to send those record IDs to be processed by a batch process (I ...
1
vote
0answers
87 views

Web Service method over loading or default parameters

I have a web service method to load invoices into Salesforce for product type A and I am trying to modify the same method for product type B invoices. However the Product type B has couple more ...
1
vote
1answer
469 views

WebService callout failed

This Error is coming. I am wondering what could be the possible issue. I have given permission to the objects. Web service callout failed: WebService returned a SOAP Fault: INSUFFICIENT_ACCESS: ...
0
votes
1answer
252 views

What is difference between REST and SOAP Services [duplicate]

I am not able to get basic or the in depth difference, I think both are used for the same purpose so why there are two terms, I am very new to this so can anybody help me clear out the functionality ...
1
vote
0answers
131 views

Debug Logs Explanation

I'm trying to understand the debug logs Salesforce provides. There are actually two duration(in ms) for every webservice called. One at the top One at the bottom giving up split up method wise The ...
1
vote
0answers
212 views

Command button action generate dynamic CSV File and Upload into DropBox Account?

Hi All, When End User Click the Command button need to genearte the dynamic CSV File using apex and uploading into Drop Box account. Hereby my code as follows, public class ...
1
vote
1answer
249 views

Calling web service from salesforce to salesforce by using session id

I am trying to achieve to call webservice from force.com sites to salesforce providing sessionid such that i will be able to do that logic using that user see below web service global class ...
0
votes
0answers
353 views

How to handle multi callout in test class?

I have webservice class which have multi callout.For the first callout i have some list of URl's.From the list of URL's I want to do the second callout and so on. apexCode: global with sharing class ...
2
votes
2answers
350 views

Test Class Failures “Methods defined as TestMethod do not support Web service callouts” For Custom Button

I have a custom button that calls an apex class - and per this tutorial the class is a "Web Service" (but not in the classic sense). 5 days ago in production the test class (and 21 others) started to ...