Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs
11 votes
Accepted

Use cases for Enterprise WSDL vs Partner WSDL

A critical difference between the two is how change is handled i.e. what needs to be done when the org the WSDLs are generated from's structure changes - when new fields and objects being added. In ...
Keith C's user avatar
  • 136k
8 votes
Accepted

sObject type 'Pricebook2__c' is not supported

It's hard to tell what data you're even working with, but the standard object name is simply Pricebook2 (no underscores). If you are trying to insert a record looking up to this object (such as ...
Adrian Larson's user avatar
  • 150k
6 votes

@future method vs Async callout

The Async class is intended to be used in a continuation. See Make Long-Running Callouts from a Visualforce Page Basically, a continuation will provide a callback mechanism so that when the async ...
Daniel Ballinger's user avatar
4 votes

What is use of Apex WSDL used for (Setup->API>Generating the WSDL File)?

it seems like most of operation this WSDL offer are already there on Tooling WSDL then why they have created Apex WSDL? It is actually the other way round. Partner/Apex SOAP API predates Tooling API....
gaiser's user avatar
  • 1,370
4 votes
Accepted

What is the meaning of array elements of *type_info variables in SOAP / WSDL auto-generated Apex classes?

The details are fairly well covered in What are the parameters for the Salesforce WebServiceCallout.invoke method? From Jeremy's answer: If the variable represents another XML element or a text node, ...
Daniel Ballinger's user avatar
3 votes
Accepted

Apex callout exception when making hitting an external Service

The reason for this erro was , I was passing the username and password in the wrong way in Http header like below: sample.inputHttpHeaders_x = new Map<String, String>(); sample....
SfdcBat's user avatar
  • 4,811
3 votes
Accepted

How to communicate with Salesforce without WSDL?

It sounds like you are using the Enterprise WSDL. This is a strongly typed WSDL that is bound to the Salesforce configuration/schema at the time it was generated. On the plus side, it gives you easy ...
Daniel Ballinger's user avatar
3 votes

How to make a SOAP call using APEX Class?

If your WSDL is proving to be problematic with the built in wsdl2apex implementation that Salesforce provides you could also try the version they make available via GitHub. Another alternative is the ...
Daniel Ballinger's user avatar
3 votes
Accepted

How to setup Tooling Api in Java Application?

Only the Enterprise API is Org specific. The Tooling API will work with any org providing the user has API access. In addition to API access the user making the API calls may require additional ...
Daniel Ballinger's user avatar
3 votes
Accepted

Enterprise WSDL and polymorphism

This is the in-variant vs co-variant scenario on Generic Lists. See Covariance and Contravariance in Generics. That's the computer science explanation, but I find an example easier to work through. ...
Daniel Ballinger's user avatar
3 votes

If we change the parameters used in webservice method in our org., will this cause error at end user consuming old WSDL?

Yes, Some WSDL has strictly typed XML validators, you change a single thing and hell break loose. It will break as it won't find the exact match for a method with exact parameters, it would just break ...
Pranay Jaiswal's user avatar
3 votes
Accepted

Types of wsdl in salesforce

Salesforce provide 2 types of WSDL. They are Enterprise and Partner. Enterprise WSDL The Enterprise WSDL is strongly typed. The Enterprise WSDL is tied (bound) to a specific configuration of ...
Tushar Sharma's user avatar
3 votes
Accepted

Script Too Large Error While Generating Apex Classes Using Metadata WSDL

When I've wanted to invoke this API from Apex in the past I have used this already generated and modified code: Apex Wrapper Salesforce Metadata API though it looks like it hasn't have much ...
Keith C's user avatar
  • 136k
3 votes
Accepted

What's the most efficient way to generate XML using apex?

Any Apex code will fail because of governor limits if the volume of data is open ended. Some problems can be solved in Apex if the data can be broken up into determinate sized chunks and worked on in ...
Keith C's user avatar
  • 136k
2 votes

Salesforce Wsdl not valid any more

Actually, it is a bug. It's due to the fact that the ListViewRecord object only has a single elements, "columns", which is a collection of ListViewRecordColumn objects. .NET reads the WSDL, but skips ...
Craig Brunetti's user avatar
2 votes
Accepted

Install WSDL in Salesforce?

Setup -> Develop -> Apex -> Generate from WSDL https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_callouts_wsdl2apex.htm A quick google search yields the official ...
Eric's user avatar
  • 54.2k
2 votes

Best practice for apex code to create XML that matches WSDL/XSD

I went down the path of using Dom.Document and Dom.XmlNode to generate and parse the XML in Apex. Why? I'm glad you asked :) It gave me a consistent object based approach for both generating and ...
Daniel Ballinger's user avatar
2 votes
Accepted

Best practice for apex code to create XML that matches WSDL/XSD

If you don't actually need to see the raw XML output along the way, then WSDL2Apex generated code is by far the best way to go. If you actually want to be able to look at the raw XML somewhere along ...
Charles T's user avatar
  • 11k
2 votes

Best practice for apex code to create XML that matches WSDL/XSD

Not sure about commonly agreed upon approach but here's how I'd proceed. With this vf page: <apex:page StandardController="Account" recordSetVar="Accounts" contentType="text/xml" showHeader="false"...
humanoid's user avatar
  • 327
2 votes
Accepted

Can I take a WSDL from an external system and use it in Salesforce as the format that Salesforce should accept?

Generally speaking there isn't automated support to implement a predefined WSDL someone else provided in Salesforce. Salesforce has expectations around how the Session will be handled in the header. A ...
Daniel Ballinger's user avatar
2 votes

How to communicate with Salesforce without WSDL?

The problems aren't caused by the WSDL per say, but rather it's the underlying changes to the system that are changing the WSDL and also breaking your connection. If you find the connection is ...
martin's user avatar
  • 12.7k
2 votes

Apex callout exception when making hitting an external Service

To debug this issue you can create a temporary RequestBin URL by going to https://requestb.in/ - 1. Click on "Create a RequestBin" and keep this window open 2. Copy this URL and add to the remote ...
LakhanP's user avatar
  • 831
2 votes

How to enable API use in salesforce environment

You don't specify your edition in your question, but that's likely the cause of this issue. See Salesforce Editions with API Access. To use the API, your organization must be on one of the ...
battery.cord's user avatar
  • 8,825
2 votes

Why is Xpath returning null for Salesforce SOAP query response?

It appears to be a quirk of the XPath specification. Once there is a namespace specified, it becomes harder to access nodes in the default namespace. (As a side note, this is firmly outside the limits ...
Derek F's user avatar
  • 62.1k
2 votes

Webservice error in Apex

This occurs when the external service didn't return a SOAP response. In this case, rather than a SOAP envelope element there is an html element at the start of the response. As @sfdcfox commented, ...
Daniel Ballinger's user avatar
2 votes
Accepted

SF API WSDL - how can I define/see it?

Go to Setup > API you will get the link to the different WSDLs available from Salesforce. Refer to this trailhead API Basics for the API implementation.
Saroj Bera's user avatar
  • 14.7k
2 votes

Allow Nulls for input parameters in Apex Custom Web Service

Write a webservice class like this global with sharing class CaseWebserviceClassTemp { global class MyCaseInfo { webservice String Description; webservice Long textId = ...
Santanu Boral's user avatar
2 votes

Apex execution context and DateTime class

Salesforce Stores the date and DateTime format in GMT/UTC. When you call DateTime.now it returns dateTime in the format of the running user's Timezone. Its TimeZone will be of the context user who ...
Pranay Jaiswal's user avatar
2 votes

If we change the parameters used in webservice method in our org., will this cause error at end user consuming old WSDL?

Yes you need to share updated WSDL with them if you change parameter in method. Users with old WSDL will not be able to use it. If you change anything inside method body this will not affect them. ...
Tushar Sharma's user avatar
2 votes
Accepted

Remove [] brackets while sending response in Salesforce

This string method removes the first and last char of a string. Use this string method to remove the brackets. yourstringName.substring(1,yourstringName.length()-1);
devendra shekhawat's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible