view · edit · sidebar · attach · print · history

20160722-debug-incoming-request-conversion-sandoz-xmlconv-bbmb-ch

<< 20160725-debug-request-encoding-sandoz-xmlconv-bbmb-ch | Index | 20160720-non-flavor-url-sbsm-fix-encoding-error-sandoz-xmlconv-bbmb-ch >>


Summary

  • Debugged request input on sandoz.xmlconv.bbmb.ch

Commits / Patches / Pull Requests, Scripts

Index


Debug request input sandoz.xmlconv.bbmb.ch

Next request comes oft into sandoz.xmlconv.bbmb.ch.
like this:
http://sandoz.xmlconv.bbmb.ch/de/transaction/state_id/70294792503780/transaction_id/29175

<?xml version="1.0" encoding="WINDOWS-1252"?>
<E_HOSPITAL_ORDER>
<Sender>
<Buyer GLN="7601001348707"/>
<DeliveryParty GLN="7601001348707"/>
<OrderNumber Number="2016/07/21.11:40"/>
<OrderDate DateTime="20160721"/>
<RequestedDeliveryDate DateTime="20160721"/>
</Sender>
<Recipient GLN="7601001029439"/>
<ItemsList>
<Items Quantity="3" Position="1">
<Identifier Value="2105163125114" Type="ean13"/>
</Items>
<Items Quantity="4" Position="2">
<Identifier Value="7680579970060" Type="ean13"/>
</Items>
...
</ItemsList>
</E_HOSPITAL_ORDER>

I've investigated following points:

  • Encoding is no problem? (WINDNOWS-1252 is CP_1252)
  • XML Structure is valid?
  • Parsers in xmlconv respond to this?
  1. Encoding is ok (sandoz.xmlconv.bbmb.ch can treat this fine)
  2. XML structure is different with expected one in xmlconv
  3. Currently no (ignored), But if I can get xml definition, it is possible.

Speculation

Maybe, I can add new parser for this type XML request.

* <Recipient>'s ''GLN'' attribute is EAN13 Number of <client>
* <ItemsList> might be equivalent to <orderLines>
* <Identifier>'s ''Value'' attribute might be also equivalent to <pharmaCode>'s ''id'' (this is kunden nummer). (Value by ean13)
* <Item>'s ''Quantity'' is <productOrderLine>'s ''orderQuantity''
* <RequestedDeliveryDate> is equivalent to <orderHeader>'s ''deliveryDate'' (But, date format is different)
* Some attributes are missing <client>'s password, <orderHeader>'s referenceNumber.

Questions:

  • Is Product searchable by EAN13 in database at sandoz.xmlconv.bbmb.ch (not pharma code)
  • How important is referenceNumber?

Fix unit test for sandoz.xmlconv.bbmb.ch

soap4r has EncodingConvertMap. And XSD::Charset tries to convert with $KCODE'.
But $KCODE value is ignored (nil) in Ruby 2.3.1 (gone).

Then I made monkey patches to ignore encoding conversion in soap.

[1] 2.3.1-p112(XSD::Charset)> EncodingConvertMap 
=> {
 ["UTF8", "X_ISO_8859_1"]=>  #<Proc> 
 ["X_ISO_8859_1", "UTF8"]=>  #<Proc>
 ["EUC", "SJIS"]=>  #<Proc>
 ["SJIS", "EUC"]=>  #<Proc>
}

continue tomorrow...

  • Fixed all unit-test and integration test
  • Arranged bundle and Rake tasks
  • Add missing dependencies into Gemfile
  • Remove unnecessary test
  • Fix test case to be suitable for current code
# Fixed all unit test...
% bundle exec rake test
/home/yasuhiro/.atelier/usr/share/ywesee/src/sandoz.xmlconv.bbmb.ch/.bundle/gems/ruby/2.3.0/gems/soap4r-1.5.8/lib/xsd/charset.rb:13: warning: variable $KCODE is no longer effective
Run options: --seed 12181

# Running:

..................

Finished in 0.582639s, 30.8939 runs/s, 229.9881 assertions/s.

18 runs, 134 assertions, 0 failures, 0 errors, 0 skips

Commit: Fix all unit tests!

view · edit · sidebar · attach · print · history
Page last modified on July 22, 2016, at 11:43 PM