Thursday, May 12, 2016

requesterName not going to lastUpdateUser in MDM Tables

our requesterName from xmls was not going to lastUpdateUser in MDM tables. Instead the username from our xmlheader i.e. mdmadmin was going. 



Fixed by changing /IBM/DWLCommonServices/Security/TrustedClientMode/enabled to true  

Sources Refereed  http://www-01.ibm.com/support/docview.wss?uid=swg21639776 :



Snippet :
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:port="http://composites.mdm.mycompany.com/XYZComposites/port" xmlns:sch="http://www.ibm.com/mdm/schema">
   <soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
      <wsse:Security xmlns:wsse="someURL">
         <wsse:UsernameToken wsu:Id="UsernameToken-123123" xmlns:wsu="someURL">
            <wsse:Username>mdmadmin</wsse:Username>
            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">xxyyzz</wsse:Password>
         </wsse:UsernameToken>
      </wsse:Security>
   </soapenv:Header>
   <soapenv:Body>
      <port:MaintainBusinessXYZCmposite>
         <sch:RequestControl>
            <sch:requestID>999999</sch:requestID>
            <sch:DWLControl>
               <sch:requesterName>myRequesterName</sch:requesterName>
                 .
                 .
                 .

Tuesday, May 10, 2016

Lambda expression.in Java 8

Lambda expression.in Java 8
 In below example we use the usual way of creating lambda expression using arrow syntax and also we used a brand new double colon (::) operator that Java 8 has to convert a normal method into lambda expression.

//Old way:
List<Integer> list = Arrays.asList(1, 2, 3, 4, 5, 6, 7);
for(Integer n: list) {
    System.out.println(n);
}

//New way:
List<Integer> list = Arrays.asList(1, 2, 3, 4, 5, 6, 7);
list.forEach(n -> System.out.println(n));


//or we can use :: double colon operator in Java 8
list.forEach(System.out::println);


by: Suvojeet Pal