cancel
Showing results for 
Search instead for 
Did you mean: 

XML to XSD Issue in XI

Former Member
0 Kudos

Hi all,

I need a help please, I converted an XML file into XSD and loaded into XI. When I try to access an element to define a condition using Switch in BPM, XI says it can't load the document.

--this is the XML file, just the top bits

<?xml version="1.0" encoding="UTF-8"?>

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:schemaLocation="http://schemas.xmlsoap.org/soap/envelope/ file:///c:/ranjan/Ranjan/wallaby/XI_Test/Progressive/PEL_ACK/PEL_ACK.xsd">

<SOAP-ENV:Header xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><p:msgDetails xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:p="http://bc/servvice" SOAP-ENV:mustUnderstand="1">

<p:sender>

<p:senderId>PEL</p:senderId>

<p:senderName>Progressive Enterprises Ltd</p:senderName>

</p:sender>

<p:receiver>

<p:receiverId>SCA HA</p:receiverId>

<p:receiverName>SCA HA</p:receiverName>

</p:receiver>

<p:docType>Functional Acknowledgment</p:docType>

-


I created the XSD file and referenced to another xsd document using the <xsd:import> from the main document (PEL_ACK.xsd) to the referenced document (p.xsd) and tried to validate the Schema using Stylus Studio, I got the following error message,

--Type not found in http://bc/servvice:msgDetails

--Ref element p:msgDetails not found in the Schema

Where as I have defined the namespace xml:p="http://bc/servvice:msgDetails" in the main document, as below,

--

<?xml version="1.0" encoding="UTF-8"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:p="http://bc/servvice">

<xs:import namespace="http://bc/servvice" schemaLocation="p.xsd"/>

<xs:element name="Envelope">

<xs:complexType>

<xs:sequence>

<xs:element ref="SOAP-ENV:Header"/>

<xs:element ref="SOAP-ENV:Body"/>

</xs:sequence>

<xs:attribute name="encodingStyle" use="required" form="qualified" type="xs:anyURI"/>

</xs:complexType>

</xs:element>

<xs:element name="Header">

<xs:complexType>

<xs:sequence>

<xs:element ref="p:msgDetails"/>

</xs:sequence>

</xs:complexType>

</xs:element>

--

--

---

Can somebody pls suggest whats wrong with this.

TIA

Ranjan

Accepted Solutions (0)

Answers (1)

Answers (1)

MichalKrawczyk
Active Contributor
0 Kudos

Hi Ranjan,

If you got an XML maybe it will be faster to

create a normal data type from it?

even if it has plenty fields it should be much faster then thinking about how to resolve this

and if you do the standard way it's for sure going to work with the switch step

I know it's not the best solution but maybe you can try it:)

Regards,

michal