Originally posted by: Rajeev30
Hi,
I am new to WTX and facing one issue while validating XML. I have created one SearchRequest.mtt file and added that in Map. I have associated one XSD file while creating input card. after that i build map its successful but when I run my map it gives me error "One or more inputs was invalid". I checked it in trace and found following error. <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="C:\IBM\WebSphere Transformation Extender 8.2\xvallog.xsl"?> <XMLRunLog version="1.0" HomeDir="C:
IBM
WebSphere Transformation Extender 8.2
"> <Card Name="Req"> <InputName Size="580" BaseOffset="0">C:\COPs\WID\integration\WCCTest_12\POC\..\..\..\..\..\TransformationPrototype\XSL_Prototype\Prototype\Sample_XMLS\SOAPReq_BeforeTransformation.xml</InputName> <!--Building the Object Model.... --> <!--Building the Object Model.... --> <!--Parsing the internal buffer.... --> <!--schema location : --> <!--http://com.ibm.wcc/gemoney/services C:\COPs\WID\integration\WCCTest_12\POC\SearchRequest.xsd --> <!--Document Verification : ON --> <!--Start of document --> <StatusMessage>XMLParser: Input XML data is invalid.</StatusMessage> <DetailedStatusMessage> Error (-1), "XMLParser: Input XML data is invalid." SAXParseException, Error line: 1 column: 223 Unknown element 'soapenv:Envelope' </DetailedStatusMessage> <ReturnCode>-1</ReturnCode> </Card> </XMLRunLog> Can you please suggest how to validate my XML with SOAp envelope in WTX. I am attaching my XSD and xml file which i used. When I validate this XML and schema in XMLSPY it doesn't give me any issue but in WTX i am getting error. XML is :-- <?xml version="1.0" encoding="ISO-8859-1"?> <soapenv:Envelope xmlns:q0="http://com.ibm.wcc/gemoney/services" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"> <soapenv:Body> <SearchGEPerson> <control> <requestId>1234</requestId> <requesterName>User</requesterName> <requesterLanguage>100</requesterLanguage> <requesterLocale>en</requesterLocale> </control> <personSearch> <lastName>Rajeev</lastName> </personSearch> </SearchGEPerson> </soapenv:Body> </soapenv:Envelope> and XSD is :-- <?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://com.ibm.wcc/gemoney/services" xmlns:bons1="http://com.ibm.wcc/gemoney/services" xmlns:tns="http://com.ibm.wcc/gemoney/services" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"
<div class="jive-quote"> <xsd:element name="SearchGEPerson">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="control" nillable="true" type="bons1:ControlObj"/>
<xsd:element name="personSearch" nillable="true" type="bons1:GESearchRequest"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="ControlObj">
<xsd:sequence>
<xsd:element name="requestId" type="xsd:long" />
<xsd:element minOccurs="0" name="requesterName"
type="xsd:string" />
<xsd:element minOccurs="0" name="requesterLanguage"
type="xsd:unsignedShort" />
<xsd:element minOccurs="0" name="requesterLocale"
type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="GESearchRequest">
<xsd:sequence>
<xsd:element minOccurs="0" name="postCode" type="xsd:string">
</xsd:element>
<xsd:element minOccurs="0" name="dateOfBirth" type="xsd:date">
</xsd:element>
<xsd:element minOccurs="0" name="phoneNumber" type="xsd:string">
</xsd:element>
<xsd:element minOccurs="0" name="firstName" type="xsd:string">
</xsd:element>
<xsd:element minOccurs="0" name="license" type="xsd:string">
</xsd:element>
<xsd:element minOccurs="0" name="lastName" type="xsd:string">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
Regards,
Rajeev
#IBM-Websphere-Transformation-Extender#DataExchange#IBMSterlingTransformationExtender