Let me provide a complete solution for handling carrier EDI XML with namespace mismatches in OTM. This requires understanding three key aspects:
1. XSD Schema Versioning and Namespace Requirements
Oracle Transportation Management in 24a uses strict XSD validation for all inbound EDI messages. The current shipment schema version is v2 with namespace:
http://xmlns.oracle.com/apps/scm/transportation/shipment/v2
This namespace URI is hardcoded in the import validation logic and cannot be configured to accept alternative namespaces. The schema version (v2) indicates specific element structures that differ from v1:
- ShipmentHeader: v2 requires ShipmentNumber (mandatory), v1 used ShipmentId (optional)
- StatusCode: v2 uses enumerated values (PLANNED, IN_TRANSIT, DELIVERED), v1 used free text
- AddressStructure: v2 requires separate AddressLine1-4 elements, v1 used single Address element
- DateTimeFormat: v2 enforces ISO 8601 format, v1 accepted multiple formats
Your carrier’s v1 schema will have structural incompatibilities beyond just the namespace URI.
2. Namespace URI Validation and Transformation Strategy
The namespace validation occurs at the XML parser level before business logic processing. The error “Invalid namespace URI” means the parser rejected the document immediately. To resolve this, implement a two-stage transformation in OIC:
Stage 1: Namespace Replacement
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:carrier="http://carrier-systems.com/edi/v1"
xmlns:oracle="http://xmlns.oracle.com/apps/scm/transportation/shipment/v2">
<xsl:template match="carrier:*">
<xsl:element name="oracle:{local-name()}"
namespace="http://xmlns.oracle.com/apps/scm/transportation/shipment/v2">
<xsl:copy-of select="@*"/>
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
Stage 2: Element Mapping for Schema Compliance
<xsl:template match="carrier:ShipmentId">
<oracle:ShipmentNumber>
<xsl:value-of select="."/>
</oracle:ShipmentNumber>
</xsl:template>
<xsl:template match="carrier:Status">
<oracle:StatusCode>
<xsl:choose>
<xsl:when test=". = 'shipped'">IN_TRANSIT</xsl:when>
<xsl:when test=". = 'completed'">DELIVERED</xsl:when>
<xsl:otherwise>PLANNED</xsl:otherwise>
</xsl:choose>
</oracle:StatusCode>
</xsl:template>
This two-stage approach ensures both namespace compliance and element-level schema validation.
3. Carrier EDI Onboarding Configuration
In Transportation Management Setup, configure the carrier integration with transformation awareness:
- Carrier Profile: Create carrier with EDI capability enabled
- Communication Method: Set to “Web Service” pointing to your OIC integration endpoint (not directly to carrier)
- Message Format: Select “Custom XML with Transformation”
- Transformation Service: Reference your OIC integration that performs the XSLT transformation
- Schema Validation: Keep enabled - validation occurs AFTER transformation
The integration flow should be:
Carrier System → OIC (XSLT Transform) → OTM Import Service → Shipment Data
Never point OTM directly at the carrier endpoint when namespace/schema differences exist. Always use middleware for transformation.
Complete OIC Integration Pattern:
- REST/SOAP Adapter: Receive carrier XML message
- Stage 1 Transformation: Apply namespace replacement XSLT
- Schema Validation: Validate against intermediate schema (optional but recommended)
- Stage 2 Transformation: Apply element mapping XSLT
- Oracle OTM Adapter: Send transformed XML to OTM import service
- Error Handling: Capture validation failures and notify carrier via callback
Handling Schema Version Differences:
Since your carrier uses v1 and Oracle expects v2, create a comprehensive mapping document:
- Download Oracle’s Transportation Shipment XSD v2 from the OTM documentation
- Obtain carrier’s XSD v1 specification
- Map each carrier element to corresponding Oracle element
- Identify missing required elements (Oracle v2 has ~15 mandatory fields)
- For missing elements, define default values in your XSLT
Example default handling:
<xsl:template match="carrier:Shipment">
<oracle:Shipment>
<xsl:apply-templates/>
<!-- Add required elements missing from carrier v1 -->
<oracle:ShipmentMode>TRUCK</oracle:ShipmentMode>
<oracle:ServiceLevel>STANDARD</oracle:ServiceLevel>
</oracle:Shipment>
</xsl:template>
Testing and Validation:
- Test transformation with sample carrier XML in OIC
- Validate transformed output against Oracle XSD v2 using XML validator
- Submit test message to OTM sandbox environment
- Review import log for any remaining validation errors
- Iterate transformation logic until clean import
Alternative Approach (Not Recommended):
Some implementations try to work around namespace validation by:
- Removing namespace declarations entirely (creates non-standard XML)
- Using Oracle’s SOAP envelope to wrap carrier XML (bypasses validation but fails at business logic layer)
- Requesting Oracle Support to disable namespace validation (not supported in SaaS)
These approaches cause downstream issues and should be avoided. Proper XSLT transformation is the supported and reliable method.
For your specific carrier onboarding, implement the two-stage XSLT transformation in OIC, ensure all v2 mandatory elements are populated (with defaults if needed), and configure the carrier profile to use your transformation service endpoint. This will resolve both the namespace URI validation error and ensure complete schema compliance for successful shipment data import.