• Ashy
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 15
    Replies

Hi All,

 

Can anybody help me out with this?

 

 

this is the class for which batch apex is to be written..

 

 

 

global class SMSToLead{   @future (callout=true)    public static void sendSMS(string phoneNUmber,string product,string OfficerName,list<string> lstFEcode)     {        system.debug('***phoneNUmber******'+phoneNUmber);        system.debug('***product******'+product);        system.debug('***OfficerName******'+OfficerName);        String strurl='http://xxyyyzzz.fdf&to='+phoneNumber+'&text=Transaction+of+Rs.1234+made+&alert=1';         HttpRequest req=new HttpRequest();        req.setEndpoint(strurl);        req.setMethod('POST');        string strbody='hi';        req.setBody(strbody);        req.setCompressed(true);        Http http=new Http();        HTTPResponse res=http.send(req);        string strRes=res.getbody();        system.debug('**** Response is *****'+strRes);    }    @future (callout=true)     public static void sendSMSTOFEMaster(list<string> lstFEcode) {        system.debug('****insideFEmaster*****'+lstFEcode );        list<FE_Master__c> lstFEMaster = new list<FE_Master__c>();         lstFEMaster =[select id,contact_number__c,FE_Code__c from FE_Master__c where FE_Code__c IN:lstFEcode];        for(FE_Master__c objFEMaster:lstFEMaster ){            string FEMasterContact =string.Valueof(objFEMaster.contact_number__c);            String strurl='http://xxyyyzzz.fdf&to='+FEMasterContact +'&text=Transaction+of+Rs.1234+made+&alert=1';            HttpRequest req=new HttpRequest();            req.setEndpoint(strurl);            req.setMethod('POST');            string strbody='hi';            req.setBody(strbody);            req.setCompressed(true);            Http http=new Http();            HTTPResponse res=http.send(req);            string strRes=res.getbody();            system.debug('**** Response is *****'+strRes);       }    }}

 

 

*************************************trigger******************************************************

 

 

 

TRigger LeadSmsTrg on lead(after Insert){list<Lead> lstLead;list<Lead> lstphnum = new list<Lead>();string PhoneNumber;string product;string officerName;list<string> lstFECode = new list<string>();list<FE_Master__c> lstFEMaster = new list<FE_Master__c>(); list<string> lstleadMobile = new list<string>();if(Trigger.IsAfter){ for(Lead objLead : [select id,FE_Code__c,Product__c,Mobile_Number__c from Lead where id In:trigger.New and Mobile_Number__c!=null ]){         product = string.valueof(objlead.product__C);         officerName = string.valueof(objlead.FE_CODE__c);         PhoneNumber = string.valueof(objlead.Mobile_Number__c);         lstFECode.add(objLead.FE_Code__c);         system.debug('***************8objLead.FE_Code__c'+objLead.FE_Code__c);         SMSToLead.sendSMS(PhoneNumber,product,officerName,lstFECode);       if(objLead.FE_Code__c!=null){          SMSToLead.sendSMSTOFEMaster(lstFECode);            }     }              }
}

 

 

the issue is when the trigger is fired the class is called and this class need to be executed in batches...............

 

 

Any One can help 

plsssssssssssss

 

 

thanx in Advance,

 

Ashy

 

  • October 10, 2011
  • Like
  • 0

 

hi  canany one  help me out with this problem

where iam unable to parse mywsdl

its showing this error

 

Failed to parse wsdl:target Name space not specified in wsdl:definitions

what do we mean by it

thanks

Ashy

  • August 25, 2011
  • Like
  • 0
  • August 24, 2011
  • Like
  • 0

Hi,

 

I need to integrate facebook with Salesforce  without using Faceforce connector.

please provide any ideas or URL to implement this..

 

thanks,

Bala

  • September 05, 2011
  • Like
  • 0

 

hi  canany one  help me out with this problem

where iam unable to parse mywsdl

its showing this error

 

Failed to parse wsdl:target Name space not specified in wsdl:definitions

what do we mean by it

thanks

Ashy

  • August 25, 2011
  • Like
  • 0

Does any one know if salesforce mobile app works when used via WiFi?

Yesterday when I was trying to login through salesforce mobile app on ipad and iphone (connected to network via WiFi) it said 'not connected to network'.

But I was able to login to salesforce using safari browser on ipad on the same WiFi network.

And also I was able to login to the salesforce mobile app through cellular data network(EDGE).

 

Can you please let me know if it is a problem with WiFi network or the app?

 

i am trying to generate apex class from wsdl ,but the error showing that

 

