Skip to main content

Questions tagged [wsdl2apex]

A tool provided by Salesforce to generate Apex classes from a WSDL that allows for callouts to a SOAP based web service from Apex code.

Filter by
Sorted by
Tagged with
18 votes
3 answers
5k views

Any way to easily create unit tests for a wsdl2apex generated Apex class?

I've created a new Apex class representing a third-party SOAP web service, using the "Generate from WSDL" button. Now I'd like to deploy this class to my production environment, but I'm getting an ...
Travis's user avatar
  • 303
9 votes
1 answer
4k views

Creating a class by consuming a WSDL document Schema:attribute

I have a problem with salesforce functionality. I've created flat WSDL file but when I am trying to create class in salesforce I still get this error: Error: Failed to parse wsdl: Unsupported ...
Artur Kępczyński's user avatar
8 votes
2 answers
11k views

web service callout failed error

I'm having an issue with the Address Verification method available through StrikeIron. I imported the following WSDL and am using the generated wsdl2apex code. The WSDL I'm using is here: http://...
Phil B's user avatar
  • 5,026
7 votes
1 answer
3k views

Named Credentials in wsdl2apex Class

I have a few questions regarding Named Credentials. I need to perform a SOAP based call out to an external system from Sales Force. I used the wsdl2apex function to generate the class for the call out....
Jason's user avatar
  • 73
7 votes
1 answer
4k views

Use Named Credentials with a SOAP WSDL2APEX class

SF allowed the usage of Named Credentials with SOAP callouts but the documentation doesn't really go into details of how to pass/access the Username and Password to the stub.inputHttpHeaders_x . I ...
HSG's user avatar
  • 997
7 votes
1 answer
7k views

How to work around lack of salesforce wsdl import tag support?

Question What techniques can I use to modify a 3rd party WSDL that includes import tags so that I can use the Salesforce generate apex class from WSDL feature? Background I'm a beginner at using ...
Ralph Callaway's user avatar
6 votes
2 answers
2k views

Unable to Generate Apex Code from WSDL

I have two salesforce orgs and I am trying to do SOAP integration between these two via WSDL import. From the first Salesforce Org (let us say S1) I did the following a) Clicked on the "WSDL" of ...
Varun's user avatar
  • 3,103
6 votes
2 answers
1k views

wsdl2apex class and System.NullPointerException: Attempt to de-reference a null object

