Questions tagged [apex-webservice]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
7
votes
2answers
1k views

Print/Debug Raw SOAP Request Including Headers with Apex Webservice

Is there any way to print the raw SOAP request for apex webservices? We have a web service that is used by a number of external providers and are putting a proxy in place that will perform some ...
4
votes
1answer
412 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 ...
4
votes
1answer
990 views

WebServiceCallout (wsdl2apex)

good day! We have a system that consumes webservice in SAP. Due to the complexity of webservice structure that SF is invoking in SAP, we use the tool wsdl2apex to generate stub classes. Basically, ...
4
votes
1answer
3k views

Testing custom apex webservice with SOAP UI

I'm new to using SOAP UI tool. I've created a very simple apex webservice which returns just list of Account records. Issue is : when I generate WSDL for above class and consume it in SOAP UI, I'm ...
3
votes
2answers
397 views

Salesforce - Maximum simultaneous requests callout limit

Salesforce says Maximum simultaneous requests to URLs with the same host for a callout request is 20 Statement is very simple to read but it is not very clear as to what it means. Can anyone ...
3
votes
1answer
83 views

How to generalize Integration components in Managed Packages

I am creating a managed package with a connected App to integrate with an external system( oAuth configured). The external system uses my developer organization's Consumer key and secret right now to ...
3
votes
0answers
408 views

tooling API workflow alert update

