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

Brian E. Lozier brian at massassi.com
Sat Feb 25 01:03:29 GMT 2012


I think I tracked it down to an issue with the "extension" keyword in the
wsdl file.  If you notice in this case they are defining a type called
OrderResponseItem.  Then another called named OrderResponseDetailLow which
extends OrderResponseItem but contains an OrderStatus.  Then they are
defining a type called OrderResponseDetailMedium which contains an
OrderResponseDetailLow (which of course contains that original
OrderStatus).  I hacked up the wsdl file to directly include the
OrderStatus and requested the "Low" detail level and my error went away.
However, I need to actually get OrderResponseDetailHigh to get the info I
want from the api.

Is the "extension" keyword not supported in this module?  Does this section
of the WSDL file look wrong at all?  To me it looks fine but as I mentioned
I'm no SOAP or XML expert.

      <s:complexType name=3D"OrderResponseItem" abstract=3D"true">
        <s:sequence>
          <s:element minOccurs=3D"1" maxOccurs=3D"1" name=3D"NumberOfMatche=
s"
type=3D"s:int" />
          <s:element minOccurs=3D"1" maxOccurs=3D"1" name=3D"OrderTimeGMT"
nillable=3D"true" type=3D"s:dateTime" />
          <s:element minOccurs=3D"1" maxOccurs=3D"1" name=3D"LastUpdateDate"
nillable=3D"true" type=3D"s:dateTime" />
          <s:element minOccurs=3D"1" maxOccurs=3D"1" name=3D"TotalOrderAmou=
nt"
type=3D"s:decimal" />
          <s:element minOccurs=3D"0" maxOccurs=3D"1" name=3D"OrderState"
type=3D"s:string" />
          <s:element minOccurs=3D"1" maxOccurs=3D"1" name=3D"DateCancelledG=
MT"
nillable=3D"true" type=3D"s:dateTime" />
          <s:element minOccurs=3D"1" maxOccurs=3D"1" name=3D"OrderID"
type=3D"s:int" />
          <s:element minOccurs=3D"0" maxOccurs=3D"1"
name=3D"ClientOrderIdentifier" type=3D"s:string" />
          <s:element minOccurs=3D"0" maxOccurs=3D"1" name=3D"SellerOrderID"
type=3D"s:string" />
          <s:element minOccurs=3D"0" maxOccurs=3D"1" name=3D"FlagStyle"
type=3D"s:string" />
        </s:sequence>
      </s:complexType>
      <s:complexType name=3D"OrderResponseDetailLow">
        <s:complexContent mixed=3D"false">
          <s:extension base=3D"s1:OrderResponseItem">
            <s:sequence>
              <s:element minOccurs=3D"0" maxOccurs=3D"1" name=3D"OrderStatu=
s"
type=3D"s1:OrderStatus" />
            </s:sequence>
          </s:extension>
        </s:complexContent>
      </s:complexType>
      <s:complexType name=3D"OrderResponseDetailMedium">
        <s:complexContent mixed=3D"false">
          <s:extension base=3D"s1:OrderResponseDetailLow">
            <s:sequence>
              <s:element minOccurs=3D"0" maxOccurs=3D"1" name=3D"ResellerID"
type=3D"s:string" />
              <s:element minOccurs=3D"0" maxOccurs=3D"1"
name=3D"BuyerEmailAddress" type=3D"s:string" />
              <s:element minOccurs=3D"1" maxOccurs=3D"1" name=3D"EmailOptIn"
type=3D"s:boolean" />
              <s:element minOccurs=3D"0" maxOccurs=3D"1" name=3D"PaymentInf=
o"
type=3D"s1:PaymentInfoResponse" />
              <s:element minOccurs=3D"0" maxOccurs=3D"1" name=3D"ShippingIn=
fo"
type=3D"s1:ShippingInfoResponse" />
              <s:element minOccurs=3D"0" maxOccurs=3D"1" name=3D"BillingInf=
o"
type=3D"s1:BillingInfo" />
              <s:element minOccurs=3D"0" maxOccurs=3D"1" name=3D"FlagDescri=
ption"
type=3D"s:string" />
            </s:sequence>
          </s:extension>
        </s:complexContent>
      </s:complexType>
      <s:complexType name=3D"PaymentInfoResponse">
        <s:complexContent mixed=3D"false">
          <s:extension base=3D"s1:PaymentInfo" />
        </s:complexContent>
      </s:complexType>
      <s:complexType name=3D"OrderResponseDetailHigh">
        <s:complexContent mixed=3D"false">
          <s:extension base=3D"s1:OrderResponseDetailMedium">
            <s:sequence>
              <s:element minOccurs=3D"0" maxOccurs=3D"1" name=3D"ShoppingCa=
rt"
type=3D"s1:OrderCart" />
            </s:sequence>
          </s:extension>
        </s:complexContent>
      </s:complexType>
      <s:complexType name=3D"OrderResponseDetailComplete">
        <s:complexContent mixed=3D"false">
          <s:extension base=3D"s1:OrderResponseDetailHigh">
            <s:sequence>
              <s:element minOccurs=3D"0" maxOccurs=3D"1" name=3D"CustomValu=
