in reply to Re^6: using a client SOAP with SOAP::Lite with ComplexType
in thread using a client SOAP with SOAP::Lite with ComplexType
now, the enveloppe that i send looks like :package ContextType; use strict; use warnings; use SOAP::Data::ComplexType; use vars qw(@ISA); @ISA = qw(SOAP::Data::ComplexType); use constant OBJ_URI => 'http://w1.agen.com/services/DeliveryWS'; use constant OBJ_TYPE => 'ns1:Context'; use constant OBJ_FIELDS => { user => ['soapenc:string', undef, undef], agent => ['xsd:boolean', undef, undef], }; sub new { my $proto = shift; my $class = ref($proto) || $proto; my $data = shift; my $obj_fields = shift; $obj_fields = defined $obj_fields && ref($obj_fields) eq 'HASH' +? {%{$obj_fields}, %{+OBJ_FIELDS}} : OBJ_FIELDS; my $self = $class->SUPER::new($data, $obj_fields); return bless($self, $class); }
For the second issue, i found a dirty workaround in the Lite.pm file.<?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:xsi="http:/ +/www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xm +lsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema +" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmln +s:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><change +DeliveryState xmlns="http://w1.agen.com/services/DeliveryWS"><c-gensy +m3><agent xsi:type="xsd:boolean">1</agent><user xsi:type="soapenc:str +ing">jbbec</user></c-gensym3><c-gensym7 xsi:type="xsd:long">526101</c +-gensym7><c-gensym9 xsi:type="xsd:long">2</c-gensym9></changeDelivery +State></soap:Body></soap:Envelope>
I will change this very very dirty thing to a better one later, maybe this WE.'int' => [25, sub {$_[0] =~ /^[+-]?(\d+)$/ && $1 >= -214748 +3648;}, 'as_long'], 'long' => [20, sub {$_[0] =~ /^[+-]?(\d+)$/ && $1 >= -214748 +3648; }, 'as_long'],
|
|---|