Apex Generation Failed Unsupported schema type: {http://www.w3.org/2001/XMLSchema}anyType in sales force when i click  generate Apex code

 

 

My java service has list data type return so in the wsdl also the type is any Type

 

The wsdl syntax is :

 

 <xs:complexType name="CardProviderResponse">
                <xs:sequence>
                    <xs:element minOccurs="0" name="cardProviderContainers" nillable="true" type="xs:anyType"/>
                    <xs:element minOccurs="0" name="errorMessage" nillable="true" type="xs:string"/>
                </xs:sequence>
            </xs:complexType> in the wsdl

 

Now how to solve this problem ? how to generate apex class for this type of wsdl ?

 

<?xml version="1.0" encoding="utf-8"?>
  <wsdl:types>
    <s:schema elementFormDefault="qualified" targetNamespace="http://force.com/">
      <s:element name="HelloWorld">
        <s:complexType />
      </s:element>
      <s:element name="HelloWorldResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="HelloWorldResult" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
    </s:schema>
  </wsdl:types>
  <wsdl:message name="HelloWorldSoapIn">
    <wsdl:part name="parameters" element="tns:HelloWorld" />
  </wsdl:message>
  <wsdl:message name="HelloWorldSoapOut">
    <wsdl:part name="parameters" element="tns:HelloWorldResponse" />
  </wsdl:message>
  <wsdl:portType name="ServiceSoap">
    <wsdl:operation name="HelloWorld">
      <wsdl:input message="tns:HelloWorldSoapIn" />
      <wsdl:output message="tns:HelloWorldSoapOut" />
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="ServiceSoap" type="tns:ServiceSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="HelloWorld">
      <soap:operation soapAction="http://force.com/HelloWorld" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:binding name="ServiceSoap12" type="tns:ServiceSoap">
    <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="HelloWorld">
      <soap12:operation soapAction="http://force.com/HelloWorld" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="Service">
    <wsdl:port name="ServiceSoap" binding="tns:ServiceSoap">
      <soap:address location="http://localhost:50402/webs/Service.asmx" />
    </wsdl:port>
    <wsdl:port name="ServiceSoap12" binding="tns:ServiceSoap12">
      <soap12:address location="http://localhost:50402/webs/Service.asmx" />
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

<?xml version="1.0" encoding="utf-8"?><wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://force.com/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://force.com/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">  <wsdl:types>    <s:schema elementFormDefault="qualified" targetNamespace="http://force.com/">      <s:element name="HelloWorld">        <s:complexType />      </s:element>      <s:element name="HelloWorldResponse">        <s:complexType>          <s:sequence>            <s:element minOccurs="0" maxOccurs="1" name="HelloWorldResult" type="s:string" />          </s:sequence>        </s:complexType>      </s:element>    </s:schema>  </wsdl:types>  <wsdl:message name="HelloWorldSoapIn">    <wsdl:part name="parameters" element="tns:HelloWorld" />  </wsdl:message>  <wsdl:message name="HelloWorldSoapOut">    <wsdl:part name="parameters" element="tns:HelloWorldResponse" />  </wsdl:message>  <wsdl:portType name="ServiceSoap">    <wsdl:operation name="HelloWorld">      <wsdl:input message="tns:HelloWorldSoapIn" />      <wsdl:output message="tns:HelloWorldSoapOut" />    </wsdl:operation>  </wsdl:portType>  <wsdl:binding name="ServiceSoap" type="tns:ServiceSoap">    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />    <wsdl:operation name="HelloWorld">      <soap:operation soapAction="http://force.com/HelloWorld" style="document" />      <wsdl:input>        <soap:body use="literal" />      </wsdl:input>      <wsdl:output>        <soap:body use="literal" />      </wsdl:output>    </wsdl:operation>  </wsdl:binding>  <wsdl:binding name="ServiceSoap12" type="tns:ServiceSoap">    <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />    <wsdl:operation name="HelloWorld">      <soap12:operation soapAction="http://force.com/HelloWorld" style="document" />      <wsdl:input>        <soap12:body use="literal" />      </wsdl:input>      <wsdl:output>        <soap12:body use="literal" />      </wsdl:output>    </wsdl:operation>  </wsdl:binding>  <wsdl:service name="Service">    <wsdl:port name="ServiceSoap" binding="tns:ServiceSoap">      <soap:address location="http://localhost:50402/webs/Service.asmx" />    </wsdl:port>    <wsdl:port name="ServiceSoap12" binding="tns:ServiceSoap12">      <soap12:address location="http://localhost:50402/webs/Service.asmx" />    </wsdl:port>  </wsdl:service></wsdl:definitions>

 

  • September 06, 2010
  • Like
  • 0

What is it, why would I need it as a beginning developer, where do I get it for Salesforce instances?

 

Thanks.

I have created a trigger which is calling an external web service to synchronize the leads creation/deletion process. When i delete/create leads the web service is working fine but when i mass upload it(mass import process..) or mass delete process (when it reaches its max limit..i.e. 250) it throws an exception and an error mail is generated with this error "System.CalloutException: IO Exception: Read timed out" error. I have also added the timeout_x property in my code to the max value(60000). But still its throwing the same error. Kindly help. Thanks in advance. Shaveta

I am getting follwing error while creating Apex Code from WSDL

Apex generation failed

Error: Unsupported schema type: {http://www.w3.org/2001/XMLSchema}anyType

What could be the reason....?

 

Thanks in advance