cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple namespaces in XML document - cannot create structure

Former Member
0 Kudos

Hi,

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="http://www.sx3.com/sx3document" xmlns:ng1="http://www.sx3.com/CREATE_SRQ"</b> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sx3.com/sx3document create_srq_request.xsd">

- <ng0:SX3_HEADER>

<ng0:API>String</ng0:API>

</ng0:SX3_HEADER>

<ng0:SX3_SOAP_HEADER />

- <ng0:SX3_BODY>

- <ng1:CreateSrq>

+ <ng1:cross_ref_info>

<ng1:xref_system>String</ng1:xref_system>

<ng1:xref_group>String</ng1:xref_group>

<ng1:xref_id_list>String</ng1:xref_id_list>

<ng1:xref_id>String</ng1:xref_id>

</ng1:cross_ref_info>

- <ng1:SRQ>

<ng1:PropertyReference>127WILM</ng1:PropertyReference>

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

<ng1:ContactTel />

<ng1:Email />

- <ng1:Defects>

- <ng1:Defect>

<ng1:DefectCode>DATALOAD</ng1:DefectCode>

<ng1:DefectQuantity>1</ng1:DefectQuantity>

<ng1:DefectPriority>MIG</ng1:DefectPriority>

<ng1:DefectLocation />

<ng1:DefectNotes />

</ng1:Defect>

</ng1:Defects>

- <ng1:Sors>

- <ng1:Sor>

<ng1:SorCode>001101</ng1:SorCode>

<ng1:SorQuantiy>1</ng1:SorQuantiy>

<ng1:SorLocation />

</ng1:Sor>

</ng1:Sors>

<ng1:AccessAm>NNYYYNN</ng1:AccessAm>

<ng1:AccessPm>NNYYYNN</ng1:AccessPm>

<ng1:Description />

<ng1:LocationNotes>TEST</ng1:LocationNotes>

<ng1:AccessNotes />

<ng1:LocationCode />

<ng1:AccessCode />

<ng1:CausedBy />

<ng1:Role />

<ng1:ReportedBy />

<ng1:HomeTel />

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

<ng1:ReportedMethod />

<ng1:Priority>MIG</ng1:Priority>

<ng1:Notes />

<ng1:AlternativeReference />

<ng1:RtrIndicator>Y</ng1:RtrIndicator>

<ng1:RechargeApplicable>Y</ng1:RechargeApplicable>

<ng1:LegacyReference />

<ng1:VariableWarning>Y</ng1:VariableWarning>

<ng1:CreatedBy />

</ng1:SRQ>

</ng1:CreateSrq>

</ng0:SX3_BODY>

</ng0:SX3_XML_DOCUMENT>

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.

Cheers

Colin.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Use XSLT mapping in the end

stefan_grube
Active Contributor
0 Kudos

This is not possible with the data type editor.

You need to create a, XSD with an external tool and upload the XSD to the Integration Builder.

If your sender or receiver application requires that kind of structure it should provide a WSDL or XSD, that you can use.

Regards

Stefan

Former Member
0 Kudos

Hi Stefan,

The XSd provided has elements with a prefix ng1: for example.

However when this is imported into XI I get the following error :

Unable to convert imported document to WSDL

Reason: Unable to recognize document as valid XSD

Check the selected category

When the prefix is removed it works ok.

Does this mean you are not allowed to prefix the elements using either method ?

Is the only method to use data type enhancements in some way.

Cheers

Colin.

Former Member
0 Kudos

Hi Colin

Did you ever manage to solve your problem? We're facing the same issues here on XI 3.0 SP16. It seems not possible to use multiple namespaces while prefixing elements with their corresponding namespace...

See thread .

In case you were able to solve it: would be great to share it with us.

Kind regards,

Renaud