[Xml-compile] Sometimes answer is not populated because of Return section

Simon Cruickshank simon.cruickshank at gmail.com
Wed Apr 5 10:00:35 GMT 2017


Hi All,

First post. Be gentle :-)

I have recently changed our system away from the old wsdl2perl
generated libraries to the current XML::Compile::WSDL11

Code Snippet :-

    my $wsdlfn = '/usr/local/share/xml/wsdl/Y_UK_WEBPORTAL_ATPService.wsdl';
    my $wsdl = XML::Compile::WSDL11->new ( $wsdlfn );
    $wsdl->compileCalls(port => 'HTTP_Port');

    ($answer, $trace) = $wsdl->call(Y_UK_WEBPORTAL_ATP => $request);

In most cases the new system works fine. However some valid responses
leave $answer unpopulated.

Working Response. Answer Populated

<ATP_COV>1664.000</ATP_COV>
<RETURN>
    <TYPE/>
    <ID/>
    <NUMBER>000</NUMBER>
    <MESSAGE/>
    <LOG_NO/>
    <LOG_MSG_NO>000000</LOG_MSG_NO>
    <MESSAGE_V1/>
    <MESSAGE_V2/>
    <MESSAGE_V3/>
    <MESSAGE_V4/>
    <PARAMETER/>
    <ROW>0</ROW>
    <FIELD/>
    <SYSTEM/>
</RETURN>
<UOM>ST</UOM>

Answer not populated. Presumably because of warning message?

<ATP_COV>83.000</ATP_COV>
<RETURN>
    <TYPE>W</TYPE>
    <ID>M3351Material VSB22I</ID>
    <NUMBER>750</NUMBER>
    <MESSAGE> not maintained in plant 6000</MESSAGE>
    <LOG_NO>  000000VSB22I750</LOG_NO>
    <LOG_MSG_NO/>
    <MESSAGE_V1>                                6000</MESSAGE_V1>
    <MESSAGE_V2/>
    <MESSAGE_V3/>
    <MESSAGE_V4/>
    <PARAMETER/>
    <ROW>0</ROW>
    <FIELD/>
    <SYSTEM/>
</RETURN>
<UOM>ST</UOM>

This works with older versions with precompiled Perl libraries wsdl2perl.

Is there a parameter/switch that I can use to still populate the
answer despite the RETURN population. Is it that the Return is
incorrectly populated?

Regards,

Simon



More information about the Xml-compile mailing list