• AcademicHobo
  • NEWBIE
  • 25 Points
  • Member since 2010

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

I'd like to apply a workflow filter to an Activity based upon its value for WhatId or WhoId, but neither is available via the GUI.  I recognize that both are polymorphic, which imposes some limits.  But all I really want to do is manage my workflow based upon the types of SObjects WhatId and/or WhoId represent.  For that, I just need the first 3 characters of each Id (although a mapping to the actual SObject type would be nice too).  That way, for example, I could pass as outbound messages, only those activities related to Contacts or Accounts.  Is there a way to do this or am I just out of luck here?

 

- Cris

I have a callout inside a trigger (using @future) that is returning the following:

 

Apex script unhandled exception by user/organization: 005A0000001WKkE/00DA0000000KYuL

 

Failed to invoke future method 'public static void invokeProcess(String, String, String, Decimal, String, String, String, Datetime, String, String)' on class 'xmlnsOracleComVuadvancesfJwsSftest' for job id '707A000000AYXxu'

 

caused by: System.CalloutException: IO Exception: Unauthorized endpoint, please check Setup->Security->Remote site settings. endpoint = https://hostname:port/soa-infra/services/default/project/client_ep

 

I have https://hostname:port in my Remote site settings (the port is well within the 1024 to 64K range).  The SF GUI won't accept the full endpoint URL (the result of the save is just the protocol, the hostname and the port, as I have described).  The message implies that the entire endpoint url should be used, but as I said, the GUI won't accept it.

 

So (1) is the whole endpoint URL needed in remote site settings?  And (2)

 

