Skip to content

implimentation #10

Open
Open
@chacliff

Description

@chacliff

having a hard time with your implementation. i was previously using xml2js so i know what i can take advantage of from there. but i wanted to take advantage of the xsd somehow and found your module.

Your validator seems to get all the way down to the bottom level of the xml and then throws an error. I think i have the proper xsd for my xml but not sure what the problem is here.

   <gsdd:ClinicalRequest>
            <gsdd:Prescribed>
                <gsdd:Product>
                    <gsdd:ProductIdentifier>
                        <gsdd:IdentifierType>ProductID</gsdd:IdentifierType>
                        <gsdd:Identifier>1131</gsdd:Identifier>
                    </gsdd:ProductIdentifier>

is the structure it i believe is diving into.
Here is the schema.xsd entry i believe corresponds to the data.

  <s:complexType name="ProductIdentifierType">
    <s:sequence>
      <s:element name="IdentifierType" type="tns:ProductIdentifierEnum"/>
      <s:element name="Identifier" type="s:string"/>
    </s:sequence>
  </s:complexType>

further.. the enum looks like this

<s:simpleType name="ProductIdentifierEnum" final="list">
    <s:restriction base="s:string">
      <s:enumeration value="NDC9"/>
      <s:enumeration value="ProductID"/>
    </s:restriction>
  </s:simpleType>

All this looks correct to me yet your module reports the error...

    {"message":"Uncaught error: Element ({http://gsdd.goldstandard.com/}Clinical
Request) does not match schema, xpath: /{http://gsdd.goldstandard.com/}ClinicalR
equest/{http://gsdd.goldstandard.com/}Prescribed/{http://gsdd.goldstandard.com/}
Product/{http://gsdd.goldstandard.com/}ProductIdentifier/{http://gsdd.goldstanda
rd.com/}IdentifierType, allowed elements: {}","domain":{"domain":null,"_events":
{},"_eventsCount":1,"members":[]},"domainThrown":true,"isBoom":true,"isServer":t
rue,"data":null,"output":{"statusCode":500,"payload":{"statusCode":500,"error":"
Internal Server Error","message":"An internal server error occurred"},"headers":
{"content-type":"application/json; charset=utf-8","cache-control":"no-cache","co
ntent-encoding":"gzip","vary":"accept-encoding"}},"isDeveloperError":true}

if necessary i can provide the full xsd and the full sample xml. i'm sure we can work together to make your module better if necessary. This should be a good real world example to go off of.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions