Thanks for the quick response. You were exactly right, the response contained an empty <payment_information/> element. I'll talk to the server owner to fix.
Now that you pointed it out it seems obvious. I was looking in the wrong place. I did learn a lot reading through your code looking for hints. I haven't used "closures" before, but will be playing around with them for days to learn more :) Dan T. -----Original Message----- From: Mark Overmeer [mailto:[email protected]] Sent: Saturday, August 19, 2017 4:14 AM To: Thibadeau, Daniel <[email protected]> Cc: [email protected] Subject: Re: [Xml-compile] Fault when required child within optional parent node * Thibadeau, Daniel ([email protected]) [170819 04:29]: > error: decode error: data for element or block starting with > `amount_collect' missing at > tns:calculateTaxOnCteDataModelResponse/return/cte_document/document_he > ader/payment_information > > My request does not contain the "payment_information" element, so the > response is also missing that element (as expected). The fault > message seems to only be on the response and not the request. Yes, decoding is performed on the received message. Also, the element named *Response. > I believe this should be a valid WSDL configuration. I do get back a > valid/expected response in $answer I expect that the response contains an empty <payment_information/> But it may also be not empty with an unexpected or out-of-order field. See $trace->printResponse(pretty_print => 1); > What can I do to prevent the error? Fix the schema or server ;-) > Should the printErrors() method be printing the error twice? The first error is only the last (fatal) issue. After that, it lists all issues, sometimes with more information. -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions [email protected] [email protected] http://Mark.Overmeer.net http://solutions.overmeer.net _______________________________________________ Xml-compile mailing list [email protected] http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/xml-compile
