Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Multiple namespaces in XML document - cannot create structure


I have a requirement to create a data type with the following structure :

<?xml version="1.0" encoding="UTF-8" ?>

- <ng0:SX3_XML_DOCUMENT <b>xmlns:ng0="" xmlns:ng1=""</b> xmlns:xsi="" xsi:schemaLocation=" create_srq_request.xsd">

- <ng0:SX3_HEADER>




- <ng0:SX3_BODY>

- <ng1:CreateSrq>

+ <ng1:cross_ref_info>






- <ng1:SRQ>


<ng1:ServiceRequestNo xsi:nil="true" />

<ng1:ContactTel />

<ng1:Email />

- <ng1:Defects>

- <ng1:Defect>




<ng1:DefectLocation />

<ng1:DefectNotes />



- <ng1:Sors>

- <ng1:Sor>



<ng1:SorLocation />





<ng1:Description />


<ng1:AccessNotes />

<ng1:LocationCode />

<ng1:AccessCode />

<ng1:CausedBy />

<ng1:Role />

<ng1:ReportedBy />

<ng1:HomeTel />

<ng1:ReportedDate xsi:nil="true" />

<ng1:ReportedMethod />


<ng1:Notes />

<ng1:AlternativeReference />



<ng1:LegacyReference />


<ng1:CreatedBy />





As you can see there are two namespaces. One for the common header fields (ng0) and one for the body fields (ng1)

How should this be represented in the XML namespace on the Message Type ?

Also how should the elements be named on the data type to make sure they know which namespace they belong to ?

For example: how should the field Role be set in the data type bearing in mind in belongs to the ng1 namespace.

Hope this is clear.

Any help appreciated.



Former Member
Not what you were looking for? View more on this topic or Ask a question