cancel
Showing results for 
Search instead for 
Did you mean: 

namespace URI length restriction in xsd-external deifinition

former_member200339
Participant
0 Kudos

Hi Forum,

in XI Integration builder->Repository,

when i import a xsd for creating a external definition,

if any element (XML Global Element) has namespace URI with length greater than 60 characters,

that element neither appears as "Messages", nor can i use that external definition in a message mapping, or message interface

why is this restriction

Accepted Solutions (0)

Answers (2)

Answers (2)

stefan_grube
Active Contributor
0 Kudos

This restriction is omitted in PI 7.1

Meanwhile you have to shorten the namespaces in the XSD and create a pre or post mapping for handling the namespaces.

Regards

Stefan

former_member200339
Participant
0 Kudos

Hi Volker and Stefan,

thanks for ur replies.....

again a bug.....

so i tried to fix it by truncating the namespace and making a dummy external definition,

and then doing a java mapping to create a XML instance having the original namespace URI,

but java mapping has got another BUG,

if a transform a XML instance using a java class (java mapping), and the XML instance has a attribute in the root element with a namespace prefix attached to it, java maping gives an error,

see the case:

*************************************************************************************************

I am using java mapping, to transform a Message type (actually a external definition) to another (in a interface mapping), actually the mapping produces the same XML as the input,

there is problem which i have observed,

the root element of the XML has a attribute which belongs to a different namespace from that of the root elemnet itself,

it looks like the following:

<ns0:add ns1:encodingStyle="" xmlns:ns0="http://localhost:8080/axis/CalculatorTruncate.jws" xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/">

</ns0:add>

on executing the javamapping it gives an error:

--Exception during serialization: javax.xml.transform.TransformerException: Namespace fixup failed. Prefix 'ns1' used in attribute 'ns1:encodingStyle' is not declared anywhere

which is absolutely wrong,

but, when i deliberately removed that namespace prefix from the attribute (encodingStyle) of the root element, it works well,

but i need that namespace prefix attached.

Is it a bug with javamapping, or am i going wrong somewhere,

please help........

please note that i have imported XSDs from outside, and they are well formed and validated.

Former Member
0 Kudos

Hi!

Maybe two things to try.

1. Does everything work with truncated namespaces without your java mapping?

2. ns1 is used by you before it is declared (in the same tag).

<ns0:add ns1:encodingStyle="" xmlns:ns0="http://localhost:8080/axis/CalculatorTruncate.jws" xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/">

Regards,

volker

former_member200339
Participant
0 Kudos

hi Volker,

1. No i need to send the xml to the target destination with the proper namespace, so even though i make a external definition with an XSD with namespace truncated, but i use a java mapping to convert this namespace to original length.

2. it is perfectly all right to declare a namespace, after its usage (of course, in the same tag), so, nothing is wrong in doing that.....

anyways, i have tried as per ur suggestion ...but that is also not happening,

i m pretty sure its a bug............pls suggest ............

Former Member
0 Kudos

Hi!

This is a technical restriction of XI 3.0. Max. length of names of IR objects in 60 characters.

In PI71 you can use 256 characters.

This means you will have to change your XSD file before importing it into XI or upgrade to PI71 ;-).

Regards,

Volker