Scenario
This document presents how to deploy an outbound WS to WLS and how to execute testing using Siebel Simulator Toolkit.
Deploy Outbound WS to WLS
1. Open your JDev and go to File > New > Siebel Fusion EAI
2. Select Siebel Fusion EAI Deployment and click Next.
3. Next
4. Select Siebel Outbound Services
5. Fill necessary field with proper value.
Please note that the Outbound Web Service JNDI Name is your RemoteJNDIName. This value will be used in following section.
6. Fill necessary field with proper value.
7. Finish.
8. Startup you WLS and go to Deployment View to confirm if you have deployed your Outbound WS successfully.
Test Outbound WS using Simulator
1. Open an employee application for Siebel product and go to Web Map.
2. Click Admin-Business Service > Simulator
3. Create a new service and fill necessary field with proper value.
4. Now, we need to create an input arguments xml to let’s import to Siebel Simulator.
Below is a sample argument xml
xml version="1.0" encoding="UTF-8" ?>
Siebel-Property-Set EscapeNames="true"?> <ConvertLonLatPtToNearestPlace EndPointName="TerraServiceSoap12" RemoteJNDIName="eis.siebel.outbound.TerraService2" WebServiceName="TerraService" WebMethodName="ConvertLonLatPtToNearestPlace"> <point Lon="46.77" Lat="66.01" /> ConvertLonLatPtToNearestPlace>
Please follow below step to learn how to create similar file.
1) Open your Outbound WSDL file. Like following.
genericbarcode.wsdl
xml version="1.0" encoding="utf8" ?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://www.webservicex.net/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://www.webservicex.net/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Barcode generatorwsdl:documentation> <wsdl:types> <s:schema elementFormDefault="qualified" targetNamespace="http://www.webservicex.net/"> <s:element name="GenerateBarCode"> <s:complexType> <s:sequence> <s:element minOccurs="1" maxOccurs="1" name="BarCodeParam" type="tns:BarCodeData" /> <s:element minOccurs="0" maxOccurs="1" name="BarCodeText" type="s:string" /> s:sequence> s:complexType> s:element> <s:complexType name="BarCodeData"> <s:sequence> <s:element minOccurs="1" maxOccurs="1" name="Height" type="s:int" /> <s:element minOccurs="1" maxOccurs="1" name="Width" type="s:int" /> <s:element minOccurs="1" maxOccurs="1" name="Angle" type="s:int" /> <s:element minOccurs="1" maxOccurs="1" name="Ratio" type="s:int" /> <s:element minOccurs="1" maxOccurs="1" name="Module" type="s:int" /> <s:element minOccurs="1" maxOccurs="1" name="Left" type="s:int" /> <s:element minOccurs="1" maxOccurs="1" name="Top" type="s:int" /> <s:element minOccurs="1" maxOccurs="1" name="CheckSum" type="s:boolean" /> <s:element minOccurs="0" maxOccurs="1" name="FontName" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="BarColor" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="BGColor" type="s:string" /> <s:element minOccurs="1" maxOccurs="1" name="FontSize" type="s:float" /> <s:element minOccurs="1" maxOccurs="1" name="barcodeOption" type="tns:BarcodeOption" /> <s:element minOccurs="1" maxOccurs="1" name="barcodeType" type="tns:BarcodeType" /> <s:element minOccurs="1" maxOccurs="1" name="checkSumMethod" type="tns:CheckSumMethod" /> <s:element minOccurs="1" maxOccurs="1" name="showTextPosition" type="tns:ShowTextPosition" /> <s:element minOccurs="1" maxOccurs="1" name="BarCodeImageFormat" type="tns:ImageFormats" /> s:sequence> s:complexType> <s:simpleType name="BarcodeOption"> <s:restriction base="s:string"> <s:enumeration value="None" /> <s:enumeration value="Code" /> <s:enumeration value="Typ" /> <s:enumeration value="Both" /> s:restriction> s:simpleType> <s:simpleType name="BarcodeType"> <s:restriction base="s:string"> <s:enumeration value="Code_2_5_interleaved" /> <s:enumeration value="Code_2_5_industrial" /> <s:enumeration value="Code_2_5_matrix" /> <s:enumeration value="Code39" /> <s:enumeration value="Code39Extended" /> <s:enumeration value="Code128A" /> <s:enumeration value="Code128B" /> <s:enumeration value="Code128C" /> <s:enumeration value="Code93" /> <s:enumeration value="Code93Extended" /> <s:enumeration value="CodeMSI" /> <s:enumeration value="CodePostNet" /> <s:enumeration value="CodeCodabar" /> <s:enumeration value="CodeEAN8" /> <s:enumeration value="CodeEAN13" /> <s:enumeration value="CodeUPC_A" /> <s:enumeration value="CodeUPC_E0" /> <s:enumeration value="CodeUPC_E1" /> <s:enumeration value="CodeUPC_Supp2" /> <s:enumeration value="CodeUPC_Supp5" /> <s:enumeration value="CodeEAN128A" /> <s:enumeration value="CodeEAN128B" /> <s:enumeration value="CodeEAN128C" /> s:restriction> s:simpleType> <s:simpleType name="CheckSumMethod"> <s:restriction base="s:string"> <s:enumeration value="None" /> <s:enumeration value="Modulo10" /> s:restriction> s:simpleType> <s:simpleType name="ShowTextPosition"> <s:restriction base="s:string"> <s:enumeration value="TopLeft" /> <s:enumeration value="TopRight" /> <s:enumeration value="TopCenter" /> <s:enumeration value="BottomLeft" /> <s:enumeration value="BottomRight" /> <s:enumeration value="BottomCenter" /> s:restriction> s:simpleType> <s:simpleType name="ImageFormats"> <s:restriction base="s:string"> <s:enumeration value="BMP" /> <s:enumeration value="EMF" /> <s:enumeration value="EXIF" /> <s:enumeration value="GIF" /> <s:enumeration value="ICON" /> <s:enumeration value="JPEG" /> <s:enumeration value="MemoryBMP" /> <s:enumeration value="PNG" /> <s:enumeration value="TIFF" /> <s:enumeration value="WMF" /> s:restriction> s:simpleType> <s:element name="GenerateBarCodeResponse"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="GenerateBarCodeResult" type="s:base64Binary" /> s:sequence> s:complexType> s:element> s:schema> wsdl:types> <wsdl:message name="GenerateBarCodeSoapIn"> <wsdl:part name="parameters" element="tns:GenerateBarCode" /> wsdl:message> <wsdl:message name="GenerateBarCodeSoapOut"> <wsdl:part name="parameters" element="tns:GenerateBarCodeResponse" /> wsdl:message> <wsdl:portType name="BarCodeSoap"> <wsdl:operation name="GenerateBarCode"> <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">WebserviceX.NET barcode library that provides the means to create barcodes for printing and display in any internet enabled applications. This web service supports Code 128, Industrial 2 of 5, Interleaved 2 of 5, Code 2 5 Matrix, Code 39, Code 39 Extended, Code 93, Code 93 Extended, Codabar, EAN13, EAN8, MSI, Postnet, Supp2, Supp5, UPC A, UPC E0 and UPC E1 barcode formats. This Barcodes returns byte image. It supports following image format JPEG, GIF, PNG, BMP, EMF, EXIF, ICON, MEMORY BMP, TIFF and WMF.wsdl:documentation> <wsdl:input message="tns:GenerateBarCodeSoapIn" /> <wsdl:output message="tns:GenerateBarCodeSoapOut" /> wsdl:operation> wsdl:portType> <wsdl:portType name="BarCodeHttpGet" /> <wsdl:portType name="BarCodeHttpPost" /> <wsdl:binding name="BarCodeSoap" type="tns:BarCodeSoap"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" /> <wsdl:operation name="GenerateBarCode"> <soap:operation soapAction="http://www.webservicex.net/GenerateBarCode" 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="BarCodeSoap12" type="tns:BarCodeSoap"> <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" /> <wsdl:operation name="GenerateBarCode"> <soap12:operation soapAction="http://www.webservicex.net/GenerateBarCode" 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="BarCodeHttpGet" type="tns:BarCodeHttpGet"> <http:binding verb="GET" /> wsdl:binding> <wsdl:binding name="BarCodeHttpPost" type="tns:BarCodeHttpPost"> <http:binding verb="POST" /> wsdl:binding> <wsdl:service name="BarCode"> <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Barcode generatorwsdl:documentation> <wsdl:port name="BarCodeSoap" binding="tns:BarCodeSoap"> <soap:address location="http://www.webservicex.net/genericbarcode.asmx" /> wsdl:port> <wsdl:port name="BarCodeSoap12" binding="tns:BarCodeSoap12"> <soap12:address location="http://www.webservicex.net/genericbarcode.asmx" /> wsdl:port> <wsdl:port name="BarCodeHttpGet" binding="tns:BarCodeHttpGet"> <http:address location="http://www.webservicex.net/genericbarcode.asmx" /> wsdl:port> <wsdl:port name="BarCodeHttpPost" binding="tns:BarCodeHttpPost"> <http:address location="http://www.webservicex.net/genericbarcode.asmx" /> wsdl:port> wsdl:service> wsdl:definitions>
2) Please search tag from bottom to up in order to get your Service Name. In our case, tag is .
So, our Web Service Name=” BarCode”
And you can find that there are 4 ports inside this tag. They are
BarCodeSoap
BarCodeSoap12
BarCodeHttpGet
BarCodeHttpPost
These ports will be your EndPointName in your arguments xml file. So, please pick up one of them. In this case, we choose BarCodeSoap. So our EndPointName=” BarCodeSoap”
3) Please search a tag with attribute Name= BarCodeSoap from bottom to up. In this case, that is
Now, if you drill down this tag, you can find following information.
<wsdl:operation name="GenerateBarCode"> <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">…..wsdl:documentation> <wsdl:input message="tns:GenerateBarCodeSoapIn" /> <wsdl:output message="tns:GenerateBarCodeSoapOut" /> wsdl:operation>
What you have to noticed is and tags, because will be your WebMethodName and will direct you where will you find the method arguments definition. So, in this case, our WebMethodName=” GenerateBarCode”
And Argument direction is GenerateBarCodeSoapIn
4) Next, please search GenerateBarCodeSoapIn from bottom to up. You will find following tag.
<wsdl:message name="GenerateBarCodeSoapIn"> <wsdl:part name="parameters" element="tns:GenerateBarCode" /> wsdl:message>
Please note down element attribute value- GenerateBarCode - and search it from bottom to up.
5) Now, you will see following tag.
<s:element name="GenerateBarCode"> <s:complexType> <s:sequence> <s:element minOccurs="1" maxOccurs="1" name="BarCodeParam" type="tns:BarCodeData" /> <s:element minOccurs="0" maxOccurs="1" name="BarCodeText" type="s:string" /> s:sequence> s:complexType> s:element>
In this tag, there are 2 arguments which are definite for our web service method “GenerateBarCode”.
And please notice their data type. One is tns:BarCodeData and another one is s:string. That means the argument BarCodeParam is complex data object. And its data type is BarCodeData. But argument BarCodeText is a simple data object, because its data type is string.
It is also worth notice for us is the attributes minOccurs and maxOccurs.
minOccurs=1 means this element must be stated in our request for one time at least.
minOccurs=0 means this element is optional and you haven’t stated it in our request.
maxOccurs=1 means this element could be stated in our request for one time at most.
maxOccurs=unbound means we can stated this element in our request for any times.
To summary, in our case, we must state BarCodeParam for one time and we needn’t to present BarCodeText in our request.
6) Now, please search with attribute Name="BarCodeData". You can find following information.
<s:complexType name="BarCodeData"> <s:sequence> <s:element minOccurs="1" maxOccurs="1" name="Height" type="s:int" /> <s:element minOccurs="1" maxOccurs="1" name="Width" type="s:int" /> <s:element minOccurs="1" maxOccurs="1" name="Angle" type="s:int" /> <s:element minOccurs="1" maxOccurs="1" name="Ratio" type="s:int" /> <s:element minOccurs="1" maxOccurs="1" name="Module" type="s:int" /> <s:element minOccurs="1" maxOccurs="1" name="Left" type="s:int" /> <s:element minOccurs="1" maxOccurs="1" name="Top" type="s:int" /> <s:element minOccurs="1" maxOccurs="1" name="CheckSum" type="s:boolean" /> <s:element minOccurs="0" maxOccurs="1" name="FontName" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="BarColor" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="BGColor" type="s:string" /> <s:element minOccurs="1" maxOccurs="1" name="FontSize" type="s:float" /> <s:element minOccurs="1" maxOccurs="1" name="barcodeOption" type="tns:BarcodeOption" /> <s:element minOccurs="1" maxOccurs="1" name="barcodeType" type="tns:BarcodeType" /> <s:element minOccurs="1" maxOccurs="1" name="checkSumMethod" type="tns:CheckSumMethod" /> <s:element minOccurs="1" maxOccurs="1" name="showTextPosition" type="tns:ShowTextPosition" /> <s:element minOccurs="1" maxOccurs="1" name="BarCodeImageFormat" type="tns:ImageFormats" /> s:sequence> s:complexType>
According what we said just now, there are 12 simple type arguments and 5 complex type arguments. So, we can set sample values for these 12 simple type arguments in first. But please note that all these arguments are data members for BarCodeParam object. So, we have to put all these 17 arguments and their values into BarCodeParam tag. Following is my sample.
<BarCodeParam Height="200" Width="200" Angle="0" Ratio="0" Module="0" Left="0" Top="0" CheckSum="true" FontSize="4" />
Ok. Now, we encounter a tricky problem that is next 5 arguments are complex type data just like parameter BarCodeParam. So, according our understanding these arguments should be format as following.
<web:BarCodeParam> <web:Height>20web:Height> <web:Width>20web:Width> <web:Angle>0web:Angle> <web:Ratio>0web:Ratio> <web:Module>0web:Module> <web:Left>0web:Left> <web:Top>0web:Top> <web:CheckSum>trueweb:CheckSum> <web:FontSize>4web:FontSize> <web:barcodeOption>Noneweb:barcodeOption> <web:barcodeType>Code39web:barcodeType> <web:checkSumMethod>Noneweb:checkSumMethod> <web:showTextPosition>TopLeftweb:showTextPosition> <web:BarCodeImageFormat>JPEGweb:BarCodeImageFormat> web:BarCodeParam>
But since the last five parameters are enumeration type though it has a tns specified. Therefore, they should be considered as simple type and should be included inside the parent tags and not seperated. In other words, the correct format should be like this.
<BarCodeParam Height="200" Width="200" Angle="0" Ratio="0" Module="0" Left="0" Top="0" CheckSum="true" FontSize="4" barcodeOption="None" barcodeType="Code39" checkSumMethod="None" showTextPosition="TopLeft" BarCodeImageFormat="JPEG" >
7) The last step to construct our arguments xml file is to fill some necessary fields. In actually, we have talked at the beginning of this guide. They are
<GenerateBarCode RemoteJNDIName="eis.siebel.outbound.genericbarcode" WebServiceName="BarCode" WebMethodName="GenerateBarCode" EndPointName="BarCodeSoap" >
Following is the whole content of our argument xml.
Simulator_Arguments.xml
xml version="1.0" encoding="UTF8" ?>
SiebelPropertySet EscapeNames="true"?> <GenerateBarCode RemoteJNDIName="eis.siebel.outbound.genericbarcode" WebServiceName="BarCode" WebMethodName="GenerateBarCode" EndPointName="BarCodeSoap" > <BarCodeParam Height="200" Width="200" Angle="0" Ratio="0" Module="0" Left="0" Top="0" CheckSum="true" FontSize="4" barcodeOption="None" barcodeType="Code39" checkSumMethod="None" showTextPosition="TopLeft" BarCodeImageFormat="JPEG" /> GenerateBarCode>
TIP:
In fact, there is a easy way to let you construct your argument xml. You can import your WSDL to SoapUI and you can find following sample soap request.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://www.webservicex.net/"> <soapenv:Header/> <soapenv:Body> <web:GenerateBarCode> <web:BarCodeParam> <web:Height>200web:Height> <web:Width>200web:Width> <web:Angle>0web:Angle> <web:Ratio>0web:Ratio> <web:Module>0web:Module> <web:Left>0web:Left> <web:Top>0web:Top> <web:CheckSum>trueweb:CheckSum> <web:FontSize>4web:FontSize> <web:barcodeOption>Noneweb:barcodeOption> <web:barcodeType>Code39web:barcodeType> <web:checkSumMethod>Noneweb:checkSumMethod> <web:showTextPosition>TopLeftweb:showTextPosition> <web:BarCodeImageFormat>JPEGweb:BarCodeImageFormat> web:BarCodeParam> web:GenerateBarCode> soapenv:Body> soapenv:Envelope>
Maybe you have noticed that this sample soap request has same format with our argument xml. So, we can construct our arguments directed by this sample.
5. After creating argument xml, we can click Load From File… Button to import our parameters. And then, we can click Run button to invoke our simulator tesing.
6. If everything is fine, we should get correct response.
For any question, please contact me.