WebHare community

Error in soapencoding.whlib

Running into:

/Users/wouter/projects/webhare/whtree/modules/system/whlibs/internal/soap/soapencoding.whlib:1544:11: Error: Custom error message: ‘FIXME: not implemented’.

The type variable in this case:

+RECORD
 +ABSTRACT: FALSE
 +DERIVATION_METHOD: 'restriction'
 +ID: 357
 +NAME: 'StateOwner'
 +REGISTERED_TOPLEVEL: TRUE
 +TARGET_NAMESPACE: 'http://schemas.datacontract.org/2004/07/BusinessLogic.Models'
 +TYPE: 'complextype'
 +__RAWTYPE: 'XSD_COMPLEXTYPE'
 +ANNOTATIONS: DEFAULT RECORD ARRAY
 +ATTRIBUTE_USES: DEFAULT RECORD ARRAY
 +ATTRIBUTE_WILDCARD: RECORD
  +ID: 4142
  +TYPE: 'ref'
 +BASE_TYPE_DEFINITION: RECORD
  +ID: 63
  +TYPE: 'ref'
 +CONTENT_TYPE: DEFAULT RECORD
 +REFERENCED_FROM: RECORD ARRAY
  +RECORD
   +ID: 965
   +TYPE: 'ref'
  +RECORD
   +ID: 361
   +TYPE: 'ref'
 +USERDATA: RECORD
  +WSDL: RECORD
   +IS_WSDL_ARRAY: FALSE
   +ARRAYTYPE: DEFAULT RECORD'.

Replacing the abort with

        IF (NOT RecordExists(type.content_type))
        {
          RETURN
              [ exists :=       TRUE
              , value :=        DEFAULT RECORD
              ];
        }

at least gets rid of the abort, but this might not be the best solution.

(that said, at least I’m not running into errors anymore so a backport with something like this would be welcome as far as I’m concerned :-))

(that said, at least I’m not running into errors anymore so a backport with something like this would be welcome as far as I’m concerned :-))

The ABORT is there so we can see that a part is not being implemented. It might be safe to ignore in your case (and the target_namespace suggests it may just be boilerplate parts of the XSD that are not actually used) but if we silently ignore it and this part does become relevant it will take a lot more time to figure out where the parsing goes wrong.

At minimum such an “ignore parse issues” should be behind a boolean flag.

Alternatively, you may be able to provide a custom WSDL with the problematic parts removed.

What is the definition of the StateOwner type?

The XSD:

http://apitest.autotelexpro.nl/AutotelexPROAPI.svc?xsd=xsd4

Has:

<xs:complexType name="StateOwner">
<xs:sequence/>
</xs:complexType>
<xs:element name="StateOwner" nillable="true" type="tns:StateOwner"/>

But can’t find StateOwner anywhere else in the XSDs, I guess that’s the problem.

WSDL:

http://apitest.autotelexpro.nl/autotelexproapi.svc?wsdl

But can’t find StateOwner anywhere else in the XSDs, I guess that’s the problem.

the xsd=xsd4 you link has

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://schemas.datacontract.org/2004/07/BusinessLogic.Models" elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/BusinessLogic.Models">

xmlns:tns is the target namespace, so “tns:StateOwner” is pointing to the “complexType StateOwner” above it. so that one isn’t missing.

Ah. Then I don’t really know how to answer @robhulswit’s question :slight_smile:

Would

At minimum such an “ignore parse issues” should be behind a boolean flag.

be an option? (because I need it on a live server pretty soon)

You never posted a full stacktrace so not easy to comment on a ‘good’ position to add such a flag. But merge request welcome.

For future reference, merge request https://gitlab.com/webhare/platform/-/merge_requests/390 was merged.

Use it like this:

    OBJECT client := NEW SoapClient;
    client->overrides := [ codecoverrides := [[ operation := "GetVehicleDataPRO", type := "", ignore_parse_issues := TRUE ]] ];