- Sparky Jane
- NEWBIE
- 35 Points
- Member since 2014
- Consultant
-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
1Likes Given
-
7Questions
-
5Replies
lightning:select Not displaying values in drop down
I'm creating a lightning:select component dynamically from the JS and the component JSON is built perfectly like below:
["lightning:select", { "label": "Industry", "required": true, "value": {}, "fieldPath": "Industry", "aura:id": "Industry", "options": [{ "value": "--None--", "label": "--None--" }, { "value": "A", "label": "A" }, { "value": "B", "label": "B" }] }], $A.createComponents(JSONString, function(cmps) { cmp.set('v.body', cmps); });
The picklist got created as below. But with empty dropdown.
Can some one please help with this.
Thanks in advance.
- Sparky Jane
- August 29, 2018
- Like
- 0
Slow Loading (HTTP Callouts)
Below is my code. Here I'm retrieving the lead count on a visualforcepage from ReportLeadCount class. But it is taking long time for loading. Can anyone please suggest me to over come that slow loading process.
Thanks in advance,
Sparky Jane
public class ReportLeadCount {
public String res {get; set;}
public Map<String, Object> m1 {get; set;}
public String test {get; set;}
public Map<String, Object> m {get; set;}
public String token1 {get; set;}
public List<ReportRest> responseList {get; set;}
public List<Object> lstAdd {get; set;}
public Transient String openleadscount {get; set;}
public Transient String contactedleadscount {get; set;}
public Transient String counseledleadscount {get; set;}
public Transient String eligibilityleadscount {get; set;}
public Transient String archiveleadscount {get; set;}
public Transient String badleadscount {get; set;}
public Transient String counselingsession {get; set;}
public Transient String clientsnotsignedup {get; set;}
public Transient String evaluations {get; set;}
public Transient String fullservice{get; set;}
public Transient String forecastsales{get; set;}
public Transient String forecastlost{get; set;}
public Transient String sales{get; set;}
public List<User> userdetails {get; set;}
public void authenticator() {
// For Leads Open
String username = 'username@testing.com';
String password = 'password123'
String loginUri = 'https://login.salesforce.com';
String clientid = ' some client id';
String clientSecret = 'client secret';
HttpRequest req1 = new HttpRequest();
req1.setMethod('GET');
req1.setEndpoint(loginUri+'/services/oauth2/token');
req1.setBody('grant_type=password' +
'&client_id=' + clientid +
'&client_secret=' + clientSecret +
'&username=' + EncodingUtil.urlEncode(username, 'UTF-8') +
'&password=' + EncodingUtil.urlEncode(password, 'UTF-8'));
Http http = new Http();
HTTPResponse res1 = http.send(req1);
String output = res1.getBody();
System.debug('responseeeeeeeeeeeeeeeeeeeeee'+output);
m = (Map<String, Object>)JSON.deserializeUntyped(output);
String token = (String)m.get('access_token');
System.debug('tokennnnnnnnnnnnnnnnnnnnnn'+token);
String addr = 'https://na19.salesforce.com/services/data/v32.0/analytics/reports/reportid?includedetails=true';
HttpRequest req = new HttpRequest();
req.setEndpoint( addr );
req.setTimeout(60000);
req.setMethod('GET');
req.setHeader('Content-Type','application/json');
req.setHeader('Authorization', 'Bearer ' + token);
HttpResponse response = http.send(req);
system.debug('responseresponseresponse'+response.getBody());
res = response.getBody();
System.debug('resresresresres'+res);
m1 = (Map<String,Object>)JSON.deserializeUntyped(res);
Map<String, Object> w = (Map<String, Object>)m1.get('factMap');
Map<String, Object> w1 = (Map<String, Object>)w.get('T!T');
List<Object> w6 = (List<Object>)w1.get('aggregates');
Map<String, Object> s6 = (Map<String, Object>)w6.get(0);
System.debug('SSSSSSSSSSSSSSSSSS'+s6.get('value'));
openleadscount = String.valueOf(s6.get('value'));
// For Leads Contacted
String addr2 = 'https://na19.salesforce.com/services/data/v32.0/analytics/reports/reportid?includedetails=true';
req.setEndpoint( addr2 );
req.setMethod('GET');
req.setHeader('Content-Type','application/json');
req.setHeader('Authorization', 'Bearer ' + token);
response = http.send(req);
system.debug('responseresponseresponse'+response.getBody());
res = response.getBody();
System.debug('resresresresres'+res);
m1 = (Map<String,Object>)JSON.deserializeUntyped(res);
Map<String, Object> w2 = (Map<String, Object>)m1.get('factMap');
Map<String, Object> w12 = (Map<String, Object>)w2.get('T!T');
List<Object> w62 = (List<Object>)w12.get('aggregates');
Map<String, Object> s62 = (Map<String, Object>)w62.get(0);
System.debug('SSSSSSSSSSSSSSSSSS'+s62.get('value'));
contactedleadscount = String.valueOf(s62.get('value'));
// For Leads Counseled
String addr3 = 'https://na19.salesforce.com/services/data/v32.0/analytics/reports/reporrt id?includedetails=true';
req.setEndpoint( addr3 );
req.setMethod('GET');
req.setHeader('Content-Type','application/json');
req.setHeader('Authorization', 'Bearer ' + token);
response = http.send(req);
system.debug('responseresponseresponse'+response.getBody());
res = response.getBody();
System.debug('resresresresres'+res);
m1 = (Map<String,Object>)JSON.deserializeUntyped(res);
Map<String, Object> w3 = (Map<String, Object>)m1.get('factMap');
Map<String, Object> w13 = (Map<String, Object>)w3.get('T!T');
List<Object> w63 = (List<Object>)w13.get('aggregates');
Map<String, Object> s63 = (Map<String, Object>)w63.get(0);
System.debug('SSSSSSSSSSSSSSSSSS'+s63.get('value'));
counseledleadscount = String.valueOf(s63.get('value'));
// For E1,E2,E3,E4
String addr4 = 'https://na19.salesforce.com/services/data/v32.0/analytics/reports/00O13000007xx5Q?includedetails=true';
req.setEndpoint( addr4 );
req.setMethod('GET');
req.setHeader('Content-Type','application/json');
req.setHeader('Authorization', 'Bearer ' + token);
response = http.send(req);
system.debug('responseresponseresponse'+response.getBody());
res = response.getBody();
System.debug('resresresresres'+res);
m1 = (Map<String,Object>)JSON.deserializeUntyped(res);
Map<String, Object> w4 = (Map<String, Object>)m1.get('factMap');
Map<String, Object> w14 = (Map<String, Object>)w4.get('T!T');
List<Object> w64 = (List<Object>)w14.get('aggregates');
Map<String, Object> s64 = (Map<String, Object>)w64.get(0);
System.debug('SSSSSSSSSSSSSSSSSS'+s64.get('value'));
eligibilityleadscount = String.valueOf(s64.get('value'));
// For Leads Archive for future interest
String addr5 = 'https://na19.salesforce.com/services/data/v32.0/analytics/reports/00O13000007xx5a?includedetails=true';
req.setEndpoint( addr5 );
req.setMethod('GET');
req.setHeader('Content-Type','application/json');
req.setHeader('Authorization', 'Bearer ' + token);
response = http.send(req);
system.debug('responseresponseresponse'+response.getBody());
res = response.getBody();
System.debug('resresresresres'+res);
m1 = (Map<String,Object>)JSON.deserializeUntyped(res);
Map<String, Object> w5 = (Map<String, Object>)m1.get('factMap');
Map<String, Object> w15 = (Map<String, Object>)w5.get('T!T');
List<Object> w65 = (List<Object>)w15.get('aggregates');
Map<String, Object> s65 = (Map<String, Object>)w65.get(0);
System.debug('SSSSSSSSSSSSSSSSSS'+s65.get('value'));
archiveleadscount = String.valueOf(s65.get('value'));
// For Bad Data
String addr6 = 'https://na19.salesforce.com/services/data/v32.0/analytics/reports/00Oa0000007xJqs?includedetails=true';
req.setEndpoint( addr6 );
req.setMethod('GET');
req.setHeader('Content-Type','application/json');
req.setHeader('Authorization', 'Bearer ' + token);
response = http.send(req);
system.debug('responseresponseresponse'+response.getBody());
res = response.getBody();
System.debug('resresresresres'+res);
m1 = (Map<String,Object>)JSON.deserializeUntyped(res);
Map<String, Object> w662 = (Map<String, Object>)m1.get('factMap');
Map<String, Object> w16 = (Map<String, Object>)w662.get('T!T');
List<Object> w66 = (List<Object>)w16.get('aggregates');
Map<String, Object> s66 = (Map<String, Object>)w66.get(0);
System.debug('SSSSSSSSSSSSSSSSSS'+s66.get('value'));
badleadscount = String.valueOf(s66.get('value'));
// counseling session
String addr7 = 'https://na19.salesforce.com/services/data/v32.0/analytics/reports/00O13000007xvfW?includedetails=true';
req.setEndpoint( addr7 );
req.setMethod('GET');
req.setHeader('Content-Type','application/json');
req.setHeader('Authorization', 'Bearer ' + token);
response = http.send(req);
system.debug('responseresponseresponse'+response.getBody());
res = response.getBody();
System.debug('resresresresres'+res);
m1 = (Map<String,Object>)JSON.deserializeUntyped(res);
Map<String, Object> w7 = (Map<String, Object>)m1.get('factMap');
Map<String, Object> w17 = (Map<String, Object>)w7.get('T!T');
List<Object> w67 = (List<Object>)w17.get('aggregates');
Map<String, Object> s67 = (Map<String, Object>)w67.get(0);
System.debug('SSSSSSSSSSSSSSSSSS'+s67.get('value'));
counselingsession = String.valueOf(s67.get('value'));
// for Clients not signed up
String addr8 = 'https://na19.salesforce.com/services/data/v32.0/analytics/reports/00O13000007xx5p?includedetails=true';
req.setEndpoint( addr8 );
req.setMethod('GET');
req.setHeader('Content-Type','application/json');
req.setHeader('Authorization', 'Bearer ' + token);
response = http.send(req);
system.debug('responseresponseresponse'+response.getBody());
res = response.getBody();
System.debug('resresresresres'+res);
m1 = (Map<String,Object>)JSON.deserializeUntyped(res);
Map<String, Object> w8 = (Map<String, Object>)m1.get('factMap');
Map<String, Object> w18 = (Map<String, Object>)w8.get('T!T');
List<Object> w68 = (List<Object>)w18.get('aggregates');
Map<String, Object> s68 = (Map<String, Object>)w68.get(0);
System.debug('SSSSSSSSSSSSSSSSSS'+s68.get('value'));
clientsnotsignedup = String.valueOf(s68.get('value'));
//for Clients signed up for evaluation ---- no report id
//for Evaluations not converted to full service
String addr9 = 'https://na19.salesforce.com/services/data/v32.0/analytics/reports/00O13000007xx5f?includedetails=true';
req.setEndpoint( addr9 );
req.setMethod('GET');
req.setHeader('Content-Type','application/json');
req.setHeader('Authorization', 'Bearer ' + token);
response = http.send(req);
system.debug('responseresponseresponse'+response.getBody());
res = response.getBody();
System.debug('resresresresres'+res);
m1 = (Map<String,Object>)JSON.deserializeUntyped(res);
Map<String, Object> w9 = (Map<String, Object>)m1.get('factMap');
Map<String, Object> w19 = (Map<String, Object>)w9.get('T!T');
List<Object> w69 = (List<Object>)w19.get('aggregates');
Map<String, Object> s69 = (Map<String, Object>)w69.get(0);
System.debug('SSSSSSSSSSSSSSSSSS'+s69.get('value'));
evaluations = String.valueOf(s69.get('value'));
//for Full service signed up clients
String addr10 = 'https://na19.salesforce.com/services/data/v32.0/analytics/reports/00O13000007xx5k?includedetails=true';
req.setEndpoint( addr10 );
req.setMethod('GET');
req.setHeader('Content-Type','application/json');
req.setHeader('Authorization', 'Bearer ' + token);
response = http.send(req);
system.debug('responseresponseresponse'+response.getBody());
res = response.getBody();
System.debug('resresresresres'+res);
m1 = (Map<String,Object>)JSON.deserializeUntyped(res);
Map<String, Object> w10 = (Map<String, Object>)m1.get('factMap');
Map<String, Object> w110 = (Map<String, Object>)w10.get('T!T');
List<Object> w610 = (List<Object>)w110.get('aggregates');
Map<String, Object> s610 = (Map<String, Object>)w610.get(0);
System.debug('SSSSSSSSSSSSSSSSSS'+s610.get('value'));
fullservice = String.valueOf(s610.get('value'));
//For Forecast Sales
// For Today (Display the amount),Week,Month,Year,So far
String addr11 = 'https://na19.salesforce.com/services/data/v32.0/analytics/reports/00Oa0000007ulZP?includedetails=true';
req.setEndpoint( addr11 );
req.setMethod('GET');
req.setHeader('Content-Type','application/json');
req.setHeader('Authorization', 'Bearer ' + token);
response = http.send(req);
system.debug('responseresponseresponse'+response.getBody());
res = response.getBody();
System.debug('resresresresres'+res);
m1 = (Map<String,Object>)JSON.deserializeUntyped(res);
Map<String, Object> w11 = (Map<String, Object>)m1.get('factMap');
Map<String, Object> w111 = (Map<String, Object>)w11.get('T!T');
List<Object> w611 = (List<Object>)w111.get('aggregates');
Map<String, Object> s611 = (Map<String, Object>)w611.get(0);
System.debug('SSSSSSSSSSSSSSSSSS'+s611.get('value'));
forecastsales= String.valueOf(s611.get('value'));
// For Forecast Lost
String addr12 = 'https://na19.salesforce.com/services/data/v32.0/analytics/reports/00O13000007xx5f?includedetails=true';
req.setEndpoint( addr12 );
req.setMethod('GET');
req.setHeader('Content-Type','application/json');
req.setHeader('Authorization', 'Bearer ' + token);
response = http.send(req);
system.debug('responseresponseresponse'+response.getBody());
res = response.getBody();
System.debug('resresresresres'+res);
m1 = (Map<String,Object>)JSON.deserializeUntyped(res);
Map<String, Object> w122 = (Map<String, Object>)m1.get('factMap');
Map<String, Object> w112 = (Map<String, Object>)w122.get('T!T');
List<Object> w612 = (List<Object>)w112.get('aggregates');
Map<String, Object> s612 = (Map<String, Object>)w612.get(0);
System.debug('SSSSSSSSSSSSSSSSSS'+s612.get('value'));
forecastlost = String.valueOf(s612.get('value'));
//For Sales
String addr13 = 'https://na19.salesforce.com/services/data/v32.0/analytics/reports/00O13000007xx5f?includedetails=true';
req.setEndpoint( addr13 );
req.setMethod('GET');
req.setHeader('Content-Type','application/json');
req.setHeader('Authorization', 'Bearer ' + token);
response = http.send(req);
system.debug('responseresponseresponse'+response.getBody());
res = response.getBody();
System.debug('resresresresres'+res);
m1 = (Map<String,Object>)JSON.deserializeUntyped(res);
Map<String, Object> w113 = (Map<String, Object>)m1.get('factMap');
Map<String, Object> w1133 = (Map<String, Object>)w113.get('T!T');
List<Object> w613 = (List<Object>)w1133.get('aggregates');
Map<String, Object> s613 = (Map<String, Object>)w613.get(0);
System.debug('SSSSSSSSSSSSSSSSSS'+s613.get('value'));
sales= String.valueOf(s613.get('value'));
// User Details
userdetails = [SELECT Name,Employee_Code__c,Title,Team_Name__c,Manager__c FROM User WHERE Id=:'00590000002zRtM'];
}
}
- Sparky Jane
- January 09, 2015
- Like
- 0
How to get all the FOLDERS from Report & Dashboards?
Hi all,
I would like to get all the folders that are present in Report & Dashboard using a query in apex class.
Thanks in advance,
Spark Jane
- Sparky Jane
- October 15, 2014
- Like
- 0
How can we interact Rpc based wsdl from salesforce
<attribute ref="soapenc:arrayType" wsdl:arrayType="tns1:RemoteUser[]"/>
with
<attribute ref="soapenc:arrayType" name="salesforce" wsdl:arrayType="tns1:RemoteUser[]"/>
However it then started to throw more errors:
Error: Failed to parse wsdl: type not specified for attribute: salesforce
I'm not sure why this is occurring as the type is clearly defined, or is it not?
I have a fast approaching deadline for this project so would greatly appreciate any assitance or explanation that the forum can offer.
Thank you in advance,
RVL
- Sparky Jane
- October 14, 2014
- Like
- 0
How to parse WSDL from the code that was developed?
The code that I've written is stated below:
global class MyWebService{
webService static Id makeContact(String lastname, Account a){
Contact c = new Contact(lastname = 'Sai Teja', AccountId = a.Id);
insert c;
return c.id;
}
}
-> I have generated WSDL for the above code.
-> I have saved the WSDL code as "web.wsdl"
-> And next I have clicked "Generate from WSDL" and I choose the file "web.wsdl"
-> Step-1: I have parsed the apex code from wsdl
-> Step-2: I have clicked on generate apex code
"There an errror raised like this:
Can Some one please help me out?
- Sparky Jane
- August 14, 2014
- Like
- 0
How to write query outside the for loop in triggers?
for(Contact c : Trigger.new){
Account val = [SELECT Acc_Cost__c from Account where Id=:c.AccountId];
val.Acc_Cost__c +=c.Cost__c;
upsert val;
}
- Sparky Jane
- August 14, 2014
- Like
- 0
How to avoid writing query in for loop?
public class AccountsAndContacts{
public void acc(){
Map<Id,List<Contact>> contactslist = new Map<Id,List<Contact>>();
List<Account> accList = [SELECT name from Account];
for(Account ac:accList){
list<Contact> con=[select name from Contact where Account.Id=:ac.Id];
contactslist.put(ac.Id,con);
}
for(Account ac:accList){
System.debug('Account Name: '+ac.name);
System.debug('Contacts List: '+contactslist.get(ac.Id));
}
}
}
- Sparky Jane
- August 14, 2014
- Like
- 0
lightning:select Not displaying values in drop down
I'm creating a lightning:select component dynamically from the JS and the component JSON is built perfectly like below:
["lightning:select", { "label": "Industry", "required": true, "value": {}, "fieldPath": "Industry", "aura:id": "Industry", "options": [{ "value": "--None--", "label": "--None--" }, { "value": "A", "label": "A" }, { "value": "B", "label": "B" }] }], $A.createComponents(JSONString, function(cmps) { cmp.set('v.body', cmps); });
The picklist got created as below. But with empty dropdown.
Can some one please help with this.
Thanks in advance.
- Sparky Jane
- August 29, 2018
- Like
- 0
How can we interact Rpc based wsdl from salesforce
<attribute ref="soapenc:arrayType" wsdl:arrayType="tns1:RemoteUser[]"/>
with
<attribute ref="soapenc:arrayType" name="salesforce" wsdl:arrayType="tns1:RemoteUser[]"/>
However it then started to throw more errors:
Error: Failed to parse wsdl: type not specified for attribute: salesforce
I'm not sure why this is occurring as the type is clearly defined, or is it not?
I have a fast approaching deadline for this project so would greatly appreciate any assitance or explanation that the forum can offer.
Thank you in advance,
RVL
- Sparky Jane
- October 14, 2014
- Like
- 0
ActionFunction Vs ActionSupport
Can anyone tell me what is the purpose of Actionfunction and Action Support component in visualforce?
How it’s differ from each other?
Thanks in advance
Karthick
- SS Karthick
- October 14, 2014
- Like
- 0
How to avoid writing query in for loop?
public class AccountsAndContacts{
public void acc(){
Map<Id,List<Contact>> contactslist = new Map<Id,List<Contact>>();
List<Account> accList = [SELECT name from Account];
for(Account ac:accList){
list<Contact> con=[select name from Contact where Account.Id=:ac.Id];
contactslist.put(ac.Id,con);
}
for(Account ac:accList){
System.debug('Account Name: '+ac.name);
System.debug('Contacts List: '+contactslist.get(ac.Id));
}
}
}
- Sparky Jane
- August 14, 2014
- Like
- 0
URGENT WSDL Issues: Error: Failed to parse wsdl: type not specified for attribute:
Hi, I am new to the forums and am experiencing an issue with my WSDL in that it is producing errors when I try to generate APEX classes from it. It was originally throwing errors about name attributes missing so I then followed a previous boards example that I found and replaced the following code:
<xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:Associative[]"/>
with
<xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:Associative[]" name="salesforce"/>
However it then started to throw more errors:
Error: Failed to parse wsdl: type not specified for attribute: salesforce
I'm not sure why this is occurring as the type is clearly defined, or is it not?
Below you will see the original WSDL XML tree before I made any adjustments. I will post the newly updated code as a reply in a second.
<definitions xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="urn:EntryApi" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="urn:EntryApi"> <types> <xsd:schema targetNamespace="urn:EntryApi"> <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"/> <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/"/> <xsd:complexType name="Associative"> <xsd:all> <xsd:element name="key" type="xsd:string"/> <xsd:element name="value" type="xsd:string"/> </xsd:all> </xsd:complexType> <xsd:complexType name="AssociativeArray"> <xsd:complexContent> <xsd:restriction base="SOAP-ENC:Array"> <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:Associative[]"/> </xsd:restriction> </xsd:complexContent> </xsd:complexType> <xsd:complexType name="ObjectList"> <xsd:complexContent> <xsd:restriction base="SOAP-ENC:Array"> <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:AssociativeArray[]"/> </xsd:restriction> </xsd:complexContent> </xsd:complexType> </xsd:schema> </types> <message name="create_entryRequest"> <part name="username" type="xsd:string"/> <part name="password" type="xsd:string"/> <part name="data" type="xsd:struct"/> </message> <message name="create_entryResponse"> <part name="code" type="xsd:int"/> <part name="message" type="xsd:string"/> <part name="id" type="xsd:int"/> </message> <message name="read_entryRequest"> <part name="username" type="xsd:string"/> <part name="password" type="xsd:string"/> <part name="data" type="xsd:struct"/> </message> <message name="read_entryResponse"> <part name="code" type="xsd:int"/> <part name="message" type="xsd:string"/> <part name="data" type="tns:ObjectList"/> </message> <message name="update_entryRequest"> <part name="username" type="xsd:string"/> <part name="password" type="xsd:string"/> <part name="data" type="xsd:struct"/> </message> <message name="update_entryResponse"> <part name="code" type="xsd:int"/> <part name="message" type="xsd:string"/> </message> <message name="delete_entryRequest"> <part name="username" type="xsd:string"/> <part name="password" type="xsd:string"/> <part name="data" type="xsd:struct"/> </message> <message name="delete_entryResponse"> <part name="code" type="xsd:int"/> <part name="message" type="xsd:string"/> </message> <message name="search_entryRequest"> <part name="username" type="xsd:string"/> <part name="password" type="xsd:string"/> <part name="data" type="xsd:struct"/> </message> <message name="search_entryResponse"> <part name="code" type="xsd:int"/> <part name="message" type="xsd:string"/> <part name="data" type="tns:ObjectList"/> </message> <message name="create_categoryRequest"> <part name="username" type="xsd:string"/> <part name="password" type="xsd:string"/> <part name="data" type="xsd:struct"/> </message> <message name="create_categoryResponse"> <part name="code" type="xsd:int"/> <part name="message" type="xsd:string"/> <part name="id" type="xsd:int"/> </message> <message name="read_categoryRequest"> <part name="username" type="xsd:string"/> <part name="password" type="xsd:string"/> <part name="data" type="xsd:struct"/> </message> <message name="read_categoryResponse"> <part name="code" type="xsd:int"/> <part name="message" type="xsd:string"/> <part name="data" type="tns:ObjectList"/> </message> <message name="update_categoryRequest"> <part name="username" type="xsd:string"/> <part name="password" type="xsd:string"/> <part name="data" type="xsd:struct"/> </message> <message name="update_categoryResponse"> <part name="code" type="xsd:int"/> <part name="message" type="xsd:string"/> </message> <message name="delete_categoryRequest"> <part name="username" type="xsd:string"/> <part name="password" type="xsd:string"/> <part name="data" type="xsd:struct"/> </message> <message name="delete_categoryResponse"> <part name="code" type="xsd:int"/> <part name="message" type="xsd:string"/> </message> <message name="create_category_groupRequest"> <part name="username" type="xsd:string"/> <part name="password" type="xsd:string"/> <part name="data" type="xsd:struct"/> </message> <message name="create_category_groupResponse"> <part name="code" type="xsd:int"/> <part name="message" type="xsd:string"/> <part name="id" type="xsd:int"/> </message> <message name="read_category_groupRequest"> <part name="username" type="xsd:string"/> <part name="password" type="xsd:string"/> <part name="data" type="xsd:struct"/> </message> <message name="read_category_groupResponse"> <part name="code" type="xsd:int"/> <part name="message" type="xsd:string"/> <part name="data" type="tns:ObjectList"/> </message> <message name="update_category_groupRequest"> <part name="username" type="xsd:string"/> <part name="password" type="xsd:string"/> <part name="data" type="xsd:struct"/> </message> <message name="update_category_groupResponse"> <part name="code" type="xsd:int"/> <part name="message" type="xsd:string"/> </message> <message name="delete_category_groupRequest"> <part name="username" type="xsd:string"/> <part name="password" type="xsd:string"/> <part name="data" type="xsd:struct"/> </message> <message name="delete_category_groupResponse"> <part name="code" type="xsd:int"/> <part name="message" type="xsd:string"/> </message> <portType name="EntryApiPortType"> <operation name="create_entry"> <documentation>Add a new entry</documentation> <input message="tns:create_entryRequest"/> <output message="tns:create_entryResponse"/> </operation> <operation name="read_entry"> <documentation>Select a entry</documentation> <input message="tns:read_entryRequest"/> <output message="tns:read_entryResponse"/> </operation> <operation name="update_entry"> <documentation>Update a entry</documentation> <input message="tns:update_entryRequest"/> <output message="tns:update_entryResponse"/> </operation> <operation name="delete_entry"> <documentation>Delete a entry</documentation> <input message="tns:delete_entryRequest"/> <output message="tns:delete_entryResponse"/> </operation> <operation name="search_entry"> <documentation>Search entry`s</documentation> <input message="tns:search_entryRequest"/> <output message="tns:search_entryResponse"/> </operation> <operation name="create_category"> <documentation>Add a new category</documentation> <input message="tns:create_categoryRequest"/> <output message="tns:create_categoryResponse"/> </operation> <operation name="read_category"> <documentation>Select a category</documentation> <input message="tns:read_categoryRequest"/> <output message="tns:read_categoryResponse"/> </operation> <operation name="update_category"> <documentation>Update a category</documentation> <input message="tns:update_categoryRequest"/> <output message="tns:update_categoryResponse"/> </operation> <operation name="delete_category"> <documentation>Delete a category</documentation> <input message="tns:delete_categoryRequest"/> <output message="tns:delete_categoryResponse"/> </operation> <operation name="create_category_group"> <documentation>Add a new category group</documentation> <input message="tns:create_category_groupRequest"/> <output message="tns:create_category_groupResponse"/> </operation> <operation name="read_category_group"> <documentation>Select a category group</documentation> <input message="tns:read_category_groupRequest"/> <output message="tns:read_category_groupResponse"/> </operation> <operation name="update_category_group"> <documentation>Update a category group</documentation> <input message="tns:update_category_groupRequest"/> <output message="tns:update_category_groupResponse"/> </operation> <operation name="delete_category_group"> <documentation>Delete a category group</documentation> <input message="tns:delete_category_groupRequest"/> <output message="tns:delete_category_groupResponse"/> </operation> </portType> <binding name="EntryApiBinding" type="tns:EntryApiPortType"> <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="create_entry"> <soap:operation soapAction="urn:EntryApi#create_entry" style="rpc"/> <input> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <output> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation> <operation name="read_entry"> <soap:operation soapAction="urn:EntryApi#read_entry" style="rpc"/> <input> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <output> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation> <operation name="update_entry"> <soap:operation soapAction="urn:EntryApi#update_entry" style="rpc"/> <input> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <output> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation> <operation name="delete_entry"> <soap:operation soapAction="urn:EntryApi#delete_entry" style="rpc"/> <input> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <output> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation> <operation name="search_entry"> <soap:operation soapAction="urn:EntryApi#search_entry" style="rpc"/> <input> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <output> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation> <operation name="create_category"> <soap:operation soapAction="urn:EntryApi#create_category" style="rpc"/> <input> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <output> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation> <operation name="read_category"> <soap:operation soapAction="urn:EntryApi#read_category" style="rpc"/> <input> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <output> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation> <operation name="update_category"> <soap:operation soapAction="urn:EntryApi#update_category" style="rpc"/> <input> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <output> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation> <operation name="delete_category"> <soap:operation soapAction="urn:EntryApi#delete_category" style="rpc"/> <input> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <output> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation> <operation name="create_category_group"> <soap:operation soapAction="urn:EntryApi#create_category_group" style="rpc"/> <input> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <output> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation> <operation name="read_category_group"> <soap:operation soapAction="urn:EntryApi#read_category_group" style="rpc"/> <input> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <output> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation> <operation name="update_category_group"> <soap:operation soapAction="urn:EntryApi#update_category_group" style="rpc"/> <input> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <output> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation> <operation name="delete_category_group"> <soap:operation soapAction="urn:EntryApi#delete_category_group" style="rpc"/> <input> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <output> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation> </binding> <service name="EntryApi"> <port name="EntryApiPort" binding="tns:EntryApiBinding"> <soap:address location="http://referralmachine.co/entry_api/soap"/> </port> </service> </definitions>
I have a fast approaching deadline for this project so would greatly appreciate any assitance or explanation that the forum can offer.
Thank you in advance,
Conor
- conorhiggins
- December 19, 2012
- Like
- 1
URGENT WSDL Issues: Error: Failed to parse wsdl: type not specified for attribute:
Hi, I am new to the forums and am experiencing an issue with my WSDL in that it is producing errors when I try to generate APEX classes from it. It was originally throwing errors about name attributes missing so I then followed a previous boards example that I found and replaced the following code:
<xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:Associative[]"/>
with
<xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:Associative[]" name="salesforce"/>
However it then started to throw more errors:
Error: Failed to parse wsdl: type not specified for attribute: salesforce
I'm not sure why this is occurring as the type is clearly defined, or is it not?
Below you will see the original WSDL XML tree before I made any adjustments. I will post the newly updated code as a reply in a second.
<definitions xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="urn:EntryApi" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="urn:EntryApi"> <types> <xsd:schema targetNamespace="urn:EntryApi"> <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"/> <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/"/> <xsd:complexType name="Associative"> <xsd:all> <xsd:element name="key" type="xsd:string"/> <xsd:element name="value" type="xsd:string"/> </xsd:all> </xsd:complexType> <xsd:complexType name="AssociativeArray"> <xsd:complexContent> <xsd:restriction base="SOAP-ENC:Array"> <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:Associative[]"/> </xsd:restriction> </xsd:complexContent> </xsd:complexType> <xsd:complexType name="ObjectList"> <xsd:complexContent> <xsd:restriction base="SOAP-ENC:Array"> <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:AssociativeArray[]"/> </xsd:restriction> </xsd:complexContent> </xsd:complexType> </xsd:schema> </types> <message name="create_entryRequest"> <part name="username" type="xsd:string"/> <part name="password" type="xsd:string"/> <part name="data" type="xsd:struct"/> </message> <message name="create_entryResponse"> <part name="code" type="xsd:int"/> <part name="message" type="xsd:string"/> <part name="id" type="xsd:int"/> </message> <message name="read_entryRequest"> <part name="username" type="xsd:string"/> <part name="password" type="xsd:string"/> <part name="data" type="xsd:struct"/> </message> <message name="read_entryResponse"> <part name="code" type="xsd:int"/> <part name="message" type="xsd:string"/> <part name="data" type="tns:ObjectList"/> </message> <message name="update_entryRequest"> <part name="username" type="xsd:string"/> <part name="password" type="xsd:string"/> <part name="data" type="xsd:struct"/> </message> <message name="update_entryResponse"> <part name="code" type="xsd:int"/> <part name="message" type="xsd:string"/> </message> <message name="delete_entryRequest"> <part name="username" type="xsd:string"/> <part name="password" type="xsd:string"/> <part name="data" type="xsd:struct"/> </message> <message name="delete_entryResponse"> <part name="code" type="xsd:int"/> <part name="message" type="xsd:string"/> </message> <message name="search_entryRequest"> <part name="username" type="xsd:string"/> <part name="password" type="xsd:string"/> <part name="data" type="xsd:struct"/> </message> <message name="search_entryResponse"> <part name="code" type="xsd:int"/> <part name="message" type="xsd:string"/> <part name="data" type="tns:ObjectList"/> </message> <message name="create_categoryRequest"> <part name="username" type="xsd:string"/> <part name="password" type="xsd:string"/> <part name="data" type="xsd:struct"/> </message> <message name="create_categoryResponse"> <part name="code" type="xsd:int"/> <part name="message" type="xsd:string"/> <part name="id" type="xsd:int"/> </message> <message name="read_categoryRequest"> <part name="username" type="xsd:string"/> <part name="password" type="xsd:string"/> <part name="data" type="xsd:struct"/> </message> <message name="read_categoryResponse"> <part name="code" type="xsd:int"/> <part name="message" type="xsd:string"/> <part name="data" type="tns:ObjectList"/> </message> <message name="update_categoryRequest"> <part name="username" type="xsd:string"/> <part name="password" type="xsd:string"/> <part name="data" type="xsd:struct"/> </message> <message name="update_categoryResponse"> <part name="code" type="xsd:int"/> <part name="message" type="xsd:string"/> </message> <message name="delete_categoryRequest"> <part name="username" type="xsd:string"/> <part name="password" type="xsd:string"/> <part name="data" type="xsd:struct"/> </message> <message name="delete_categoryResponse"> <part name="code" type="xsd:int"/> <part name="message" type="xsd:string"/> </message> <message name="create_category_groupRequest"> <part name="username" type="xsd:string"/> <part name="password" type="xsd:string"/> <part name="data" type="xsd:struct"/> </message> <message name="create_category_groupResponse"> <part name="code" type="xsd:int"/> <part name="message" type="xsd:string"/> <part name="id" type="xsd:int"/> </message> <message name="read_category_groupRequest"> <part name="username" type="xsd:string"/> <part name="password" type="xsd:string"/> <part name="data" type="xsd:struct"/> </message> <message name="read_category_groupResponse"> <part name="code" type="xsd:int"/> <part name="message" type="xsd:string"/> <part name="data" type="tns:ObjectList"/> </message> <message name="update_category_groupRequest"> <part name="username" type="xsd:string"/> <part name="password" type="xsd:string"/> <part name="data" type="xsd:struct"/> </message> <message name="update_category_groupResponse"> <part name="code" type="xsd:int"/> <part name="message" type="xsd:string"/> </message> <message name="delete_category_groupRequest"> <part name="username" type="xsd:string"/> <part name="password" type="xsd:string"/> <part name="data" type="xsd:struct"/> </message> <message name="delete_category_groupResponse"> <part name="code" type="xsd:int"/> <part name="message" type="xsd:string"/> </message> <portType name="EntryApiPortType"> <operation name="create_entry"> <documentation>Add a new entry</documentation> <input message="tns:create_entryRequest"/> <output message="tns:create_entryResponse"/> </operation> <operation name="read_entry"> <documentation>Select a entry</documentation> <input message="tns:read_entryRequest"/> <output message="tns:read_entryResponse"/> </operation> <operation name="update_entry"> <documentation>Update a entry</documentation> <input message="tns:update_entryRequest"/> <output message="tns:update_entryResponse"/> </operation> <operation name="delete_entry"> <documentation>Delete a entry</documentation> <input message="tns:delete_entryRequest"/> <output message="tns:delete_entryResponse"/> </operation> <operation name="search_entry"> <documentation>Search entry`s</documentation> <input message="tns:search_entryRequest"/> <output message="tns:search_entryResponse"/> </operation> <operation name="create_category"> <documentation>Add a new category</documentation> <input message="tns:create_categoryRequest"/> <output message="tns:create_categoryResponse"/> </operation> <operation name="read_category"> <documentation>Select a category</documentation> <input message="tns:read_categoryRequest"/> <output message="tns:read_categoryResponse"/> </operation> <operation name="update_category"> <documentation>Update a category</documentation> <input message="tns:update_categoryRequest"/> <output message="tns:update_categoryResponse"/> </operation> <operation name="delete_category"> <documentation>Delete a category</documentation> <input message="tns:delete_categoryRequest"/> <output message="tns:delete_categoryResponse"/> </operation> <operation name="create_category_group"> <documentation>Add a new category group</documentation> <input message="tns:create_category_groupRequest"/> <output message="tns:create_category_groupResponse"/> </operation> <operation name="read_category_group"> <documentation>Select a category group</documentation> <input message="tns:read_category_groupRequest"/> <output message="tns:read_category_groupResponse"/> </operation> <operation name="update_category_group"> <documentation>Update a category group</documentation> <input message="tns:update_category_groupRequest"/> <output message="tns:update_category_groupResponse"/> </operation> <operation name="delete_category_group"> <documentation>Delete a category group</documentation> <input message="tns:delete_category_groupRequest"/> <output message="tns:delete_category_groupResponse"/> </operation> </portType> <binding name="EntryApiBinding" type="tns:EntryApiPortType"> <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="create_entry"> <soap:operation soapAction="urn:EntryApi#create_entry" style="rpc"/> <input> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <output> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation> <operation name="read_entry"> <soap:operation soapAction="urn:EntryApi#read_entry" style="rpc"/> <input> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <output> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation> <operation name="update_entry"> <soap:operation soapAction="urn:EntryApi#update_entry" style="rpc"/> <input> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <output> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation> <operation name="delete_entry"> <soap:operation soapAction="urn:EntryApi#delete_entry" style="rpc"/> <input> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <output> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation> <operation name="search_entry"> <soap:operation soapAction="urn:EntryApi#search_entry" style="rpc"/> <input> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <output> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation> <operation name="create_category"> <soap:operation soapAction="urn:EntryApi#create_category" style="rpc"/> <input> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <output> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation> <operation name="read_category"> <soap:operation soapAction="urn:EntryApi#read_category" style="rpc"/> <input> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <output> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation> <operation name="update_category"> <soap:operation soapAction="urn:EntryApi#update_category" style="rpc"/> <input> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <output> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation> <operation name="delete_category"> <soap:operation soapAction="urn:EntryApi#delete_category" style="rpc"/> <input> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <output> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation> <operation name="create_category_group"> <soap:operation soapAction="urn:EntryApi#create_category_group" style="rpc"/> <input> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <output> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation> <operation name="read_category_group"> <soap:operation soapAction="urn:EntryApi#read_category_group" style="rpc"/> <input> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <output> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation> <operation name="update_category_group"> <soap:operation soapAction="urn:EntryApi#update_category_group" style="rpc"/> <input> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <output> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation> <operation name="delete_category_group"> <soap:operation soapAction="urn:EntryApi#delete_category_group" style="rpc"/> <input> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </input> <output> <soap:body use="encoded" namespace="urn:EntryApi" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> </output> </operation> </binding> <service name="EntryApi"> <port name="EntryApiPort" binding="tns:EntryApiBinding"> <soap:address location="http://referralmachine.co/entry_api/soap"/> </port> </service> </definitions>
I have a fast approaching deadline for this project so would greatly appreciate any assitance or explanation that the forum can offer.
Thank you in advance,
Conor
- conorhiggins
- December 19, 2012
- Like
- 1