<< 20160725-debug-request-encoding-sandoz-xmlconv-bbmb-ch | Index | 20160720-non-flavor-url-sbsm-fix-encoding-error-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:
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:
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... % 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!