• muralikrishna.sfdc
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 6
    Replies

I am working under payment gateway , I am new to this

 

 

is it require to encode for sending our request .

 I have to  send four things through this

 

session id , application number , amount, type of process

 

first one is how to get session id in salesforce

 

after encoding ,is it the right process add each one and attach to the endpoint at the end..

 

please help me

Hi,

 

I have two questions, i am trying to figure it out for a long time, please help me.

 

Below is my apex code,

 

public class Dev_Login{
    public String userName {get; set;}
    public String password {get; set;}
    public String outputText {get; set;}
    
    public Dev_Login() {
        
    }    
    
    public void loginFn() {

        Http http = new Http();
        HttpRequest req = new HttpRequest();
        HttpResponse res;
        try {        
            req.setEndpoint('https://www.mywebsite.com/jsp');
            req.setHeader('Content-Type', 'application/x-www-form-urlencoded');      
            req.setMethod('POST');
            String theMessage = 'userId='+userName+'&password='+password;            
            
            req.setBody(theMessage);
            
            res = http.send(req);
            
            outputText = res.getBody();
            
        } catch (Exception e) {
            System.debug('Error'+e);
        }
    }
}

 

 

the response (res.getBody()) will contain a HTML content, i want to display it in the VF Page that contains the login button. How should i do it? i had the below in my vf page

 

<apex:outputpanel >
        <apex:outputtext rendered="true" value="{!outputText}"/>
    </apex:outputpanel>

 

But this just displayed the html content as a string, didnt render it as html.. Please tell me how should i do it?

 

-----------------------------------------------

 

My second question,

 

say if i get an XML in the response in this page (outputText)

i want to redirect to a new VF page where i will use that xml to display something... how should i pass this xml to that new page. that newpage will use a different controller..  so i want to pass this xml to the second page's controller and second page should be displayed... how should i do it.

 

Please help me with these two questions..

 

Thanks,

Rani

Hello,

 

I have a future callout from a time-based trigger. This callout in turn calls a Visualforce page.

On the trigger, UserInfo.getSessionId() returns null, hence the page does not get invoked; the Http callout hits the Salesforce.com login page. Please suggest a way to obtain the sessionid on a Apex trigger invoked by a Time based workflow?

 

What is the validity time for a SFDC sessionid?

 

Andi Giri

Softsquare

www.softsquare.biz

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 this error while creating apex from WSDL.

 

Unable to find schema for element; {http://www.w3.org/2001/XMLSchema}string

 

this is my wsdlfrom axis2 web service), someone help me?

 

<wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.example.org/isms/" targetNamespace="http://www.example.org/isms/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<s:schema targetNamespace="http://www.example.org/isms/">
<s:element name="isms">
<s:complexType>
<s:sequence>
<s:element name="in" type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="ismsResponse" type="s:string" />
<s:element name="ismsRequest" type="s:string" />
</s:schema>
</wsdl:types>
<wsdl:message name="ismsRequest">
<wsdl:part name="parameters" element="tns:ismsRequest">
</wsdl:part>
</wsdl:message>
<wsdl:message name="ismsResponse">
<wsdl:part name="parameters" element="tns:ismsResponse">
</wsdl:part>
</wsdl:message>
<wsdl:portType name="isms">
<wsdl:operation name="isms">
<wsdl:input message="tns:ismsRequest">
</wsdl:input>
<wsdl:output message="tns:ismsResponse">
</wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="ismsSOAP" type="tns:isms">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="isms">
<soap:operation soapAction="http://www.example.org/isms/isms"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="isms">
<wsdl:port name="ismsSOAP" binding="tns:ismsSOAP">
<soap:address location="http://172.168.2.235:8080/axis2/services/isms/"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

 

Message Edited by china.leaf on 04-23-2009 01:48 AM
Message Edited by china.leaf on 04-23-2009 02:15 AM
Message Edited by china.leaf on 04-23-2009 02:16 AM