We will create a diagram that provides a visual representation of the business objects and their relationships.
Business objects >> Diagrams >> + Business Object Diagram >> provide diagram name >> select the BOs .
We will create a diagram that provides a visual representation of the business objects and their relationships.
Business objects >> Diagrams >> + Business Object Diagram >> provide diagram name >> select the BOs .
Usecase: Here we will create couple of business objects in VBCS. We can achieve the same following 2 ways:
Way1: Create Business Object >> create fields >> import the data as csv file.
Way2: Import a zip file that defines business objects, their fields and data all at one step.
Detailed steps with Screenshots:
Way1: Create Business Object >> create fields >> import the data as csv file.
Here. We wil create a Location Business object.
Click Business Objects >> click + Business objects >> provide business object name >> click fields >> click + field and add field names and data type as necessary. >> create field >> select required column as needed. >> clcik data tab >> import from file.
Way2: Import a zip file that defines business objects, their fields and data all at one step.
Here, we will create Department and Employee Business objects, kept csv files in a zip file.
We have created a zip file having 2 csv filez for department and Employee.
Click on business objects >> click Menu (...) >> select data manager >> select import business objects >> upload zip file >> after import in fields steps we may need to make some changes like data type changes, like department BO, we will change the location field data type to reference type and will refer to location BO. We can also select required fields required in the BO.
Usecase: Here we will create a Web application in VBCS.
Detailed steps with Screenshots:
Click new application and provide application name
Note: We will notice the hrwebpage node contains main node which in turn contains the main-start node. The main node the application's deafult flow containing the deafult page main-start. An application can have mutiple flows, each of which cab be used to group related pages. By convention, a page takes its flow name as a prefix.
Usecase: we have a source json file where we have multiple items or lines and in each line we have line quantity and price. We have to find out the total amount of all the lines in XSLT.
Source payload:
{
"gp_number" : "56826526",
"lineLevel" : [ {
"Qty" : "4.00",
"Rate" : "50.00"
}, {
"Qty" : "3.00",
"Rate" : "25.00"
} ]
}
Target Payload:
{
"gp_number" : "56826526",
"AmountCal_line" : [ {
"Qty" : "4.00",
"Rate" : "50.00",
"Amount" : "200.00"
}, {
"Qty" : "3.00",
"Rate" : "25.00",
"Amount" : "75.00"
} ],
"TotalAmount" : "275.00"
}
Xslt sample:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" omit-xml-declaration="yes"/>
<xsl:template match="/rootElement">
<!-- Initialize sum variable -->
<xsl:variable name="totalSum">
<xsl:call-template name="calculateTotal">
<xsl:with-param name="items" select="items/item"/>
</xsl:call-template>
</xsl:variable>
<!-- Output the total sum -->
<xsl:value-of select="$totalSum"/>
</xsl:template>
<xsl:template name="calculateTotal">
<xsl:param name="items"/>
<xsl:param name="sum" select="0"/>
<!-- Check if there are more items to process -->
<xsl:choose>
<xsl:when test="$items">
<!-- Calculate quantity multiplied by rate for the current item -->
<xsl:variable name="itemTotal" select="$sum + $items[1]/qty * $items[1]/rate"/>
<!-- Recursively call the template for the next item -->
<xsl:call-template name="calculateTotal">
<xsl:with-param name="items" select="$items[position() > 1]"/>
<xsl:with-param name="sum" select="$itemTotal"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<!-- Return the final sum when all items are processed -->
<xsl:value-of select="$sum"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
Screenshots:
Sample Calculator WSDL:
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:ns1="http://org.apache.axis2/xsd"
xmlns:ns="http://c.b.a"
xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
targetNamespace="http://c.b.a"> <wsdl:documentation>Calculator</wsdl:documentation> <wsdl:types> <xs:schema attributeFormDefault="qualified"
elementFormDefault="qualified"
targetNamespace="http://c.b.a"> <xs:element name="add"> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" name="n1" type="xs:int" /> <xs:element minOccurs="0" name="n2" type="xs:int" /> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="addResponse"> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" name="return" type="xs:int" /> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> </wsdl:types> <wsdl:message name="addRequest"> <wsdl:part name="parameters" element="ns:add" /> </wsdl:message> <wsdl:message name="addResponse"> <wsdl:part name="parameters" element="ns:addResponse" /> </wsdl:message> <wsdl:portType name="CalculatorPortType"> <wsdl:operation name="add"> <wsdl:input message="ns:addRequest" wsaw:Action="urn:add" /> <wsdl:output message="ns:addResponse" wsaw:Action="urn:addResponse" /> </wsdl:operation> </wsdl:portType> <wsdl:binding name="CalculatorSoap11Binding" type="ns:CalculatorPortType"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" /> <wsdl:operation name="add"> <soap:operation soapAction="urn:add" style="document" /> <wsdl:input> <soap:body use="literal" /> </wsdl:input> <wsdl:output> <soap:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:binding name="CalculatorSoap12Binding" type="ns:CalculatorPortType"> <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" /> <wsdl:operation name="add"> <soap12:operation soapAction="urn:add" style="document" /> <wsdl:input> <soap12:body use="literal" /> </wsdl:input> <wsdl:output> <soap12:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:binding name="CalculatorHttpBinding" type="ns:CalculatorPortType"> <http:binding verb="POST" /> <wsdl:operation name="add"> <http:operation location="add" /> <wsdl:input> <mime:content type="text/xml" part="parameters" /> </wsdl:input> <wsdl:output> <mime:content type="text/xml" part="parameters" /> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="Calculator"> <wsdl:port name="CalculatorHttpsSoap11Endpoint" binding="ns:CalculatorSoap11Binding"> <soap:address location="https://<host>:<port>/services/Calculator.CalculatorHttpsSoap11Endpoint/" /> </wsdl:port> <wsdl:port name="CalculatorHttpSoap11Endpoint" binding="ns:CalculatorSoap11Binding"> <soap:address location="http://<host>:<port>/services/Calculator.CalculatorHttpSoap11Endpoint/" /> </wsdl:port> <wsdl:port name="CalculatorHttpSoap12Endpoint" binding="ns:CalculatorSoap12Binding"> <soap12:address location="http://<host>:<port>/services/Calculator.CalculatorHttpSoap12Endpoint/" /> </wsdl:port> <wsdl:port name="CalculatorHttpsSoap12Endpoint" binding="ns:CalculatorSoap12Binding"> <soap12:address location="https://<host>:<port>/services/Calculator.CalculatorHttpsSoap12Endpoint/" /> </wsdl:port> <wsdl:port name="CalculatorHttpsEndpoint" binding="ns:CalculatorHttpBinding"> <http:address location="https://<host>:<port>/services/Calculator.CalculatorHttpsEndpoint/" /> </wsdl:port> <wsdl:port name="CalculatorHttpEndpoint" binding="ns:CalculatorHttpBinding"> <http:address location="http://<host>:<port>/services/Calculator.CalculatorHttpEndpoint/" /> </wsdl:port> </wsdl:service> </wsdl:definitions>
Online wsdl generator:
http://marin.jb.free.fr/wsdl/
Two Methods to receive Callback/Business Events from ERP
We can check if the Token-Based Authentication Scheme is Now Enabled for Event Integrations as below:
Step1:
Open in SOAP UI /POSTMan :-
https://<Fusion_Server_host_url>/soa-infra/PublicEvent/subscriptions
Step2:
By default after 22A update OIC will start using Token Based Authentication. This you can check from the About page on your OIC instance. If you need CSF Key based authentication then SR has to be raised.
When TBA (Token Based Authentication) is used.
Points to remember:
Reference:
https://dobbylearns.wordpress.com/2021/05/23/oic-fbdi-callback-related/
1. Export 11g OSB code and import in 12c Jdeveloper. Steps to import OSB project in Jdeveloper: File⇾Import⇾Service Bus Resources⇾ Se...