IBM Sterling Transformation Extender

Sterling Transformation Extender

Come for answers, stay for best practices. All we're missing is you.


#Sterling
#Supplychain
 View Only
  • 1.  XML Schema validation issue.

    Posted 07/31/08 03:46 AM

    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


  • 2.  Re: XML Schema validation issue.

    Posted 07/31/08 02:47 PM

    Originally posted by: SystemAdmin


    Issue is with your schema, not WTX. oXygen won't validate the file either. You aren't properly importing the SOAP definitions.

    jesse
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender


  • 3.  Re: XML Schema validation issue.

    Posted 08/04/08 04:32 AM

    Originally posted by: janhess


    This is what your schema should look like.
    
    <?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">

    <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>


    and this is what the xml should look like

    
    <?xml version=
    "1.0" encoding=
    "UTF-8"?>
    <bons1:SearchGEPerson xmlns:bons1= "http://com.ibm.wcc/gemoney/services" xmlns:soapenv= "http://www.w3.org/2003/05/soap-envelope" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation= "http://com.ibm.wcc/gemoney/services C:\Treasury\Untitled1.xsd "> <control>
    <requestId>2147483647</requestId>
    <requesterName>String</requesterName>
    <requesterLanguage>65535</requesterLanguage>
    <requesterLocale>String</requesterLocale>
    </control>
    <personSearch>
    <postCode>String</postCode>
    <dateOfBirth>1967-08-13</dateOfBirth>
    <phoneNumber>String</phoneNumber>
    <firstName>String</firstName>
    <license>String</license>
    <lastName>String</lastName>
    </personSearch>
    </bons1:SearchGEPerson>

    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 4.  Re: XML Schema validation issue.

    Posted 08/04/08 04:45 AM

    Originally posted by: Rajeev30


    I have modified my xsd and after that WTX is validating my xml
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange