• jd510
  • NEWBIE
  • 0 Points
  • Member since 2007

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

Hello Dev Community:

Issue:

When trying to access characters from the Central European character set (Microsoft’s code page 1250) question marks are returned.

I’m using Outbound Messages and the API.  The Outbound Message itself contains the correct Hex values.  However, as stated above, when a method call is made on the object, question marks are returned (see code below).


Background:

Edition: Unlimited

Encoding: UTF-8

 
Data:

ŠŚŤŽŹšśťžź

 
Outbound Message:

<sf:FirstName>&#x160;&#x15A;&#x164;&#x17D;&#x179;&#x161;&#x15B;&#x165;&#x17E;&#x17A;</sf:FirstName>

 
Code:

public class ClientNotificationBindingImpl implements com.sforce.soap._2005._09.outbound.ClientNotificationPort{

    public boolean notifications(java.lang.String organizationId, java.lang.String actionId, java.lang.String sessionId, java.lang.String enterpriseUrl, java.lang.String partnerUrl, com.sforce.soap._2005._09.outbound.ContactNotification[] clientNotification) throws java.rmi.RemoteException {

 

      // Loop through the ContactNotification array, retrieve the objects, and process them.

      for (int i = 0; i < clientNotification.length; i++) {

            // Retrieve the object type from the object.

            String objectType = clientNotification[i].getSObject().getClass().getSimpleName();

             // Debugging
            SalesforceLIMSIntegrationLogger.getInstance().logger.debug("###### 1. getFirstName: " + clientNotification[i].getSObject().getFirstName());

            SalesforceLIMSIntegrationLogger.getInstance().logger.debug("###### 1. getLastName: " + clientNotification[i].getSObject().getLastName());

            SalesforceLIMSIntegrationLogger.getInstance().logger.debug("###### 1. getMiddle_Initial__c: " + clientNotification[i].getSObject().getMiddle_Initial__c());

      }

    }

}

 

Log:

[03/31 13:49:23 PDT] [DEBUG] <http-443-Processor25> <SalesforceLIMSIntegrationLogger> ###### 1. getFirstName: Š??Ž?š??ž?

[03/31 13:49:23 PDT] [DEBUG] <http-443-Processor25> <SalesforceLIMSIntegrationLogger> ###### 1. getLastName: Š??Ž?š??ž?

[03/31 13:49:23 PDT] [DEBUG] <http-443-Processor25> <SalesforceLIMSIntegrationLogger> ###### 1. getMiddle_Initial__c: null

 

Question:

How do I retrieve the correct value instead of the question marks?

Thanks in advance,
jd

 

  • April 02, 2008
  • Like
  • 0
Is there a way to monitor the Outbound Message Queue using Workflow Rules?  If not, is there a way to check the number of messages in the Outbound Message Queue using the API?

Thanks,
jd
  • September 05, 2007
  • Like
  • 0
Hi All:

Do you know of any reason why an Outbound Message would NOT send.  I have a message that is sitting in the queue with 0 attempts.  Each time I hit 'Retry' it still says 0.

Any and all assistance is appreciated.

Thanks,
jd
  • August 09, 2007
  • Like
  • 0
Hi --

Is there a way to delete multiple messages from the Outbound Message Queue at once?

Thanks,
jd
  • June 27, 2007
  • Like
  • 0
Hi --

I've looked through the discussion board and found some examples of how to create an attachment (see below) using Java.  However, they all refer to the ID object which I do not have in 9.0 API.  Is there something I could use instead of the ID object?  Is the code below the best way to create an  attachment? 

Any and all help is appreciated.

Thanks,
jd

=====================
Sample Code
=====================
private void DoAttachment() throws IOException {
  File f = new File("test.doc");
  InputStream is = new FileInputStream(f);
  byte[] inbuff = new byte[(int)f.length()];
 
  is.read(inbuff);
  Attachment attach = new Attachment();
  attach.setBody(inbuff);
  //Do not attempt to set body length, this calculated
  //be salesforce.com
  //attach.setBodyLength(new Integer(inbuff.length));
  attach.setName("text.doc");
  ID parentId = new ID();
  parentId.setValue("00330000006ZpSZ");
  attach.setParentId(parentId);
  SoapBindingStub b = loginEnterprise("mobile2@user.com", "pass");
  SaveResult sr = b.create(new com.sforce.soap.enterprise.sobject.SObject[] {attach})[0];
  if (sr.isSuccess())
  System.out.println("Successfully added attachment.");
  else
  System.out.println("Error adding attachment: " + sr.getErrors(0).getMessage());
}
  • June 27, 2007
  • Like
  • 1

Hi - 

When running my Outbound Message Listener code in Eclipse I get the following error message:

 

- Factory org.apache.axis.configuration.EngineConfigurationFactoryServlet Ignored: missing required method: public static EngineConfigurationFactory newFactory(Object).

