[Xml-compile] XML::Compile::WSDL11 strange error state

Mark Overmeer mark at overmeer.net
Mon Feb 27 16:23:59 GMT 2012


* Brian E. Lozier (brian at massassi.com) [120227 15:49]:
> Upon further examination, I'm not sure I'm getting hit with this
> xsi:type thing, given that the wsdl doesn't contain xsi:type anywhere.

xsi:type is only visible in the messages.

> It looks like the elements are defined using complexType, is that the
> same thing?

No, not at all.  xsi:type dynamically refers to a complexType which
describes the structure of an element: it contains the name of a
complexType.

> An element is being defined like this:
> <complexType name="OrderResponseItem" abstract="true">

Not the element, but the type of some element.

> Then a bit later:
> 
>  <s:complexType name="OrderResponseDetailLow">
>         <s:complexContent mixed="false">
>           <s:extension base="s1:OrderResponseItem">
>             <s:sequence>
>               <s:element minOccurs="0" maxOccurs="1"
>                    name="OrderStatus" type="s1:OrderStatus" />
>             </s:sequence>
>           </s:extension>
>         </s:complexContent>
>       </s:complexType>
> 
> So it's saying that OrderResponseDetailLow extends OrderResponseItem
> and includes an OrderStatus.

Yes.

> I don't see anywhere where the wsdl states which type of thing will be
> returned by the api call.  The return type depends on what value I
> pass in (like DetailLevel=Low returns an OrderResponseDetailLow,
> DetailLevel=High returns an OrderResponseDetailHigh).

Probably.  The server will translate that into the type for the returned
element.  Each time an element with the same name but a different content
is produced.

> I'm just curious whether I'm doing anything wrong or if this is a bug,
> unsupported feature, or if the api itself is doing something weird
> that it shouldn't be.

You're API is not clean, using the permitted but inconvenient xsi:type.
It's nothing you can help... however because of this you need to
understand more about XML and SOAP.
-- 
Regards,
               MarkOv

------------------------------------------------------------------------
       Mark Overmeer MSc                                MARKOV Solutions
       Mark at Overmeer.net                          solutions at overmeer.net
http://Mark.Overmeer.net                   http://solutions.overmeer.net




More information about the Xml-compile mailing list