Tuesday 1 July 2014

Testing BSSV with 910 and WLS JD Edwards web services

This is a simple post that might help you get some well formed XML for testing BSSV with SoapUI so you can ensure that the painful build and deploy process has been successful.

In my example I have an endpoint created, port 9546 on e1web2.

image

My server manager has

image

In Soap UI, right click projects and select new project

Choose a name “Testing”

Then enter the URL “https://e1web2.mits.local:9546/DV910/VoucherMatchManager?WSDL” for example

This will create the following:

image

Note that you are also given a sample request:

image

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:orac="http://oracle.e1.bssv.JP43B000/" xmlns:java="java:oracle.e1.bssv.JP43B000.valueobject" xmlns:java1="java:oracle.e1.bssv.util.J0100010.valueobject" xmlns:java2="java:oracle.e1.bssv.util.J4100010.valueobject">
   <soapenv:Header/>
   <soapenv:Body>
      <orac:processVoucherMatchElement>
         <java:Header>
            <java:ProcessingVersion>?</java:ProcessingVersion>
            <java:SupplierInvoiceNumber>?</java:SupplierInvoiceNumber>
            <java:Company>?</java:Company>
            <java:Supplier>
               <java1:EntityId>?</java1:EntityId>
               <java1:EntityLongId>?</java1:EntityLongId>
               <java1:EntityTaxId>?</java1:EntityTaxId>
            </java:Supplier>
            <java:RemitTo>
               <java1:EntityId>?</java1:EntityId>
               <java1:EntityLongId>?</java1:EntityLongId>
               <java1:EntityTaxId>?</java1:EntityTaxId>
            </java:RemitTo>
            <java:PurchaseOrderKey>
               <java:DocumentNumber>?</java:DocumentNumber>
               <java:DocumentTypeCode>?</java:DocumentTypeCode>
               <java:DocumentCompany>?</java:DocumentCompany>
            </java:PurchaseOrderKey>
            <java:Dates>
               <java:DateInvoice>?</java:DateInvoice>
               <java:DateAccounting>?</java:DateAccounting>
            </java:Dates>
            <!--Zero or more repetitions:-->
            <java:Detail>
               <java:CheckRemark>?</java:CheckRemark>
               <java:DatePaymentDue>?</java:DatePaymentDue>
               <java:PurchaseOrderLineKey>
                  <java:DocumentLineNumber>?</java:DocumentLineNumber>
                  <java:DocumentLineNumberSuffix>?</java:DocumentLineNumberSuffix>
               </java:PurchaseOrderLineKey>
               <java:Item>
                  <java2:ItemId>?</java2:ItemId>
                  <java2:ItemProduct>?</java2:ItemProduct>
                  <java2:ItemCatalog>?</java2:ItemCatalog>
                  <java2:ItemFreeForm>?</java2:ItemFreeForm>
                  <java2:ItemSupplier>?</java2:ItemSupplier>
               </java:Item>
               <java:Quantity>
                  <java:UnitOfMeasureCodeTransaction>?</java:UnitOfMeasureCodeTransaction>
                  <java:QuantityToPay>?</java:QuantityToPay>
               </java:Quantity>
               <java:FinancialDetail>
                  <java:CostUnit>?</java:CostUnit>
                  <java:CostExtended>?</java:CostExtended>
                  <java:AmountTax>?</java:AmountTax>
               </java:FinancialDetail>
            </java:Detail>
            <!--Zero or more repetitions:-->
            <java:AdditionalCharge>
               <java:Description1>?</java:Description1>
               <java:AdditionalChargeQty>?</java:AdditionalChargeQty>
               <java:LineTaxableCode>?</java:LineTaxableCode>
               <java:TaxExplanationCode>?</java:TaxExplanationCode>
               <java:TaxRateArea>?</java:TaxRateArea>
               <java:ExpenseAcctNumber>?</java:ExpenseAcctNumber>
               <java:LineTaxAmount>?</java:LineTaxAmount>
               <java:AdditionalChargeAmt>?</java:AdditionalChargeAmt>
            </java:AdditionalCharge>
            <java:FinancialHeader>
               <java:CurrencyCode>?</java:CurrencyCode>
               <java:RateExchangeOverride>?</java:RateExchangeOverride>
               <java:AmountTotalInvoice>?</java:AmountTotalInvoice>
               <java:AmountTax>?</java:AmountTax>
               <java:PaymentTermsCode>?</java:PaymentTermsCode>
            </java:FinancialHeader>
         </java:Header>
      </orac:processVoucherMatchElement>
   </soapenv:Body>
</soapenv:Envelope>

You just need to change the header information with the appropriate security information:

Note that the sample below is for Addressbook, but has the correct header for security.  This is for user JDE with password P@ssW0rd!

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:orac="http://oracle.e1.bssv.JP010000/">
<soapenv:Header>
   <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
     xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
     xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
     soapenv:mustUnderstand="1">
     <wsse:UsernameToken xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
       xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
       <wsse:Username>JDE</wsse:Username>  
       <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">P@ssW0rd!</wsse:Password
     </wsse:UsernameToken>
   </wsse:Security>
</soapenv:Header>
   <soapenv:Body>
      <orac:getAddressBookElement>
         <entity>
            <entityId>100</entityId>
         </entity>
      </orac:getAddressBookElement>
   </soapenv:Body>
</soapenv:Envelope>

1 comment:

Andre Le Vieux said...

Thanks for the article, I had a question regarding the WSDL. Do you know the WSDL resolves the address location in the snippet beloow? We have setup an SSL service and the reference to the IP address in the WSDL causes the SSL to break (we are using a CA provided certificate e.g. *.domain.com.au) because of the IP address. I have searched the Weblogic Server configuration, and cannot see how this value is set, any help would be appreciated.