Hot answers tagged

10 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
  • 135k
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
  • 149k
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
6 votes

Salesforce Integration - Query

This is expected behavior .The login() has to be from either partner WSDL or the Enterprise WSDL .The Apex class that the would have created with webservice keywords will generate another WSDL that ...
Mohith Shrivastava's user avatar
6 votes
Accepted

Unsupported Schema element found http://www.w3.org/2001/XMLSchema:attribute

In this particular case you are dealing with the common wsdl:import that .NET adds to web services to handle generic serialization (schemas.microsoft.com.2003.10.Serialization.xsd Schema). Being ...
Daniel Ballinger's user avatar
6 votes

Unsupported Schema element found http://www.w3.org/2001/XMLSchema:attribute

Salesforce's Wsdl2Apex doesn't support the xs:attribute element. In this post, @Sonam_SFDC describes how to fix the issue: Here, I understand that the schema contain definition of attribute that ...
Scott Pelak's user avatar
  • 7,484
4 votes
Accepted

What WSDL should be given to 3rd party vendor?

It really depends on whether you want your integration to be loosely coupled with your salesforce schema or tightly coupled . With partner WSDL the flexibility will be that even if another field is ...
Mohith Shrivastava'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,360
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

How to find the wsdl class?

If you don't modify the class comment. Salesforce insert comment on top of the page as shown below
Himanshu's user avatar
  • 10.5k
3 votes
Accepted

SOAP Integration Query

Session ID is the ID returned after you log in, it is used for authentication. Use the login() call to obtain this, as documented here and here This SFSE question may also shed some more light on ...
Davin Casey's user avatar
  • 4,217
3 votes

Syncing production WSDL to sandbox?

As far as I'm aware, you can't sync them as such in any kind of real time. But you can deploy changes to fields from Production to a Sandbox. As a side note, I'd personally recommend making any ...
Dan Jones's user avatar
  • 7,147
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 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
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,761
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
  • 135k
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
  • 135k
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

Generated SforceService.cs file from enterprise.wsdl is enormous. How to condense?

Salesforce provides two main WSDLs for accessing your orgs data via SOAP. Enterprise WSDL This is a strongly typed WSDL that is bound to the specific org it was generated from. It will have elements ...
Daniel Ballinger's user avatar
2 votes
Accepted

What is WSDL? Web Services Definition Language

In simple terms, a webservice is used to send data, over web to any destination. SOAP is one of the protocols (set of rules) which defines the communication. There are others as well. WSDL is the ...
Anshul's user avatar
  • 2,629
2 votes

Fields related to my web service in the generated WSDL file not coming

If you have created global classes that are part of the signature of your webservice method those fields also need to be marked with webservice. This is illustrated in the "Define Web Service Member ...
Keith C's user avatar
  • 135k
2 votes

Getting SOAP error while deploying changes in workbench

There is an issue for this in GitHub: SOAP Error on retrieve or deploy actions. From the discussion it sounds like the problem might be intermitent and caching related. I'd suggest posting your ...
Daniel Ballinger's user avatar
2 votes

Apex class generation

There are many restrictions on what WSDL can be handled by the Apex tooling including: WSDL files with mulitple portTypes, multiple services, or multiple bindings so after removing those ...
Himanshu's user avatar
  • 10.5k
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.6k
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

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

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