From: den on
wsdl2perl is a great tool, but I'm not very experienced with it. May
be somebody can help. I want to invoke my service from perl, but faced
troubles with Element types that are extensions to complexType. Trying
to play smart and use sub-classing in my .wsdl description.

arg0 parameter of placeOrder() has basicDocument type. fancyDocument
is its subclass which has one more attribute - fancyAttr and declared
<xs:complexType name="fancyDocument">
<xs:extension base="tns:basicDocument">
<xs:element name="fancyAttr" type="xsd:string"/>

wsdl2perl client code generates with no errors. Simple invocation
works great.
my $por = $service->placeOrder({arg0 => {
document => ELDSTypes::basicDocument->new({
docId => "1"

### But I need to have subclassing working
my $por = $service->placeOrder({arg0 => {
document => ELDSTypes::fancyDocument->new({
docId => "1",
fancyAttr => "X"

It doesn't go through because on the wire I get
<basicDocument xmlns="">...
whereas needed
<basicDocument xmlns:xsi=""
xsi:type="ns1:fancyDocument" >...
The latter was discovered after tcpmon soap body editing.

What is the right way of dealing with extended elements in SOAP::WSDL?