Posts

SOAP vs REST

SOAP vs. REST comparison tableAlthough REST is very popular these days, SOAP still has its place in the world of web services. To help you choose between them, here’s a comparison table of SOAP and REST, that highlights the main differences between the two API styles: SOAPRESTMeaningSimple Object Access ProtocolRepresentational State TransferDesignStandardized protocol with pre-defined rules to follow.Architectural style with loose guidelines and recommendations.ApproachFunction-driven (data available as services, e.g.: “getUser”)Data-driven (data available as resources, e.g. “user”).StatefulnessStateless by default, but it’s possible to make a SOAP API stateful.Stateless (no server-side sessions).CachingAPI calls cannot be cached.API calls can be cached.SecurityWS-Security with SSL support. Built-in ACID compliance.Supports HTTPS and SSL.PerformanceRequires more bandwidth and computing power.Requires fewer resources.Message formatOnly XML.Plain text, HTML, XML, JSON, YAML, and others.…

search wsmkeys in weblogic 12c

Image

XSLT: Normalize the spaces of incoming xml values

This xslt can remove the tailing whitespaces in xml.
<?xml version="1.0"?> <xsl:stylesheet version="1.0"   xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:template match="/">     <xsl:apply-templates />   </xsl:template>
  <xsl:template match="*">     <xsl:copy>       <xsl:for-each select="@*">         <xsl:attribute name="{name()}">           <xsl:value-of select="normalize-space()"/>         </xsl:attribute>       </xsl:for-each>       <xsl:apply-templates/>     </xsl:copy>   </xsl:template>
  <xsl:template match="text()">     <xsl:value-of select="normalize-space()"/>   </xsl:template>
</xsl:stylesheet>

OSB 12c custom xquery functions

Here are the some of OSB custom xquery function that came across: 1.mmddyyyy to date conversion: declare function ns1:mmddyyyy-to-date   ( $dateString as xs:string? )  as xs:date? {
   if (empty($dateString))     then ()    else      xs:date(concat(substring($dateString,7,4),'-',             substring($dateString,1,2),'-',             substring($dateString,4,2)))  } ;
2.day of week:
 declare function ns1:day-of-week   ( $date as xs:date? )  as xs:integer? {
  if (empty($date))   then ()   else xs:integer(($date - xs:date('1901-01-06'))           div xs:dayTimeDuration('P1D')) mod 7  } ;
3.day of week name:
 declare function ns1:day-of-week-name   ( $date as xs:date? )  as xs:string? {
   ('Sunday', 'Monday', 'Tuesday', 'Wednesday',     'Thursday', 'Friday', 'Saturday')       [ns1:day-of-week($date) + 1]  } ;
4.month from date name:
 declare function ns1:month-from-date-name   ( $date as xs:anyAtomicType? )  as xs:string? {
  …

XQuery functions that supported by OSB

NAMESPACES ------------------------------------------------------------------------ xml=http://www.w3.org/XML/1998/namespace fn=http://www.w3.org/2004/07/xpath-functions op=http://www.w3.org/2004/07/xpath-operators err=http://www.w3.org/2004/07/xqt-errors fn-bea=http://www.bea.com/xquery/xquery-functions op-bea=http://www.bea.com/xquery/xquery-operators dt-bea=http://www.bea.com/xquery/xquery-datatypes var-bea=http://www.bea.com/xquery/xquery-variables xf-aug02=http://www.w3.org/2002/08/xquery-function op-aug02=http://www.w3.org/2002/08/xquery-operators xs=http://www.w3.org/2001/XMLSchema xsd=http://www.w3.org/2001/XMLSchema xdt=http://www.w3.org/2004/07/xpath-datatypes local=http://www.w3.org/2004/07/xquery-local-functions declare default function namespace "http://www.w3.org/2004/07/xpath-functions


XQUERY FUNCTIONS ------------------------------------------------------------------------ fn:node-name($arg as node()?) as xs:QName? fn:nilled($arg as node()?) as xs:boolean? fn:string($arg as item()?) a…

Basics to know about OSB11g

1.Why Oracle Service Bus 11g ? What are the Key Benefits and Advantages?
1. Service Virtualization : A core principle of SOA is to ensure that any service consumer can access any service provider - and from any platform. This has been considered as key principle in OSB and it provides robust way of Vitalizing the Service. It's a great value add in SOA Architecture.
2. Loose Coupling : OSB provides loose coupling by mediating between Service provided and Consumer. Without mediation Service consumer and provider will create dependency to each other. A change in single side provider/consumer will lead to the change dependent consumer/provider respectively. OSB bridges the gap of transport, message format, security technology etc.
3. Location Transparency : It's a strategy to hide physical location of actual physical location of service endpoints from the Service Consumer. All Service consumers should know only single logical machine & port name for each service. This allows for …