4 Replies Latest reply on Mar 19, 2008 12:42 PM by 545623

    writing XML without namespace?


      I have a "strange" xml schema in a system I need to export data to. It lacks any forms of namespace (possibly a converted DTD) and it seemd the FTP adapter (from BPEL) cant handle XML-types without namespaces.

      Is there a way to do this without using an opaque adapter and writing the data as "text"?

      The schema the file uses can be found here: http://services.agresso.com/schema/ABWSupplierCustomer/2004/07/02/ABWSupplierCustomer542.xsd

      // Michael Medin
        • 1. Re: writing XML without namespace?
          This works for both BPEL & ESB:

          1. Build an XSD for the source system adapter/process with no XSD.
          2. Build another XSD which acts like wrapper of original XSD.
          3. In the Wrapper XSD include the actual xsd.This one is sample xsd which has the piece of code
                <?xml version="1.0" encoding="windows-1252" ?>
                 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.example.org" targetNamespace="http://xmlns.oracle.com/BPELProcess2"
                xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd" nxsd:version="DTD"
                <include schemaLocation="actual.xsd"/>
          The Target Namespace can be of any URL and this could be of anything.While polling the file or any JMS queue the adapter should include the wrapper xsd instead of actual xsd.This would read the file or any queue even if there is no namespace and the values can be transformed or assigned inside the process.

          • 2. Re: writing XML without namespace?
            Hi there ,

            I believe am facing a similar problem , i have an XSD that am using in my FTP adapter to validate, when i start to poll files i see the message content in my BPEL console, but it failes at the first assign , this is the message i get


            <selectionFailure xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"><part name="summary"><summary>empty variable/expression result.
            xpath variable/expression expression "/ns9:DOCUMENT/ns9:ClassificationResult" is empty at line 137, when attempting reading/copying it.
            Please make sure the variable/expression result "/ns9:DOCUMENT/ns9:ClassificationResult" is not empty.

            any help would be appreciated,

            • 3. Re: writing XML without namespace?
              Adding a namespace to the message solved my problem,


              • 4. Re: writing XML without namespace?
                Hey G,
                xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd" nxsd:version="DTD"
                what's the purpose of this line ? can i leave this out ?

                i am trying to make a wrapper for a FTP adapter , because the messages don't have Namespacing my schema is called Metadata.xsd. and my wrapper DummyNoNS.xsd

                should it look like this :
                <?xml version="1.0" encoding="windows-1252" ?>
                <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.uu.nl/metadata"
                xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd" nxsd:version="DTD"
                <xsd:include schemaLocation="MetaData.xsd"/>

                Thanks in advance