My Oracle Support Banner

WLs 10.3.2: Why does WebLogic set the default namespace, instead of assigning it a specific prefix? (Doc ID 1268117.1)

Last updated on OCTOBER 09, 2020

Applies to:

Oracle WebLogic Server - Version 10.3.2 and later
Information in this document applies to any platform.

Symptoms

If WSDL &Schema defined  element elementFormDefault is assigned a value of "qualified"; you wlll notice that when WebLogic creates the SOAP xml message, it sets 'http://test.com/sample' namespace as the default namespace (i.e. no prefix, like 'm1', is assigned to this namespace). This results in the schema elements in the xml not being qualified, which may be your interface requirement.

How to force WebLogic to assign prefixes to the various namespaces (defined the wsdl/schema), when it creates the xml soap message?

NOTE: The WebLogic Server names and port numbers; WebService application/package/schema names; other attributes used in this article represent a fictitious sample names that made up as example. Any similarity to actual code, is purely coincidental and not intended in any other manner.

 

For Eg:

RESPONSE1  is being generated inside weblogic server with default name space.
RESPONSE1
==========
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<shiporder xmlns="http://hostname.com/sample">
<input_1>hello</input_1>
</shiporder>

</S:Body>
</S:Envelope>

RESPONSE2 is what we are trying to acheive.
RESPONSE2
==========
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns1:shiporder xmlns:ns1="http://hostname.com/sample">
<ns1:input_1>hello</ns1:input_1>
</ns1:shiporder>

</S:Body>
</S:Envelope>

Changes

N/A.

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.