• scott.fraser
  • NEWBIE
  • 25 Points
  • Member since 2013
  • Qualcomm

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 4
    Replies
Is anyone able to download the Winter 17 Release Overview Deck at this URL: https://success.salesforce.com/0693A000004mwCf?

I tried with a production login and a developer login and neither had access.
Is anyone able to download the Winter 17 Release Overview Deck at this URL: https://success.salesforce.com/0693A000004mwCf?

I tried with a production login and a developer login and neither had access.

Hi,

 

Up front I do not see any scheduled job reporting capabilities--bummer!

 

So I thought what a great opportunity for me to write some code and iterate through the CronTrigger table--bummer again!


To be specific my goal is to be able to report on all scheduled reports that are a year from reaching the scheduled end date.  Thr ConTrigger object does not seem to have a field for what is scheduled, be it a report or an apex class.

 

Is there any undocumented information for a possible hidden field that gives me this information on the CronTrigger object?

 

I see this is a big issue and high maintenance because you can only schedule 5 years out.  If you are not baby-sitting these jobs then you could potentially code or reports that stop running!

 

Any support on this would be appreciated very much.

 

 

Hi,

 

My webservice expects the security header to have username, password, password type and timestamp.

I am stuck with an issue and would like some assistance.

 

My Webservice code is

    public static void setupSecurity(Object service) {

        org.apache.cxf.endpoint.Client client = org.apache.cxf.frontend.ClientProxy.getClient(service);

        org.apache.cxf.endpoint.Endpoint cxfEndpoint = client.getEndpoint();

        Map<String, Object> outProps= new HashMap<String, Object>();

        outProps.put(WSHandlerConstants.ACTION,

                WSHandlerConstants.USERNAME_TOKEN + ' ' + WSHandlerConstants.TIMESTAMP);

        outProps.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_TEXT);

        outProps.put(WSHandlerConstants.PW_CALLBACK_CLASS, ClientPasswordHandler.class.getName());

        outProps.put(WSHandlerConstants.USER, "Admin");

        PhaseInterceptor<SoapMessage> wssOut = new WSS4JOutInterceptor(outProps);

        cxfEndpoint.getOutInterceptors().add(wssOut);

        cxfEndpoint.getOutInterceptors().add(new SAAJOutInterceptor());

    }

 

As PasswordType also has to be sent as part of SOAP header i updated the WSDL.

Below is partial WSDL

 <xsd:schema elementFormDefault="qualified" targetNamespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" >
     <xsd:element name="Security" type="s3:SecurityHeaderType"/>
       <xsd:complexType name="SecurityHeaderType">
        <xsd:sequence>
          <xsd:element minOccurs="1" maxOccurs="1" name="UsernameToken" type="s3:UsernameToken"/>
          <xsd:element minOccurs="1" maxOccurs="1" name="TimeStamp" type="s3:TimeStamp"/>
        </xsd:sequence>
      </xsd:complexType>
      <xsd:complexType name="UsernameToken">
        <xsd:sequence>
          <xsd:element minOccurs="0" maxOccurs="1" name="Username" type="xsd:string"/>
          <xsd:element  minOccurs="1" maxOccurs="1" name="Password">
           <xsd:complexType>
             <xsd:simpleContent>
                 <xsd:extension base="xsd:string">
                       <xsd:attribute name="Type" type="xsd:string"/>
                     </xsd:extension>
              </xsd:simpleContent>
          </xsd:complexType>
           </xsd:element>         
         </xsd:sequence>
      </xsd:complexType>
    
      <xsd:complexType name="TimeStamp">
        <xsd:sequence>
          <xsd:element minOccurs="0" maxOccurs="1" name="Created" type="xsd:dateTime"/>
          <xsd:element minOccurs="0" maxOccurs="1" name="Expires" type="xsd:dateTime"/>
        </xsd:sequence>
      </xsd:complexType>

    </xsd:schema>

 

I added attribute Type for the Password element in WSDL. The Webservice is using PasswordText as the type.

 

Below is the generated code of the security class

public class OasisSecurity {
    public class Password_element {
        public String Type_x;
        private String[] Type_x_att_info = new String[]{'Type'};
        private String[] apex_schema_type_info = new String[]{'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd','true','false'};
        private String[] field_order_type_info = new String[]{};
    }
    public class TimeStamp {
        public DateTime Created;
        public DateTime Expires;
        private String[] Created_type_info = new String[]{'Created','http://www.w3.org/2001/XMLSchema','dateTime','0','1','false'};
        private String[] Expires_type_info = new String[]{'Expires','http://www.w3.org/2001/XMLSchema','dateTime','0','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd','true','false'};
        private String[] field_order_type_info = new String[]{'Created','Expires'};
    }
    public class UsernameToken {
        public String Username;
        public OasisSecurity.Password_element Password;
        private String[] Username_type_info = new String[]{'Username','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
        private String[] Password_type_info = new String[]{'Password','http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd','Password_element','1','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd','true','false'};
        private String[] field_order_type_info = new String[]{'Username','Password'};
    }
    public class SecurityHeaderType {
        public OasisSecurity.UsernameToken UsernameToken;
        public OasisSecurity.TimeStamp TimeStamp;
        private String[] UsernameToken_type_info = new String[]{'UsernameToken','http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd','UsernameToken','1','1','false'};
        private String[] TimeStamp_type_info = new String[]{'TimeStamp','http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd','TimeStamp','1','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd','true','false'};
        private String[] field_order_type_info = new String[]{'UsernameToken','TimeStamp'};
    }
}

 

The problem i am facing is, i am able to assign value to the Type_x of the Password_element class.

But i am unable to set the value to the Password .

 

This is how the header part of my request looks like

<?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><Security xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><UsernameToken><Username>Administrator</Username><Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText" /></UsernameToken><TimeStamp><Created>2010-07-28T17:42:25.966Z</Created><Expires>2010-11-25T17:42:25.966Z</Expires></TimeStamp></Security></env:Header>

 And it can be seen in header that i am just able to pass the attribute Type of Password tag and unable to set Value for Password.

 

I am getting the below error message after the webservice callout.

System.CalloutException: Web service callout failed: WebService returned a SOAP Fault: Fault occurred while processing. faultcode=ns1:client faultactor=

 

Any help on this will be highly appreciated.

I have been working under the impression that Salesforce SOA does not support WSS security tokens while making external Web Service calls in Apex.  I haven't seen anything in the docs about SOA supporting WSS.

I wanted to get confirmation that this is accurate, that SOA cannot create and include WSS 1.0 security tokens in requests to Web Services.