eList"
type=3D"s1:ArrayOfCustomValue" />
              <s:element minOccurs=3D"0" maxOccurs=3D"1" name=3D"BuyerIpAdd=
ress"
type=3D"s:string" />
              <s:element minOccurs=3D"0" maxOccurs=3D"1"
name=3D"TransactionNotes" type=3D"s:string" />
            </s:sequence>
          </s:extension>
        </s:complexContent>
      </s:complexType>

Thanks again for any help.

On Fri, Feb 24, 2012 at 7:25 AM, Brian E. Lozier <brian at massassi.com> wrote:

> I sent the full dump, and wsdl files yesterday but it looks like they're
> stuck in moderation.
>
>
> On Thu, Feb 23, 2012 at 8:02 AM, Brian E. Lozier <brian at massassi.com>wrot=
e:
>
>>
>>
>> On Thu, Feb 23, 2012 at 1:03 AM, Michael Ludwig <m.ludwig at epages.com>wro=
te:
>>
>>> > Von: Brian E. Lozier
>>>
>>> > ($r, $trace) =3D $wsdl->call('GetOrderList',
>>> >     accountID =3D> $account_id,
>>> >     orderCriteria =3D> {
>>> >         OrderCreationFilterBeginTimeGMT =3D> $begin_time,
>>> >         OrderCreationFilterEndTimeGMT   =3D> $end_time,
>>> >         StatusUpdateFilterBeginTimeGMT  =3D> $begin_time,
>>> >         StatusUpdateFilterEndTimeGMT    =3D> $end_time,
>>> >         JoinDateFiltersWithOr           =3D> 1,
>>> >         PageNumberFilter                =3D> 1,
>>> >         PageSize                        =3D> 100,
>>> >         OrderStateFilter                =3D> 'Active',
>>> >     },
>>> >     %auth,
>>> > );
>>> >
>>> > warn Dumper($trace);
>>> > warn Dumper($r);
>>>
>>> Take a look at:
>>>
>>> https://metacpan.org/module/XML::Compile::SOAP::Trace
>>>
>>> You can do: $trace->printErrors(*STDERR). All the methods listed on that
>>> page are for X::C::S::Trace objects. Try adding, for diagnostics:
>>>
>>> $trace->printRequest(*STDERR, pretty =3D> 1);
>>> $trace->printResponse(*STDERR, pretty =3D> 1);
>>>
>>>
>> I will try this and get back to you.
>>
>>
>>>  >                             'message' =3D> bless( {
>>> >                                                   '_prepend' =3D> 'de=
code
>>> > error: ',
>>> >                                                   'name' =3D>
>>> > 'xxxOrderStatus',
>>> >                                                   'path' =3D>
>>> >
>>> 'xxxGetOrderListResponse/GetOrderListResult/ResultData/OrderResponseIte=
m',
>>> >                                                   '_msgid' =3D> 'elem=
ent
>>> > `{name}\' not processed at {path}',
>>> >                                                   '_expand' =3D> 1,
>>> >                                                   '_domain' =3D> 'xml-
>>> > compile',
>>> >                                                   '_class' =3D> 'misf=
it'
>>> >                                                 },
>>> 'Log::Report::Message' )
>>> >                           }, 'Log::Report::Exception' )
>>> >                  ],
>>>
>>> So does the response contain those xxxOrderStatus elements? Doesn't look
>>> right. Maybe someone made a change to the service implementation that
>>> they didn't mean to go live. I think your interpretation of the error
>>> messsage is correct.
>>>
>>
>> In order to protect the possibly innocent api provider I took out the
>> full url/path and replaced the (seemingly) non-relevant parts with that
>> 'xxx.'  Not a good idea in hindsight.  I'll post the full dump in a seco=
nd,
>> sorry about that.
>>
>>
>>>
>>> Michael
>>>
>>> > I think it's trying to tell me that the response doesn't match the
>>> format
>>> > specified in the wsdl file (like, it couldn't find "xxxOrderStatus" in
>>> the path
>>> >
>>> "xxxGetOrderListResponse/GetOrderListResult/ResultData/OrderResponseIte=
m")
>>> > but I pulled the XML out of the response and parsed it with
>>> XML::Simple and
>>> > by hand in a text editor and it seems like the returned XML is valid
>>> and
>>> > matches the description in the WSDL.  I'm a beginner with SOAP so it's
>>> > possible I'm missing something.  Is there another explanation?  What
>>> else
>>> > can I provide to help debug this?
>>> >
>>> > Also to be clear, every other SOAP call I've made with this provider
>>> has
>>> > worked well through this module, so it's not a systemic problem.
>>> >
>>> > Thanks,
>>> > Brian
>>>
>>> _______________________________________________
>>> Xml-compile mailing list
>>> Xml-compile at lists.scsys.co.uk
>>> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/xml-compile
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/xml-compile/attachments/20120224/9c=
18d221/attachment-0001.htm


More information about the Xml-compile mailing list