view · edit · sidebar · attach · print · history


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


  • Debugged request input on

Commits / Patches / Pull Requests, Scripts


Debug request input

Next request comes oft into
like this:

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

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 ( 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.


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.


  • Is Product searchable by EAN13 in database at (not pharma code)
  • How important is referenceNumber?

Fix unit test for

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/ 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