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 JUNE 09, 2016

Applies to:

Oracle Weblogic Server - Version: 10.3.2 and later   [Release: 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?

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://test.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://test.com/sample">
<ns1:input_1>hello</ns1:input_1>
</ns1:shiporder>

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

Changes

N/A.

Cause

Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms