Generating an XML Document

I have the xCBL 3.0 OrderResponse schema from their site. When I generate the doc in wM it gives me the full document but put a ns: namespace in front of all the elements. When I get the sample document from the partner they do not have a namespace on the document, its just the tag by itself.

Here is the example of what the partner is expecting.

<?xml version="1.0"?>
<?soxtype urn:x-commerceone:document:com:commerceone:XCBL30:XCBL30.sox$1.0?>
<OrderResponse>
 <OrderResponseHeader>
  <OrderResponseNumber>
   <BuyerOrderResponseNumber>000010001321 200708291700385</BuyerOrderResponseNumber>
   <SellerOrderResponseNumber>H321104</SellerOrderResponseNumber>
  </OrderResponseNumber>
  <OrderResponseIssueDate>20070905T10:04:19-05:00</OrderResponseIssueDate>
  <OrderResponseDocTypeCoded>OrderResponse</OrderResponseDocTypeCoded>
  <OrderReference>
   <Reference>
    <RefNum>000010001321 200708291700385</RefNum>
    <RefDate>20070829T05:00:42+00:00</RefDate>
   </Reference>
  </OrderReference>
 </OrderResponseHeader>
</OrderResponse>
 

The problem is when I generate the schema it creates the document like this…

 
<?xml version="1.0"?>
<ns:OrderResponse xmlns:ns="rrn:org.xcbl:schemas/xcbl/v3_0/xcbl30.xsd" xmlns="[URL="http://www.w3.org/2001/XMLSchema"]http://www.w3.org/2001/XMLSchema[/URL]">
  <ns:OrderResponseHeader>
    <ns:OrderReference>
      <ns:Reference>
        <ns:RefNum>4324234324</ns:RefNum>
      </ns:Reference>
    </ns:OrderReference>
    <ns:SellerParty>
      <ns:Party>
        <ns:PartyID>
          <ns:Identifier>
            <ns:Ident>2343243243</ns:Ident>
          </ns:Identifier>
        </ns:PartyID>
      </ns:Party>
    </ns:SellerParty>
    <ns:BuyerParty>
      <ns:Party>
        <ns:PartyID>
          <ns:Identifier>
            <ns:Ident>2342343242</ns:Ident>
          </ns:Identifier>
        </ns:PartyID>
      </ns:Party>
    </ns:BuyerParty>
  </ns:OrderResponseHeader>
</ns:OrderResponse>
 

Here is the beginning of the xCBL schema

<?xml version="1.0"?>
<?soxtype urn:x-commerceone:document:com:commerceone:XCBL30:XCBL30.sox$1.0?>
<OrderResponse>
 <OrderResponseHeader>
  <OrderResponseNumber>
   <BuyerOrderResponseNumber>000010001321 200708291700385</BuyerOrderResponseNumber>
   <SellerOrderResponseNumber>H321104</SellerOrderResponseNumber>
  </OrderResponseNumber>
  <OrderResponseIssueDate>20070905T10:04:19-05:00</OrderResponseIssueDate>
  <OrderResponseDocTypeCoded>OrderResponse</OrderResponseDocTypeCoded>
  <OrderReference>
   <Reference>
    <RefNum>000010001321 200708291700385</RefNum>
    <RefDate>20070829T05:00:42+00:00</RefDate>
   </Reference>
  </OrderReference>
 
 

Thanks for any help!

I accidental posted the wrong xCBL schema here is what i meant…

 
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="[URL="http://www.w3.org/2001/XMLSchema"]http://www.w3.org/2001/XMLSchema[/URL]" xmlns="rrn:org.xcbl:schemas/xcbl/v3_0/xcbl30.xsd" targetNamespace="rrn:org.xcbl:schemas/xcbl/v3_0/xcbl30.xsd" elementFormDefault="qualified">
    <xsd:annotation>
        <xsd:documentation xml:lang="en">
            XML Common Business Library 3.0
            Copyright 2000 Commerce One, Inc.
            Permission is granted to use, copy, modify and distribute the
            DTD's, schemas and modules in the Commerce One XML Common Business
            Library Version 3.0 subject to the terms and conditions specified
            at [URL="http://www.xcbl.org/license.html"]http://www.xcbl.org/license.html[/URL]
        </xsd:documentation>
    </xsd:annotation>
    <xsd:complexType name="Order">
        <xsd:sequence>
            <xsd:element ref="OrderHeader"/>
            <xsd:element minOccurs="0" ref="OrderDetail"/>
            <xsd:element minOccurs="0" ref="OrderSummary"/>
        </xsd:sequence>
    </xsd:complexType>

 

Hi,

If there is no namespace in the document coming from partner then the XSD which the partner is using has “nonamespace” specification.

Also can you elaborate what exactly is the business case.

One more thing, go through nsDecls parameter of XMLNodeToXMLDocument.

Regards,
Sumit