Yes i did it !! in fact i had 2 problems :
- the first was the creation of the complexType
- the second the type of the other params ( long in the prototype) was translated as int in the enveloppe.
First issue :

the solution is :
This ComplexType mod is simpler than the first i wrote (at the biginning of this thread) :
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); }
now, the enveloppe that i send looks like :
<?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>
For the second issue, i found a dirty workaround in the Lite.pm file.
In fact all the int are long
'int' => [25, sub {$_[0] =~ /^[+-]?(\d+)$/ && $1 >= -214748 +3648;}, 'as_long'], 'long' => [20, sub {$_[0] =~ /^[+-]?(\d+)$/ && $1 >= -214748 +3648; }, 'as_long'],
I will change this very very dirty thing to a better one later, maybe this WE.

In reply to Re^7: using a client SOAP with SOAP::Lite with ComplexType by jeanba
in thread using a client SOAP with SOAP::Lite with ComplexType by jeanba

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.