if so:  how can I compel SF to accept the endpoint URL (or why doesn't if save mine)?

If not:  Any ideas as to what else might be the problem?

 

Any and all help is most welcome and appreciated.

 

- Cris

I have a web service that I want to call from within an APEX trigger.  I've never done that before.  So this is undiscovered country for me.  My wsdl is as follows:

 

<?xml version="1.0" encoding="UTF-8" ?>
<wsdl:definitions
     name="APEXBPEL"
     targetNamespace="http://xmlns.oracle.com/VUAdvanceSF_jws/SFTest/APEXBPEL"
     xmlns:client="http://xmlns.oracle.com/VUAdvanceSF_jws/SFTest/APEXBPEL"
     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    >
    <wsdl:types>
        <schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema"
             xmlns:client="http://xmlns.oracle.com/VUAdvanceSF_jws/SFTest/APEXBPEL" targetNamespace="http://xmlns.oracle.com/VUAdvanceSF_jws/SFTest/APEXBPEL">
            <element name="process">
                <complexType>
                    <sequence>
                        <element name="UserID" nillable="true" minOccurs="0" type="string"/>
                        <element name="BannerID" nillable="true" minOccurs="0" type="string"/>
                        <element name="BannerLastName" nillable="true" minOccurs="0" type="string"/>
                        <element name="Pidm" nillable="true" minOccurs="0" type="decimal"/>
                        <element name="Subject" nillable="true" minOccurs="0" type="string"/>
                        <element name="Comments" nillable="true" minOccurs="0" type="string"/>
                        <element name="AssignedTo" nillable="true" minOccurs="0" type="string"/>
                        <element name="ModifiedDate" nillable="true" minOccurs="0" type="dateTime"/>
                        <element name="ModifiedUser" nillable="true" minOccurs="0" type="string"/>
                        <element name="DataSource" nillable="true" minOccurs="0" type="string"/>
                    </sequence>
                </complexType>
            </element>
        </schema>
    </wsdl:types>
    <wsdl:message name="APEXBPELRequestMessage">
        <wsdl:part name="payload" element="client:process"/>
    </wsdl:message>
    <wsdl:portType name="APEXBPEL">
        <wsdl:operation name="process">
            <wsdl:input message="client:APEXBPELRequestMessage"/>
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="APEXBPELBinding" type="client:APEXBPEL">
        <soap:binding xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsdl:operation name="process">
            <soap:operation xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" style="document" soapAction="process"/>
            <wsdl:input>
                <soap:body xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" use="literal" namespace="http://xmlns.oracle.com/VUAdvanceSF_jws/SFTest/APEXBPEL"/>
            </wsdl:input>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="apexbpel_client_ep">
        <wsdl:port name="APEXBPEL_pt" binding="client:APEXBPELBinding">
            <soap:address xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" location="location of service"/>
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>

 

When I try to parse the wsdl into APEX is get:

 

Error: Failed to parse wsdl: output not defined in binding operation '{http://xmlns.oracle.com/VUAdvanceSF_jws/SFTest/APEXBPEL}process'

 

I am using fire and forget because (1) I am not sending data back and (2)  I understand that one cannot call a sync web service from inside trigger code.  This wsdl works fine when I test the web service independently of Salesforce.  Anyone have any idea what is amiss here?  Thanks.

 

- Cris

I am using Oracle SOA 11g (BPEL) to drive integrations to SF.  As such, I don't have the benefit of a tool like wsdl2java.  So I need to use the SF schema to manipulate SObjects in my BPEL processes.  But the SF wsdl only defines objects.  There are no object declarations.  So to start with, I have nothing with which to populate a variable in BPEL.  I don't want to add my own declarations to the SF wsdl because the wsdl changes too frequently, particularly since the underlying schema my business is using is in a state of flux as its use of SF evolves.  I have been able to add those declarations to a wsdl that imports the enterprise.wsdl, but that's a dangerous approach since it violates the visibility rule for embedded schemas in imported wsdls.  I read a whitepaper put out by an Oracle consulting company about integrating between Oracle SOA 11g and SF, but those folks actually hardcoded their SF object in their BPEL process using an XML fragment.  I see that as unmaintable as I continue to create integrations for many SObjects.  So I am writing to appeal to anyone for a better strategy.  I wish the wsdl contained declarations.  Then I wouldn't have to worry about all this.  Can anyone explain to me why it doesn't?

 

Thanks,

 

Cris

According to the SF API manual (version 19), the IP ranges SF uses for outbound messaging are as follows:

 

"Lock down the client application’s listener to accept requests only from the Salesforce.com IP range. While this guarantees the message came from Salesforce.com, it does not guarantee that another customer is not pointing to your endpoint and sending messages. The Salesforce.com IP ranges are:


  • 204.14.232.64 to 204.14.232.79
  • 204.14.234.64 to 204.14.234.79"

We tried this range but messages just bounced off our firewall.  When we temporarily expanded the range, we found an incoming message on 204.14.234.8 - outside the range specified above.  We are working with a sandbox, not production.  It would appear that the IP ranges in the manual are either incorrect or do they do not also apply to a sandbox.  If so, can you provide the correct IP range so we can button up our firewall appropriately?

 

Thanks.

 

- Cris

The in-line schemas of the enterprise.wsdl I generated contains no elements for the salesforce objects I need to manipulate.  Originally, I just got around the problem by simply adding an element inside the in-schema like so:

 

<element name="Contact" type="ens:Contact"/>

 

That allowed me to assign values to an instance of the Contact object via direct assignments or xsl transformations in my BPEL orchestration.  But I don't want to modify this wsdl since it may be frequently re-generated.  So in my composite (this is Oracle SOA 11g - uses SCA), I added a wsdl that imports the enterprise wsdl and includes an in-line schema for the Salesforce object(s) I need to instantiate, like so:

 

<definitions
    
     targetNamespace="urn:enterprise.soap.sforce.com"
     xmlns="http://schemas.xmlsoap.org/wsdl/"
     xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
     xmlns:tns="urn:enterprise.soap.sforce.com"
     xmlns:ns1="http://schemas.xmlsoap.org/ws/2003/03/addressing"
     xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
     xmlns:ens="urn:sobject.enterprise.soap.sforce.com"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    >
    <import namespace="urn:enterprise.soap.sforce.com" location="http://localhost:8001/soa-infra/services/default/UDDI/simplebpel_client_ep?WSDL=enterprise.wsdl"/>
    <types>
        <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
            <xsd:import namespace="http://schemas.xmlsoap.org/ws/2003/03/addressing" schemaLocation="http://localhost:8001/soa-infra/services/default/UDDI/simplebpel_client_ep?XSD=xsd/addressing.xsd"/>
        </xsd:schema>
        <xsd:schema elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:sobject.enterprise.soap.sforce.com">
          <xsd:import namespace="urn:enterprise.soap.sforce.com"/>
          <xsd:element name="Contact" type="ens:Contact"/>
        </xsd:schema>
    </types>
    <plnk:partnerLinkType name="Soap_PL">
        <plnk:role name="Soap_Role">
            <plnk:portType name="tns:Soap"/>
        </plnk:role>
    </plnk:partnerLinkType>
</definitions>

 

Note that the enterprise.wsdl is external to the composite since it may be called by a number of composites.  This tactic does appear to allow me to instantiate and use the Contact object in BPEL.  The composite deploys and runs OK so far.  But during the build in JDeveloper, I get  warnings of the following type:

 

[scac] [WARNING]  Line [311]Trying to assign incompatible types
     [scac] <from> value type "{urn:sobject.enterprise.soap.sforce.com}Contact" is not compatible with <to> value type "{urn:sobject.enterprise.soap.sforce.com}sObject"
     [scac] Make sure that the return value of from-spec query is compatible with the to-spec query

 

The 'offending' code is as follows:

 

 <assign name="AssignInsert">
                      <copy>
                        <from variable="ContactInput" query="/ns2:Contact"/>
                        <to variable="InvokeInsert_create_InputVariable"
                            part="parameters" query="/ns1:create/ns1:sObjects"/>
                      </copy>
                    </assign>

 

where the namespaces are:

 

xmlns:ns1="urn:enterprise.soap.sforce.com"
xmlns:ns2="urn:sobject.enterprise.soap.sforce.com"

 

I don't want to ignore this warning.  Any idea how I can construct my code to make the warnings go away?

 

Thanks in advance for any and all help.

 

- Cris

We set up an application which did a salesforce login followed by an upsert and a logout.  What we learned was that if we had multiple threads using this application, once the first thread reached the logout step, the other threads' session ids became invalid.  We got around the problem by dropping the logout step.  My question is this:

 

1.  If two threads login with the same credentials, do they get the same sessionId?

2.  If so, is it then just best practice not to logout and instead let the session timeout?  Each thread would still log in.

3.  Or would it be better practice to store the session Id after one login and have other threads try to access the salesforce web service using that sessionId?  Only if the access fails would the thread log in.

 

Thx.

 

- Cris

I'd like to apply a workflow filter to an Activity based upon its value for WhatId or WhoId, but neither is available via the GUI.  I recognize that both are polymorphic, which imposes some limits.  But all I really want to do is manage my workflow based upon the types of SObjects WhatId and/or WhoId represent.  For that, I just need the first 3 characters of each Id (although a mapping to the actual SObject type would be nice too).  That way, for example, I could pass as outbound messages, only those activities related to Contacts or Accounts.  Is there a way to do this or am I just out of luck here?

 

- Cris

I have a callout inside a trigger (using @future) that is returning the following:

 

Apex script unhandled exception by user/organization: 005A0000001WKkE/00DA0000000KYuL

 

Failed to invoke future method 'public static void invokeProcess(String, String, String, Decimal, String, String, String, Datetime, String, String)' on class 'xmlnsOracleComVuadvancesfJwsSftest' for job id '707A000000AYXxu'

 

caused by: System.CalloutException: IO Exception: Unauthorized endpoint, please check Setup->Security->Remote site settings. endpoint = https://hostname:port/soa-infra/services/default/project/client_ep

 

I have https://hostname:port in my Remote site settings (the port is well within the 1024 to 64K range).  The SF GUI won't accept the full endpoint URL (the result of the save is just the protocol, the hostname and the port, as I have described).  The message implies that the entire endpoint url should be used, but as I said, the GUI won't accept it.

 

So (1) is the whole endpoint URL needed in remote site settings?  And (2)

 

if so:  how can I compel SF to accept the endpoint URL (or why doesn't if save mine)?

If not:  Any ideas as to what else might be the problem?

 

Any and all help is most welcome and appreciated.

 

- Cris

I have a web service that I want to call from within an APEX trigger.  I've never done that before.  So this is undiscovered country for me.  My wsdl is as follows:

 

<?xml version="1.0" encoding="UTF-8" ?>
<wsdl:definitions
     name="APEXBPEL"
     targetNamespace="http://xmlns.oracle.com/VUAdvanceSF_jws/SFTest/APEXBPEL"
     xmlns:client="http://xmlns.oracle.com/VUAdvanceSF_jws/SFTest/APEXBPEL"
     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    >
    <wsdl:types>
        <schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema"
             xmlns:client="http://xmlns.oracle.com/VUAdvanceSF_jws/SFTest/APEXBPEL" targetNamespace="http://xmlns.oracle.com/VUAdvanceSF_jws/SFTest/APEXBPEL">
            <element name="process">
                <complexType>
                    <sequence>
                        <element name="UserID" nillable="true" minOccurs="0" type="string"/>
                        <element name="BannerID" nillable="true" minOccurs="0" type="string"/>
                        <element name="BannerLastName" nillable="true" minOccurs="0" type="string"/>
                        <element name="Pidm" nillable="true" minOccurs="0" type="decimal"/>
                        <element name="Subject" nillable="true" minOccurs="0" type="string"/>
                        <element name="Comments" nillable="true" minOccurs="0" type="string"/>
                        <element name="AssignedTo" nillable="true" minOccurs="0" type="string"/>
                        <element name="ModifiedDate" nillable="true" minOccurs="0" type="dateTime"/>
                        <element name="ModifiedUser" nillable="true" minOccurs="0" type="string"/>
                        <element name="DataSource" nillable="true" minOccurs="0" type="string"/>
                    </sequence>
                </complexType>
            </element>
        </schema>
    </wsdl:types>
    <wsdl:message name="APEXBPELRequestMessage">
        <wsdl:part name="payload" element="client:process"/>
    </wsdl:message>
    <wsdl:portType name="APEXBPEL">
        <wsdl:operation name="process">
            <wsdl:input message="client:APEXBPELRequestMessage"/>
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="APEXBPELBinding" type="client:APEXBPEL">
        <soap:binding xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsdl:operation name="process">
            <soap:operation xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" style="document" soapAction="process"/>
            <wsdl:input>
                <soap:body xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" use="literal" namespace="http://xmlns.oracle.com/VUAdvanceSF_jws/SFTest/APEXBPEL"/>
            </wsdl:input>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="apexbpel_client_ep">
        <wsdl:port name="APEXBPEL_pt" binding="client:APEXBPELBinding">
            <soap:address xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" location="location of service"/>
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>

 

When I try to parse the wsdl into APEX is get:

 

Error: Failed to parse wsdl: output not defined in binding operation '{http://xmlns.oracle.com/VUAdvanceSF_jws/SFTest/APEXBPEL}process'

 

I am using fire and forget because (1) I am not sending data back and (2)  I understand that one cannot call a sync web service from inside trigger code.  This wsdl works fine when I test the web service independently of Salesforce.  Anyone have any idea what is amiss here?  Thanks.

 

- Cris

I am using Oracle SOA 11g (BPEL) to drive integrations to SF.  As such, I don't have the benefit of a tool like wsdl2java.  So I need to use the SF schema to manipulate SObjects in my BPEL processes.  But the SF wsdl only defines objects.  There are no object declarations.  So to start with, I have nothing with which to populate a variable in BPEL.  I don't want to add my own declarations to the SF wsdl because the wsdl changes too frequently, particularly since the underlying schema my business is using is in a state of flux as its use of SF evolves.  I have been able to add those declarations to a wsdl that imports the enterprise.wsdl, but that's a dangerous approach since it violates the visibility rule for embedded schemas in imported wsdls.  I read a whitepaper put out by an Oracle consulting company about integrating between Oracle SOA 11g and SF, but those folks actually hardcoded their SF object in their BPEL process using an XML fragment.  I see that as unmaintable as I continue to create integrations for many SObjects.  So I am writing to appeal to anyone for a better strategy.  I wish the wsdl contained declarations.  Then I wouldn't have to worry about all this.  Can anyone explain to me why it doesn't?

 

Thanks,

 

Cris

According to the SF API manual (version 19), the IP ranges SF uses for outbound messaging are as follows:

 

"Lock down the client application’s listener to accept requests only from the Salesforce.com IP range. While this guarantees the message came from Salesforce.com, it does not guarantee that another customer is not pointing to your endpoint and sending messages. The Salesforce.com IP ranges are:


  • 204.14.232.64 to 204.14.232.79
  • 204.14.234.64 to 204.14.234.79"

We tried this range but messages just bounced off our firewall.  When we temporarily expanded the range, we found an incoming message on 204.14.234.8 - outside the range specified above.  We are working with a sandbox, not production.  It would appear that the IP ranges in the manual are either incorrect or do they do not also apply to a sandbox.  If so, can you provide the correct IP range so we can button up our firewall appropriately?

 

Thanks.

 

- Cris

We set up an application which did a salesforce login followed by an upsert and a logout.  What we learned was that if we had multiple threads using this application, once the first thread reached the logout step, the other threads' session ids became invalid.  We got around the problem by dropping the logout step.  My question is this:

 

1.  If two threads login with the same credentials, do they get the same sessionId?

2.  If so, is it then just best practice not to logout and instead let the session timeout?  Each thread would still log in.

3.  Or would it be better practice to store the session Id after one login and have other threads try to access the salesforce web service using that sessionId?  Only if the access fails would the thread log in.

 

Thx.

 

- Cris

Hey guys, how's it going...

I have a quesiton about using Oracle BPEL PM to pull and manipulte data from salesforce.com.  We are specifically trying to map the response from the 'query' operation from an imported Enterprise WSDL to an entitiy-specific schema instance.

We understand that there is an 'inheritance'/extension relationship between the sObject base element and each of the entity elements.  When we attempt to use transformation/mapping tool in BPEL PM, the element names that we see are from the sObject, not for a specific entity type.

Can anyone here offer guidance on how to get the response from a 'query' operation into an entity-specific schema format?  Any information you can offer would be greatly appreciated.

Thanks,
Jeff