i am trying to update workflow alert email template using tooling api. REST AND PATCH . JSON body is below {"Metadata":{"ccEmails":["test@gmail.com"], "description":"...
2
votes
3answers
275 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 ...
2
votes
1answer
1k views

Salesforce webservice API Input parameter limit

I have requirement to expose Apex Class method as SOAP type webservice API which has more than 50 fields (input parameters) but when I try to save my code its giving me compilation error saying '...
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 ...
2
votes
1answer
2k 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 ...
2
votes
2answers
366 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 ...
2
votes
1answer
40 views

Reg : Sending Response for insert records

i wrote a rest service i am inserting 2 fields if i get any null value for any field i have to send the JSON response to the third party server can any one suggest me where i have to change my service ...
2
votes
2answers
305 views

Salesforce: APEX Test Class for Web Service

I've created a basic frontend that dips into my force.com data by way of a Public Guest User and a webservice call. Essentially, the code is requesting the Rate (aka cost) of various items that a user ...
2
votes
1answer
814 views

Salesforce apex Inbound SOAP web service response

My requirement is that I have to create an inbound SOAP web service which will return a list of data based on the input parameters. I am using wrapper classes to build the output. global class ...
2
votes
0answers
22 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 ...
2
votes
0answers
50 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 ...
2
votes
0answers
173 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 ...
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 ...
2
votes
0answers
48 views

Restricting API access to custom webservice

Is it possible to give a 3rd party application access to a custom webservice without giving them access to the standard API? To give a little background on my project. Users will use their ...
2
votes
0answers
39 views

Bundle VF page with public sites in AppExchange Managed Package

We have a requirement for an AppExchange product. We plan to bundle the Salesforce functionality as managed package and some part of the requirements as a secure but public widget that can be ...
2
votes
0answers
524 views

Can I solve the UNABLE TO LOCK ROW error with FOR UPDATE in this spot?

First of all, i've read most other posts about this error. The problem i have here is the code that was written in my org is using an UPSERT so don't see the spot where i can use the FOR UPDATE to ...
2
votes
1answer
2k views

Issue with Adding reference Webservice WSDL to VS2010

I have generated a WSDL for an Apex webservice i have created and trying to call it from a webpage in VS2010. After adding this as reference i am getting the following error Error 1 Unable to ...
1
vote
1answer
130 views

Getting System.CalloutException: You have uncommitted work pending [closed]

I am getting an exception of System.CalloutException: You have uncommitted work pending. Detail of the Exception is given Below: Exception: :System.CalloutException: You have uncommitted work ...
1
vote
1answer
149 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 ...
1
vote
1answer
187 views

Is the data exchange with a https endpoint, encrypted?

I am developing in Salesforce an app, that communicates with a bunch of web services in Heroku. Till here, every thing is fine, but now we want to be sure that the data that we exchange is encrypted, ...
1
vote
1answer
262 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 ...
1
vote
1answer
393 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 ...
1
vote
1answer
174 views

change JSON array to normal form

I have the below JSON POST callout class. The data is sent in an array format whereas the destination requires it in just normal format. please suggest to remove the array in this code an execute in ...
1
vote
2answers
2k views

Exposing class as webservice

For an example I have a webservice class as shown below .This should be exposed to one of the portal. This portal is having a callbackurl to configure.That means this portal is going to hit my ...
1
vote
1answer
486 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 ...
1
vote
1answer
313 views

Session Id invalid but Refresh Token Policy is set to Refresh token is valid until revoked

I am getting the access_token using Username-Password OAuth Authentication Flow. When I create the connected app in Salesforce to get the client Id and consumer Key I set Refresh Token Policy to ...
1
vote
1answer
1k views

salesforce web service call another web service

I have 2 questions Can salesforce webservice call another web service? If yes does the webserice needs to be marked as future method? Can I Call static salesforce webservice from trigger how does ...
1
vote
1answer
7k views

Extra Backslash in Json String when exposing webservice

I am creating a middle ware in Salesforce. The external System1 calls my SFDC org and I call external system2 from SFDC in turn. The external system2 gives me Json string like {"Car":"Fiat","Model":"...
1
vote
1answer
1k views

Getting desired XML Structure using Apex Webservice

I have a inbound webservice written in Apex. When I am generating the WSDL file and validating the Request XML format I see a flat XML structure. This is not what am expecting. I would like to have ...
1
vote
1answer
488 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: ...
1
vote
3answers
2k views

Insert/Update multiple records in salesforce using webservice

What are the possible way by which external system can insert/update multiple records in salesforce without writing any apex webservice. If webservice is required how it can be implemented. Please ...
1
vote
1answer
1k views

How to put information into SOAP envelope header <env: Header/>

Is it possible to add headers to the xml? We can add http headers, but we need to add information to the envelope header. We are using wsdl2apex and following the documentation here: https://...
1
vote
1answer
2k views

System.LimitException: Apex CPU time limit exceeded error in web service

I have a webservice exposed in SFDC. SFDC will receive account records from external system. Based on the accounts received, its parent and child will be updated. It works fine. However when 1000 or ...
1
vote
1answer
66 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 ...
1
vote
1answer
665 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 ...
1
vote
0answers
89 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
0answers
142 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
230 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
253 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 ...
1
vote
0answers
2k views

Getting Unable to parse callout response. Apex type not found for element EMPLOYEE_ID while calling WSDL method

I have got a WSDL file and i have generated respective classes from provided WSDL using Apex -> Generate from WSDL functionality. Sub has been generated without any issue. I have wrote a class to ...
1
vote
0answers
162 views

Return Bulk data using webService

I am writing a SOAP WS in salesforce to return data from multiple objects global class TXLIDAWS { webservice static List<DataWrapper> GettxlidaData(){ List<DataWrapper> ...
1
vote
0answers
291 views

Mass/Bulk Update Campaign Member Status Over 200

I am looking to update all of the related Campaign Members' Statuses from a Campaign based on the execution of a JavaScript button and an APEX Class. The button below works to update the status from '...
1
vote
2answers
455 views

Salesforce record and attachement export to ftp folder

I want to export record(Contact) with image(attachment ) into ftp folder. The export format for record are excel, xml and txt. Image in the form of jpeg. Each record should have separate file. For ...
1
vote
1answer
485 views

Accessing Public Variables within Webservice

I'm having some trouble with what I thought would turn out to be a simple form built upon a custom visualforce page. The back story here is that I need to display a dynamic number of records to a ...