Questions tagged [apex-webservice]

The tag has no usage guidance.

1
vote
3answers
1k 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 ...
3
votes
2answers
371 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 ...
0
votes
1answer
147 views

Can we use access token or refresh token as a session id for WebService Callout?

there it is mentioned I want to use sessionID for MetadataService call from an org to other org. I have the other org access token and refresh token both. I tried to use access token, but got the ...
-5
votes
3answers
1k views

How to write test class for websevice?

Recently i have written a test class for Webservice.i got 79% .But the test class failed. And the error is "Methods defined as Test Method do not support Web service callouts ". how to resolve this ...
1
vote
1answer
125 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 ...
0
votes
1answer
27 views

Regd WebService to Salesforce

We're developing web-service class for inbound integration . Just curious to know, What we've to provide, besides WSDL(generated from web service class and Enterprise WSDL for authentication), to ...
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 ...
4
votes
1answer
936 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, ...
1
vote
1answer
293 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 ...
0
votes
1answer
95 views

How will external system invoke SFDC and pass parameter so that I can update that field in Custom Object?

My requirement is whenever in external system , if Template Id changes , then I need to update in SFDC custom setting. Can anyone help me how to generate Webservice class for this so that they can ...
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
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 ...
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 ...
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 ...
-2
votes
1answer
193 views

Extracting binary char in a webservice response

I am actually facing a problem with apex webservice response interpretation. In my response i have a mixture of string and binary data. I need only the binary part and discard all the rest, but I need ...
2
votes
2answers
294 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 ...
1
vote
1answer
982 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 ...
0
votes
1answer
341 views

Basic Web service execution

I am new Salesforce. I've a requirement you call an external Java Web service from apex using SOAP. JAVA developers has provided their Wsdl which is supposed to be used in Salesforce to generate apex ...
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
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
6k 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
0answers
158 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> ...
2
votes
1answer
789 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
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 '...
1
vote
1answer
166 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 ...
2
votes
0answers
511 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 ...
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
0answers
282 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
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
2answers
441 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 ...
0
votes
1answer
945 views

Data Access restrictions to Salesforce objects via Apex Web Service

I'm going through this article : https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_web_services_methods_exposing.htm Have few questions regarding access to field/objects/record by ...
3
votes
0answers
375 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":"...
3
votes
1answer
81 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 ...
1
vote
1answer
479 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 ...
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 ...
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 ...
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 ...