- Factory org.apache.axis.configuration.EngineConfigurationFactoryDefault Ignored: missing required method: public static EngineConfigurationFactory newFactory(Object).

- Unable to locate a valid EngineConfigurationFactory

 

How do I resolve this issue?

Thank you,

jd
  • May 31, 2007
  • Like
  • 0
Hi --

I've looked through the discussion board and found some examples of how to create an attachment (see below) using Java.  However, they all refer to the ID object which I do not have in 9.0 API.  Is there something I could use instead of the ID object?  Is the code below the best way to create an  attachment? 

Any and all help is appreciated.

Thanks,
jd

=====================
Sample Code
=====================
private void DoAttachment() throws IOException {
  File f = new File("test.doc");
  InputStream is = new FileInputStream(f);
  byte[] inbuff = new byte[(int)f.length()];
 
  is.read(inbuff);
  Attachment attach = new Attachment();
  attach.setBody(inbuff);
  //Do not attempt to set body length, this calculated
  //be salesforce.com
  //attach.setBodyLength(new Integer(inbuff.length));
  attach.setName("text.doc");
  ID parentId = new ID();
  parentId.setValue("00330000006ZpSZ");
  attach.setParentId(parentId);
  SoapBindingStub b = loginEnterprise("mobile2@user.com", "pass");
  SaveResult sr = b.create(new com.sforce.soap.enterprise.sobject.SObject[] {attach})[0];
  if (sr.isSuccess())
  System.out.println("Successfully added attachment.");
  else
  System.out.println("Error adding attachment: " + sr.getErrors(0).getMessage());
}
  • June 27, 2007
  • Like
  • 1

Hello Dev Community:

Issue:

When trying to access characters from the Central European character set (Microsoft’s code page 1250) question marks are returned.

I’m using Outbound Messages and the API.  The Outbound Message itself contains the correct Hex values.  However, as stated above, when a method call is made on the object, question marks are returned (see code below).


Background:

Edition: Unlimited

Encoding: UTF-8

 
Data:

ŠŚŤŽŹšśťžź

 
Outbound Message:

<sf:FirstName>&#x160;&#x15A;&#x164;&#x17D;&#x179;&#x161;&#x15B;&#x165;&#x17E;&#x17A;</sf:FirstName>

 
Code:

public class ClientNotificationBindingImpl implements com.sforce.soap._2005._09.outbound.ClientNotificationPort{

    public boolean notifications(java.lang.String organizationId, java.lang.String actionId, java.lang.String sessionId, java.lang.String enterpriseUrl, java.lang.String partnerUrl, com.sforce.soap._2005._09.outbound.ContactNotification[] clientNotification) throws java.rmi.RemoteException {

 

      // Loop through the ContactNotification array, retrieve the objects, and process them.

      for (int i = 0; i < clientNotification.length; i++) {

            // Retrieve the object type from the object.

            String objectType = clientNotification[i].getSObject().getClass().getSimpleName();

             // Debugging
            SalesforceLIMSIntegrationLogger.getInstance().logger.debug("###### 1. getFirstName: " + clientNotification[i].getSObject().getFirstName());

            SalesforceLIMSIntegrationLogger.getInstance().logger.debug("###### 1. getLastName: " + clientNotification[i].getSObject().getLastName());

            SalesforceLIMSIntegrationLogger.getInstance().logger.debug("###### 1. getMiddle_Initial__c: " + clientNotification[i].getSObject().getMiddle_Initial__c());

      }

    }

}

 

Log:

[03/31 13:49:23 PDT] [DEBUG] <http-443-Processor25> <SalesforceLIMSIntegrationLogger> ###### 1. getFirstName: Š??Ž?š??ž?

[03/31 13:49:23 PDT] [DEBUG] <http-443-Processor25> <SalesforceLIMSIntegrationLogger> ###### 1. getLastName: Š??Ž?š??ž?

[03/31 13:49:23 PDT] [DEBUG] <http-443-Processor25> <SalesforceLIMSIntegrationLogger> ###### 1. getMiddle_Initial__c: null

 

Question:

How do I retrieve the correct value instead of the question marks?

Thanks in advance,
jd

 

  • April 02, 2008
  • Like
  • 0
Hi All:

Do you know of any reason why an Outbound Message would NOT send.  I have a message that is sitting in the queue with 0 attempts.  Each time I hit 'Retry' it still says 0.

Any and all assistance is appreciated.

Thanks,
jd
  • August 09, 2007
  • Like
  • 0
Hi --

Is there a way to delete multiple messages from the Outbound Message Queue at once?

Thanks,
jd
  • June 27, 2007
  • Like
  • 0

Hi

I would like to use Salesforce client certificate to validate the identity of outbond messages sent from Salesforce. How can I do this and is there an example?

Sorry, but the API Developer's Guide does not have much information on this.

Thanks,
Ben