I am trying to connect to a weather API. The class was created from wsdl2apex public class AsyncWeatherRequestWebService2 { public class GetCitiesByCountryResponse_elementFuture extends System....
Muriel's user avatar
  • 65
6 votes
1 answer
2k views

Parsing Partner WSDL in apex

I was able to successfully parse the Partner WSDL in apex and generated apex class.SO what i am trying is to create a sample account record in destination org(Note both orgs are salesforce orgs ) ...
Mohith Shrivastava's user avatar
5 votes
2 answers
6k views

How to make a SOAP call using APEX Class?

I have to connect to an external application for which I'm provided with "usernames, passwords, token id, host url". This host url is a WSDL one which ends with "..sample.php?wsdl" and upon running it ...
Sapthagiri's user avatar
5 votes
5 answers
3k views

Importing UPS Street Address WSDL into Apex

Have anybody been able to successfully use the UPS Street Address Validation WSDL in Apex? I'm getting the following error message when I use the wsdl2apex: "Unsupported WSDL. Found more than one ...
Joey Chan's user avatar
  • 928
5 votes
4 answers
7k views

Failed to parse wsdl: Found more than one wsdl:portType

While parsing the wsdl document from local storage i got this below error Failed to parse wsdl: Found more than one wsdl:portType. WSDL with multiple portType not supported And so could not ...
DOMINIC EDWARD's user avatar
5 votes
2 answers
10k views

Forming SOAP header through apex class if the WSDL provided has no information regarding the header

<soapenv:Header> <wsse:Security SOAP-ENV:mustUnderstand="1" xmlns:SOAP-ENV="SOAP-ENV"> <wsse:UsernameToken wsu:Id="UsernameToken-1" xmlns:wsu="http://docs.oasis-open.org/wss/2004/...
Mohith Shrivastava's user avatar
5 votes
2 answers
2k views

Is it possible to combine all custom wsdl to one enteprise wsdl

We currently have couple of call ins where an external application has to call apex webservices to perform data operations. We anticipate multiple webservices to be exposed in apex and we want to ...
Buyan Thyagarajan's user avatar
5 votes
1 answer
2k views

Issue with SOAP Header created via Apex

We are trying to make a SOAP callout to an API. The sample header provided by the API is as follows <env:Header> <Security xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-...
VigneshAngappan's user avatar
5 votes
2 answers
3k views

Apex callout exception when making hitting an external Service

I am looking at a strange exception when I make an apex callout to a external system. I am forming a very simple apex code to hit the endpoint using wsdl2Apex class. I get the below excception: ...
SfdcBat's user avatar
  • 4,811
5 votes
1 answer
254 views

Axapta Wsdl2Apex Error

I am trying to import a WSDL in order to create the apex wrapper for a Dynamics Axapta SOAP Service. Firstly, I've commented 'xsd:import' elements because Salesforce not support them. After this, I ...
Alberto Sanchez's user avatar
5 votes
1 answer
1k views

QName in WSDL XSD file throwing parsing error

While parsing a WSDL having a XSD in which <xs:attribute name="FactoryType" type="xs:QName" /> is there. This QName is not accepted by the salesfroce which throws parsing error. Please help.
codeath's user avatar
  • 75
4 votes
2 answers
10k views

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

I have a WSDL that I'm trying to generate into Apex Classes for a Web Service, but I get the following error: Unsupported Schema element found http://www.w3.org/2001/XMLSchema:attribute I have a ...
Scott Pelak's user avatar
  • 7,524
4 votes
3 answers
632 views

Which WSDL document is required to integrate External applications

Iam trying to call a external webservice from salesforce api or apex methods. For that we need WSDL document. From where i will get this WSDL file. 3rd party will provide this wsdl file or we can ...
Murali Mohan Mandadi's user avatar
4 votes
1 answer
228 views

Null pointer Exception in test classes when installing the Custom Metadata Loader

I am attempting to install the custom metadata loader into production. Per this issue on the github repo, I'm running into a null pointer exception. I am installing the new version, under the ...
gorav's user avatar
  • 4,537
4 votes
2 answers
455 views

SOAP callout fails silently

I have generated an Apex class from my WSDL successfully and was able to authenticate on the remote server by setting the HTTP Authorization header manually. I have double checked on the remote server ...
Patrick Oscity's user avatar
4 votes
1 answer
464 views

Importing Wsdl2Apex with multiple wsdl:part in a wsdl:message

I am trying to import a WSDL in salesforce which contains Multi-part messages. Multi-part messages are not supported by the wsdl2Apex tool. The suggested workaround is to modify the WSDL to generate ...
Anmol Kumar's user avatar
  • 3,631
4 votes
1 answer
2k 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, ...
pnoytechie's user avatar
  • 1,010
4 votes
3 answers
4k views

How to invoke soap web service

I have read through the apex developer's guide - webservice section three times but got more confused. Based on my previous knowledge, invoking a Soap webservice should be something like sending an ...
Lance Shi's user avatar
  • 13k
4 votes
1 answer
323 views

SANDBOX - Access webservice getting below error - added my machine IP in the Remote Site Detail

ERROR The requested URL could not be retrieved While trying to retrieve the URL: The following error was encountered: • Access Denied. Access control configuration prevents your request from ...
Balakrishnan M's user avatar
4 votes
2 answers
3k views

How to execute Anonymous Apex via the API/Web Service?

I am trying to connect from my c# client side app and execute some apex code. Here is what I've done so far (which maybe wrong): Went to Setup/Develop/API. Clicked Generate Apex WSDL Consumed ...
AngryHacker's user avatar
  • 1,481
4 votes
1 answer
841 views

Creating a Workflow Rule using the Metadata API and MetadataService class

Without using the Migration Tool, I need to create a workflow rule using apex and this MetadataService class. I have the following code, and it does run, however I get a exception in my custom class (...
Renato Oliveira's user avatar
3 votes
1 answer
4k views

How to handle anyType of wsdl in generating apex classes

i have to get some data using SOAP api from one org to another .so i generated Enterprise wsdl file of one organization . it contains some fields with specified type as type=xsd:anyType. because apex ...
mathlearner's user avatar
  • 2,151
3 votes
1 answer
631 views

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

Background: As an example, let's put the calculatorServices class from the Apex SOAP Callouts Trailhead Unit on the table. Considering any of the inner classes, for instance doAdd: public class doAdd ...
Przemysław Długoszewski-Tamoń's user avatar
3 votes
1 answer
3k views

Tracing the request.xml sent using apex callout

I make an apex callout to an external service by consuming the WSDl file.I use WSDL2Apex class which I generated from WSDL file. I send a XML file as a request formed in my apex class to make a ...
SfdcBat's user avatar
  • 4,811
3 votes
1 answer
2k views

Make RPC/Encoded callouts from Apex

We have an application which we need to integrate with salesforce. Unfortunately this legacy application supports RPC SOAP calls only, we cannot use out of the box wsdl2apex to build the integration ...
Buyan Thyagarajan's user avatar
3 votes
3 answers
2k views

Invalid Session id in Wsdl2Apex

I created an Apex class (global) containing Webservice methods-> generated WSDL out of it->consumed it in a different org. While instantiating the webservice callout, I set the http header to contain ...
sanchit's user avatar
  • 918
3 votes
2 answers
3k views

Script Too Large Error While Generating Apex Classes Using Metadata WSDL

While trying to Generate MetadataService classes using the standard Metadata API WSDL from Salesforce, classes I got below error. I think it is related to the length of the Apex class as the lines of ...
Rahul Gawale's user avatar
  • 12.2k
3 votes
4 answers
5k views

Asynchronous Callout from an Imported WSDL

I developed VisualForce page with asynchronous callouts to web service according to link. It is working fine, my page is showing results after callback is returned. I really like pattern with ...
mischczu's user avatar
  • 329
3 votes
1 answer
4k views

Using Partner WSDL to update a Salesforce record

My requirement is to update a record in one Salesforce org (org A) from another Salesforce org's (org B) Apex code. I have taken the Partner WSDL of org A and imported it into org B. Using the Partner ...
DCBoy's user avatar
  • 901
3 votes
1 answer
2k views

fullName is missing in Custom field in Metadata api v29.0

i downloaded a metadata wsdl.created apex class MetadataSerbvice.i wirte a simple code MetadataService.CustomField cf = new MetadataService.CustomField(); cf.fullName ="Asset.ProductLine__c"; but ...
mathlearner's user avatar
  • 2,151
3 votes
1 answer
934 views

Trimming WSDL file manually guidelines

i need to update a custom picklist field of standard object.i need to add a value when an object is inserted.i download metadata wsdl file .but its very big .and i am not getting how to trim it ??any ...
mathlearner's user avatar
  • 2,151
3 votes
2 answers
650 views

How do we send simple message type elements on soap header to external webservice

We have to consume a WSDL in salesforce where we need to send a soap header element which is of simple data type to an external webservice. The problem is that wsdl2apex parser rejects the simple data ...
Buyan Thyagarajan's user avatar
3 votes
1 answer
2k views

Converting a simple type xsd to a complex type to make wsd2apex work

I have a simple type xsd element which i want to convert to a complex type because i want the final wsdl to be document type literal format. Could you guys help? <xsd:element name="Service"> &...
Buyan Thyagarajan's user avatar
3 votes
1 answer
281 views

How are wsdl2apex generated private member variables referenced?

When generating apex code through a WSDL, several classes and member variables are generated. Each data type has its own class and the class has at least two private member variables associated with ...
James Loghry's user avatar
  • 6,241
3 votes
1 answer
1k views

WSDL Generate Apex

In a callout, I expect a response like this : Why when I generate this part of the wsdl : In the generated apex class, it doesn't give me the reference of the ResultResponse in the ...
Simon Govaert's user avatar
3 votes
1 answer
2k views

apex file Error: Failed to parse wsdl: schema:targetNamespace can not be null

I am having a wsdl document developed in .net framework. I am trying to create New Apex Code from that WSDL document but I am keep getting errors. I have resolved couple of them and now am getting a ...
maxspan's user avatar
  • 141
3 votes
2 answers
1k views

Apex api to parse wsdl and generate apex code

I want to build a SaopUI like tool in salesforce.So I need to access the ''Parse WSDL'' api of salesforce. Or how can I parse the WSDL file or Apex class in order to extract the methods of web ...
Nikita Bedmutha's user avatar
3 votes
2 answers
2k views

Problem with wsdl2apex and namespaces in the the callout body

I've been trying to get a webservice callout working by parsing it with wsdl2apex and constructing it with that method. Callouts are failing because of errors in the constructed XML which causes an ...
akarnid's user avatar
  • 1,842
3 votes
1 answer
2k views

Calling an ASP.NET SOAP service and passing a List<> of custom objects

I created the APEX class from the WSDL of an ASP.NET asmx service, this now gives me access to the types and methods provided by my service. One of the methods takes in a List of objects described by ...
Rick's user avatar
  • 33
3 votes
1 answer
675 views

Real time Integration - Approach [closed]

Scenario: From Salesforce on click of a button a Unique Id has to be passed to the external System which responds with 1000s of records which needs to be inserted in one of the SFDC custom Objects. ...
KaLi's user avatar
  • 1,519
3 votes
1 answer
1k views

Error in Generate WSDL: Apex Generation Failed Unable to find complexType for {http://soap.sforce.com..}RelationshipReferenceTo

I'm trying to Generate from WSDL. I have created a WSDL for one class containing webservice methods (MyClass) and now generating the class from wsdl in another org. Initially I was getting error ...
userRg's user avatar
  • 535
3 votes
1 answer
571 views

Callout SOAP request header setting value on a simple type

I have a situation where I need to include a basic type with a value in the SOAP Header. The class generated with Fuse IT Explorer. Class: public class Action_element { public String Action; ...
zokito's user avatar
  • 672
3 votes
1 answer
747 views

While calling Webservice got error

How to establish salesforce to salesforce connection using SOAP call (Apex WSDL)? It is related to : How do invoke an apex method of one org, from another org? I am new at integration and have two ...
Kumar's user avatar
  • 31