• pablor
  • NEWBIE
  • 100 Points
  • Member since 2013

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

Hi

 

We are trying to use web service callouts and we are nearly there!

 

The web service callouts work, but only on our client's server (Running Windows 2008 and IIS6)

http://webservices.wlrstore.com/aiWebAdServerDemo/test1getpost.asmx 

 

But it dows NOT work on our own server (a virtual sever at Fasthosts, running Windows 2008 R2 and IIS7.5)

http://salesforce.alpha-index.co.uk/packageservice/helloworld.asmx

 

Both these web services have the HelloWorld method, and they work fine when we call them from a .Net page.

 

But in Salesforce the first URL works fine, but we get this error when we call the web service on our server:

 

System.CalloutException: IO Exception: Read timed out

 

 

 And if we try to execute like anonymous in Force IDE, we find this error:

 

(59124000)|CALLOUT_REQUEST|[28]|<?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><env:Header /><env:Body><sayHelloWorld xmlns="http://salesforce.alpha-index.co.uk/packageservice/" /></env:Body></env:Envelope>
(59194000)|CALLOUT_REQUEST|[28]|sayHelloWorld_element:[apex_schema_type_info=(http://salesforce.alpha-index.co.uk/packageservice/, true, false), field_order_type_info=()]::SFDC_STACK_DEPTH=1 SOAPAction="http://salesforce.alpha-index.co.uk/packageservice/sayHelloWorld" User-Agent=SFDC-Callout/27.0 Accept=text/xml Content-Type=text/xml; charset=UTF-8 
(10060111000)|EXCEPTION_THROWN|[28]|System.CalloutException: IO Exception: Read timed out
(10060449000)|METHOD_EXIT|[2]|01pd0000002I2L2|AlphaIndex.alphaIndexCoUkSample.HelloWorldSoap.sayHelloWorld()
(10060568000)|FATAL_ERROR|System.CalloutException: IO Exception: Read timed out

 

 

Does anyone know if there is an issue with Salesforce and IIS7 web services?

You don't need a certificate to use web services with Salesforce do you?

Could it be a firewall port setting?

Anybody have any other ideas?

 

Please help!!

 

Thank you in advance.

Pablo

  • February 26, 2013
  • Like
  • 0

Hi

 

We are trying to use web service callouts and we are nearly there!

 

The web service callouts work, but only on our client's server (Running Windows 2008 and IIS6)

http://webservices.wlrstore.com/aiWebAdServerDemo/test1getpost.asmx 

 

But it dows NOT work on our own server (a virtual sever at Fasthosts, running Windows 2008 R2 and IIS7.5)

http://salesforce.alpha-index.co.uk/packageservice/helloworld.asmx

 

Both these web services have the HelloWorld method, and they work fine when we call them from a .Net page.

 

But in Salesforce the first URL works fine, but we get this error when we call the web service on our server:

 

System.CalloutException: IO Exception: Read timed out

 

 

 And if we try to execute like anonymous in Force IDE, we find this error:

 

(59124000)|CALLOUT_REQUEST|[28]|<?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><env:Header /><env:Body><sayHelloWorld xmlns="http://salesforce.alpha-index.co.uk/packageservice/" /></env:Body></env:Envelope>
(59194000)|CALLOUT_REQUEST|[28]|sayHelloWorld_element:[apex_schema_type_info=(http://salesforce.alpha-index.co.uk/packageservice/, true, false), field_order_type_info=()]::SFDC_STACK_DEPTH=1 SOAPAction="http://salesforce.alpha-index.co.uk/packageservice/sayHelloWorld" User-Agent=SFDC-Callout/27.0 Accept=text/xml Content-Type=text/xml; charset=UTF-8 
(10060111000)|EXCEPTION_THROWN|[28]|System.CalloutException: IO Exception: Read timed out
(10060449000)|METHOD_EXIT|[2]|01pd0000002I2L2|AlphaIndex.alphaIndexCoUkSample.HelloWorldSoap.sayHelloWorld()
(10060568000)|FATAL_ERROR|System.CalloutException: IO Exception: Read timed out

 

 

Does anyone know if there is an issue with Salesforce and IIS7 web services?

You don't need a certificate to use web services with Salesforce do you?

Could it be a firewall port setting?

Anybody have any other ideas?

 

Please help!!

 

Thank you in advance.

Pablo

  • February 26, 2013
  • Like
  • 0

Hi

We are trying to use Force IDE,  but we have some problem.

 

When we have a problem with any line, Force IDE told you that there are a problem, but it do not tell you where and why.

 

Suggestions?

 

Thanks!

Pablo

  • February 05, 2013
  • Like
  • 0

We are struggling to get Salesforce to do a Web Service Callout to a Web Service we have written in VB.Net

We have managed to get the StikeIron sample to work in Salesforce as detailed in the example:
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_callouts_wsdl2apex.htm

We have
1.      Written and tested a WebService in VB.Net.
2.      Saved the WSDL and edited it to make it work
3.      Used 'Generate from WSDL' to create the classes
4.      Built a Visual force page.

And we get this error:

Visualforce Error

Help for this Page


System.CalloutException: IO Exception: Read timed out

Class.alphaIndexCoUk.CNetWebServiceSimpleSoap.HelloWorld: line 30, column 1
Class.alphaIndexCoUkSample.__sfdc_hellow: line 8, column 1

 

Looking at the Log our web service generates, Salesforce is not connecting to the webservice.

The code used is as follows:

1.      ASMX FILE

 

Imports System.Web.Services

Imports System.Web.Services.Protocols

Imports System.ComponentModel

 

' To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.

' <System.Web.Script.Services.ScriptService()> _

<System.Web.Services.WebService(Namespace:="http://alpha-index.co.uk/")> _

<System.Web.Services.WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _

<ToolboxItem(False)> _

Public Class CNetWebServiceSimple

    Inherits System.Web.Services.WebService

 

    <WebMethod()> _

    Public Function HelloWorld() As String

        Return "Hello World"

    End Function

 

End Class

 

 

 2.      WSDL FILE

 

<?xml version="1.0" encoding="utf-8"?>

<wsdl:definitions xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://webservice.alpha-index.co.uk/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="http://webservice.alpha-index.co.uk/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">

  <wsdl:types>

    <s:schema elementFormDefault="qualified" targetNamespace="http://webservice.alpha-index.co.uk/">

      <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="CNetWebServiceSimpleSoap">

    <wsdl:operation name="HelloWorld">

      <wsdl:input message="tns:HelloWorldSoapIn" />

      <wsdl:output message="tns:HelloWorldSoapOut" />

    </wsdl:operation>

  </wsdl:portType>

  <wsdl:binding name="CNetWebServiceSimpleSoap" type="tns:CNetWebServiceSimpleSoap">

    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />

    <wsdl:operation name="HelloWorld">

      <soap:operation soapAction="http://webservice.alpha-index.co.uk/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="CNetWebServiceSimpleSoap12" type="tns:CNetWebServiceSimpleSoap">

    <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />

    <wsdl:operation name="HelloWorld">

      <soap12:operation soapAction="http://webservice.alpha-index.co.uk/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="CNetWebServiceSimple">

    <wsdl:port name="CNetWebServiceSimpleSoap" binding="tns:CNetWebServiceSimpleSoap">

      <soap:address location="http://webservices.alpha-index.co.uk/CNetWebService/CNetWebServiceSimple.asmx" />

    </wsdl:port>

    <wsdl:port name="CNetWebServiceSimpleSoap12" binding="tns:CNetWebServiceSimpleSoap12">

      <soap12:address location="http://webservices.alpha-index.co.uk/CNetWebService/CNetWebServiceSimple.asmx" />

    </wsdl:port>

  </wsdl:service>

</wsdl:definitions>

 

 

 

 

BUT WE REMOVE SOME CODE LINES, BECAUSE  WE GET THE FOLLOWING ERROR:

                              

 Error: Failed to parse wsdl: Found more than one wsdl:binding. WSDL with multiple binding not supported

 

 

 

THIS IS THE E=WSDL EDITED SO 'GENERATE FROM WSDL' WORKED:

             

  <?xml version="1.0" encoding="utf-8"?>

<wsdl:definitions xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://alpha-index.co.uk/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="http://alpha-index.co.uk/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">

 

  <wsdl:types>

    <s:schema elementFormDefault="qualified" targetNamespace="http://alpha-index.co.uk/">

      <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="CNetWebServiceSimpleSoap">

    <wsdl:operation name="HelloWorld">

      <wsdl:input message="tns:HelloWorldSoapIn" />

      <wsdl:output message="tns:HelloWorldSoapOut" />

    </wsdl:operation>

  </wsdl:portType>

  <wsdl:binding name="CNetWebServiceSimpleSoap" type="tns:CNetWebServiceSimpleSoap">

    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />

    <wsdl:operation name="HelloWorld">

      <soap:operation soapAction="http://alpha-index.co.uk/HelloWorld" style="document" />

      <wsdl:input>

        <soap:body use="literal" />

      </wsdl:input>

      <wsdl:output>

        <soap:body use="literal" />

      </wsdl:output>

    </wsdl:operation>

  </wsdl:binding>

  <wsdl:service name="CNetWebServiceSimple">

    <wsdl:port name="CNetWebServiceSimpleSoap" binding="tns:CNetWebServiceSimpleSoap">

      <soap:address location="http://webservices.alpha-index.co.uk/CNetWebService/CNetWebServiceSimple.asmx" />

    </wsdl:port>

  </wsdl:service>

</wsdl:definitions>

 

 

 

 3.      Generated Apex Class

 

//Generated by wsdl2apex

 

public class alphaIndexCoUk {

    public class HelloWorld_element {

        private String[] apex_schema_type_info = new String[]{'http://alpha-index.co.uk/','true','false'};

        private String[] field_order_type_info = new String[]{};

    }

    public class HelloWorldResponse_element {

        public String HelloWorldResult;

        private String[] HelloWorldResult_type_info = new String[]{'HelloWorldResult','http://www.w3.org/2001/XMLSchema','string','0','1','false'};

        private String[] apex_schema_type_info = new String[]{'http://alpha-index.co.uk/','true','false'};

        private String[] field_order_type_info = new String[]{'HelloWorldResult'};

    }

    public class CNetWebServiceSimpleSoap {

        public String endpoint_x = 'http://webservices.alpha-index.co.uk/CNetWebService/CNetWebServiceSimple.asmx';

        public Map<String,String> inputHttpHeaders_x;

        public Map<String,String> outputHttpHeaders_x;

        public String clientCertName_x;

        public String clientCert_x;

        public String clientCertPasswd_x;

        public Integer timeout_x;

        private String[] ns_map_type_info = new String[]{'http://alpha-index.co.uk/', 'alphaIndexCoUk'};

        public String HelloWorld() {

            alphaIndexCoUk.HelloWorld_element request_x = new alphaIndexCoUk.HelloWorld_element();

            alphaIndexCoUk.HelloWorldResponse_element response_x;

            Map<String, alphaIndexCoUk.HelloWorldResponse_element> response_map_x = new Map<String, alphaIndexCoUk.HelloWorldResponse_element>();

            response_map_x.put('response_x', response_x);

           

            WebServiceCallout.invoke(

              this,

              request_x,

              response_map_x,

              new String[]{endpoint_x,

              'http://alpha-index.co.uk/HelloWorld',

              'http://alpha-index.co.uk/',

              'HelloWorld',

              'http://alpha-index.co.uk/',

              'HelloWorldResponse',

              'alphaIndexCoUk.HelloWorldResponse_element'}

            );

           

            response_x = response_map_x.get('response_x');

            return response_x.HelloWorldResult;

        }

    }

}

 

 

 

 4.      Custom Apex class

 

public class alphaIndexCoUkSample {

 

    public string hellow{

        get{

 

            alphaIndexCoUk.CNetWebServiceSimpleSoap dns = new alphaIndexCoUk.CNetWebServiceSimpleSoap ();

 

            return dns.HelloWorld();

 

        }

        set;

    }

}

 

 

 

 5.      Visual force page to show HelloWorld

 

<apex:page controller="alphaIndexCoUkSample">

<apex:form ><apex:inputText value="{!hellow}"/></apex:form>

  <!-- Begin Default Content REMOVE THIS -->

  <h1>Congratulations</h1>

  This is your new Page

  <!-- End Default Content REMOVE THIS -->

</apex:page>

 

 

 



The Web Service can be found at: http://webservices.alpha-index.co.uk/CNetWebService/CNetWebServiceSimple.asm
x
(add ?WSDL to see the WSDL)

And we've published a sample .Net page to show the web service working
http://dirdb.alpha-index.co.uk/WebServiceTest/TestWebService.aspx

All the web service does is return 'Hello World' and record the call to a log file.
Clicking on [Test Hello World] runs the Web Service
And clicking on [View Hello World Log] displays the last log entry (we used this to see if Salesforce was reaching our web service)

 

I hope that anyone can help me with this problem.

Thanks in advance

Pablo

  • January 30, 2013
  • Like
  • 0

Hi

We are trying to use WebService callout, and need a working example.

 

I've tried working through the example 'Apex Web Services and Callouts' at http://wiki.developerforce.com/page/Apex_Web_Services_and_Callouts but can't get it to work - I think it may be because we don't have an Amazon S3 account - when I key http://s3.amazonaws.com/doc/2006-03-01/ I get:

<Error>
<Code>AccessDenied</Code>
<Message>Access Denied</Message>
<RequestId>D0553BA616766C71</RequestId>
<HostId>It4ZN5WnKCGiqdT7ryrP28BPOWWlsLA/N4l4PWFPtimNOTea+CuPOBY1/KjLkw4G</HostId>
</Error>

 

This means we can't get the WSDL to generate the apex method

 

Does anybody have a simple HelloWorld type example that we can work through?

 

Thanks!

Pablo

  • January 08, 2013
  • Like
  • 0

Hi

We are trying to use WebService callout, and need a working example.

 

I've tried working through the example 'Apex Web Services and Callouts' at http://wiki.developerforce.com/page/Apex_Web_Services_and_Callouts but can't get it to work - I think it may be because we don't have an Amazon S3 account - when I key http://s3.amazonaws.com/doc/2006-03-01/ I get:

<Error>
<Code>AccessDenied</Code>
<Message>Access Denied</Message>
<RequestId>D0553BA616766C71</RequestId>
<HostId>It4ZN5WnKCGiqdT7ryrP28BPOWWlsLA/N4l4PWFPtimNOTea+CuPOBY1/KjLkw4G</HostId>
</Error>

 

This means we can't get the WSDL to generate the apex method

 

Does anybody have a simple HelloWorld type example that we can work through?

 

Thanks!

Pablo

  • January 08, 2013
  • Like
  • 0

We are trying to extract a PDF Document object from Salesforce.
We've managed to get the document, but seem to be getting stuck with the encoding.
Please see the VB code below.

It does create a PDF file, and it even has the correct number of pages, but all the pages are blank.

Comparing the original PDF file, and the one we are creating and a text editor, we can see the character coding is slightly different:

The 'good' PDF starts with:
%PDF-1.4

%âãÏÓ

The 'bad' one is:
%PDF-1.4

%âã�Ó

We've tried all sorts of decoding but are completely stuck.
Anyone any ideas?

 

Thanks - Pablo

 

Public Partial Class pdfSave
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim mySF As New MySalesForce.SforceService

        'Logon to our instance of Salesforce
        Logon(mySF)

        'Get the Document Object
        Dim mySQL As String = "SELECT name, body, BodyLength, Type  FROM Document WHERE id = '015d0000000yxsw'"

        Dim myQueryResult As MySalesForce.QueryResult = mySF.query(mySQL)
        Dim myDoc As MySalesForce.Document = myQueryResult.records(0)

        'Convert the Body form Base64???? to a string
        Dim myStr As String = ""
        For i = 0 To myDoc.BodyLength - 1
            myStr = myStr & Chr(myDoc.Body(i))
        Next

        'Open a file streamwriter (on your desktop - change this for your own desktop)
        Dim myStreamWriter As New System.IO.StreamWriter("C:\Users\JB\Desktop\test.pdf")

        'Write the PDF to the file
        myStreamWriter.Write(myStr)

        myStreamWriter.Close()


    End Sub

    Protected Sub Logon(ByRef paSF As MySalesForce.SforceService)

        Dim myLoginResult As MySalesForce.LoginResult
        Dim myToken As String = ""

        Dim myUsername As String = "pablo@example.com"
        Dim myPassword As String = String.Format("{0}{1}", "pass", "keytoken")

        myLoginResult = paSF.login(myUsername, myPassword)

        paSF.Url = myLoginResult.serverUrl
        paSF.SessionHeaderValue = New MySalesForce.SessionHeader
        paSF.SessionHeaderValue.sessionId = myLoginResult.sessionId

    End Sub

End Class

  • January 03, 2013
  • Like
  • 0

Hi

 

We are trying to use web service callouts and we are nearly there!

 

The web service callouts work, but only on our client's server (Running Windows 2008 and IIS6)

http://webservices.wlrstore.com/aiWebAdServerDemo/test1getpost.asmx 

 

But it dows NOT work on our own server (a virtual sever at Fasthosts, running Windows 2008 R2 and IIS7.5)

http://salesforce.alpha-index.co.uk/packageservice/helloworld.asmx

 

Both these web services have the HelloWorld method, and they work fine when we call them from a .Net page.

 

But in Salesforce the first URL works fine, but we get this error when we call the web service on our server:

 

System.CalloutException: IO Exception: Read timed out

 

 

 And if we try to execute like anonymous in Force IDE, we find this error:

 

(59124000)|CALLOUT_REQUEST|[28]|<?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><env:Header /><env:Body><sayHelloWorld xmlns="http://salesforce.alpha-index.co.uk/packageservice/" /></env:Body></env:Envelope>
(59194000)|CALLOUT_REQUEST|[28]|sayHelloWorld_element:[apex_schema_type_info=(http://salesforce.alpha-index.co.uk/packageservice/, true, false), field_order_type_info=()]::SFDC_STACK_DEPTH=1 SOAPAction="http://salesforce.alpha-index.co.uk/packageservice/sayHelloWorld" User-Agent=SFDC-Callout/27.0 Accept=text/xml Content-Type=text/xml; charset=UTF-8 
(10060111000)|EXCEPTION_THROWN|[28]|System.CalloutException: IO Exception: Read timed out
(10060449000)|METHOD_EXIT|[2]|01pd0000002I2L2|AlphaIndex.alphaIndexCoUkSample.HelloWorldSoap.sayHelloWorld()
(10060568000)|FATAL_ERROR|System.CalloutException: IO Exception: Read timed out

 

 

Does anyone know if there is an issue with Salesforce and IIS7 web services?

You don't need a certificate to use web services with Salesforce do you?

Could it be a firewall port setting?

Anybody have any other ideas?

 

Please help!!

 

Thank you in advance.

Pablo

  • February 26, 2013
  • Like
  • 0

Hi

 

We are trying to use web service callouts and we are nearly there!

 

The web service callouts work, but only on our client's server (Running Windows 2008 and IIS6)

http://webservices.wlrstore.com/aiWebAdServerDemo/test1getpost.asmx 

 

But it dows NOT work on our own server (a virtual sever at Fasthosts, running Windows 2008 R2 and IIS7.5)

http://salesforce.alpha-index.co.uk/packageservice/helloworld.asmx

 

Both these web services have the HelloWorld method, and they work fine when we call them from a .Net page.

 

But in Salesforce the first URL works fine, but we get this error when we call the web service on our server:

 

System.CalloutException: IO Exception: Read timed out

 

 

 And if we try to execute like anonymous in Force IDE, we find this error:

 

(59124000)|CALLOUT_REQUEST|[28]|<?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><env:Header /><env:Body><sayHelloWorld xmlns="http://salesforce.alpha-index.co.uk/packageservice/" /></env:Body></env:Envelope>
(59194000)|CALLOUT_REQUEST|[28]|sayHelloWorld_element:[apex_schema_type_info=(http://salesforce.alpha-index.co.uk/packageservice/, true, false), field_order_type_info=()]::SFDC_STACK_DEPTH=1 SOAPAction="http://salesforce.alpha-index.co.uk/packageservice/sayHelloWorld" User-Agent=SFDC-Callout/27.0 Accept=text/xml Content-Type=text/xml; charset=UTF-8 
(10060111000)|EXCEPTION_THROWN|[28]|System.CalloutException: IO Exception: Read timed out
(10060449000)|METHOD_EXIT|[2]|01pd0000002I2L2|AlphaIndex.alphaIndexCoUkSample.HelloWorldSoap.sayHelloWorld()
(10060568000)|FATAL_ERROR|System.CalloutException: IO Exception: Read timed out

 

 

Does anyone know if there is an issue with Salesforce and IIS7 web services?

You don't need a certificate to use web services with Salesforce do you?

Could it be a firewall port setting?

Anybody have any other ideas?

 

Please help!!

 

Thank you in advance.

Pablo

  • February 26, 2013
  • Like
  • 0

Hi

We are trying to use WebService callout, and need a working example.

 

I've tried working through the example 'Apex Web Services and Callouts' at http://wiki.developerforce.com/page/Apex_Web_Services_and_Callouts but can't get it to work - I think it may be because we don't have an Amazon S3 account - when I key http://s3.amazonaws.com/doc/2006-03-01/ I get:

<Error>
<Code>AccessDenied</Code>
<Message>Access Denied</Message>
<RequestId>D0553BA616766C71</RequestId>
<HostId>It4ZN5WnKCGiqdT7ryrP28BPOWWlsLA/N4l4PWFPtimNOTea+CuPOBY1/KjLkw4G</HostId>
</Error>

 

This means we can't get the WSDL to generate the apex method

 

Does anybody have a simple HelloWorld type example that we can work through?

 

Thanks!

Pablo

  • January 08, 2013
  • Like
  • 0

Hi

We are trying to use WebService callout, and need a working example.

 

I've tried working through the example 'Apex Web Services and Callouts' at http://wiki.developerforce.com/page/Apex_Web_Services_and_Callouts but can't get it to work - I think it may be because we don't have an Amazon S3 account - when I key http://s3.amazonaws.com/doc/2006-03-01/ I get:

<Error>
<Code>AccessDenied</Code>
<Message>Access Denied</Message>
<RequestId>D0553BA616766C71</RequestId>
<HostId>It4ZN5WnKCGiqdT7ryrP28BPOWWlsLA/N4l4PWFPtimNOTea+CuPOBY1/KjLkw4G</HostId>
</Error>

 

This means we can't get the WSDL to generate the apex method

 

Does anybody have a simple HelloWorld type example that we can work through?

 

Thanks!

Pablo

  • January 08, 2013
  • Like
  • 0

We are trying to extract a PDF Document object from Salesforce.
We've managed to get the document, but seem to be getting stuck with the encoding.
Please see the VB code below.

It does create a PDF file, and it even has the correct number of pages, but all the pages are blank.

Comparing the original PDF file, and the one we are creating and a text editor, we can see the character coding is slightly different:

The 'good' PDF starts with:
%PDF-1.4

%âãÏÓ

The 'bad' one is:
%PDF-1.4

%âã�Ó

We've tried all sorts of decoding but are completely stuck.
Anyone any ideas?

 

Thanks - Pablo

 

Public Partial Class pdfSave
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim mySF As New MySalesForce.SforceService

        'Logon to our instance of Salesforce
        Logon(mySF)

        'Get the Document Object
        Dim mySQL As String = "SELECT name, body, BodyLength, Type  FROM Document WHERE id = '015d0000000yxsw'"

        Dim myQueryResult As MySalesForce.QueryResult = mySF.query(mySQL)
        Dim myDoc As MySalesForce.Document = myQueryResult.records(0)

        'Convert the Body form Base64???? to a string
        Dim myStr As String = ""
        For i = 0 To myDoc.BodyLength - 1
            myStr = myStr & Chr(myDoc.Body(i))
        Next

        'Open a file streamwriter (on your desktop - change this for your own desktop)
        Dim myStreamWriter As New System.IO.StreamWriter("C:\Users\JB\Desktop\test.pdf")

        'Write the PDF to the file
        myStreamWriter.Write(myStr)

        myStreamWriter.Close()


    End Sub

    Protected Sub Logon(ByRef paSF As MySalesForce.SforceService)

        Dim myLoginResult As MySalesForce.LoginResult
        Dim myToken As String = ""

        Dim myUsername As String = "pablo@example.com"
        Dim myPassword As String = String.Format("{0}{1}", "pass", "keytoken")

        myLoginResult = paSF.login(myUsername, myPassword)

        paSF.Url = myLoginResult.serverUrl
        paSF.SessionHeaderValue = New MySalesForce.SessionHeader
        paSF.SessionHeaderValue.sessionId = myLoginResult.sessionId

    End Sub

End Class

  • January 03, 2013
  • Like
  • 0