BizTalk Server General - xmlns="" in SOAP return message

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > May 2005 > xmlns="" in SOAP return message





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author xmlns="" in SOAP return message
Ian Castledine

2005-05-23, 5:53 pm

Hi,

I'm having a real problem with namespaces in SOAP response messages. I've
got the following schema that I'm using for the output message (cut down) :

<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns="http://IntegrationOrchestrations.InputSchema"
xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
targetNamespace="http://IntegrationOrchestrations.InputSchema"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:annotation>
<xs:documentation>Schema name: enterprise</xs:documentation>
</xs:annotation>
<xs:element name="enterprise">
<xs:complexType>
<xs:sequence>
<xs:element name="properties">
<xs:complexType>
<xs:sequence>
<xs:element name="type" type="xs:string" />
<xs:element name="comments" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
......
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

This schema validates fine, however when I base the output of a SOAP message
on it, I get the following output (note BiztalkInputResponse is the output
port in the orchestration. btsvr01.scctest.internal is the corresponding
namespace - and the namespace for the web service) :

<?xml version="1.0" encoding="utf-8"?><soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><BiztalkInputResponse
xmlns="http://btsvr01.scctest.internal"><enterprise
xmlns="http://IntegrationOrchestrations.InputSchema"><properties
xmlns=""><type>success</type><comments
/></properties><enterprise></BiztalkInputResponse></soap:Body></soap:Envelope>

I've removed a couple of other elements that sit alongside 'properties' just
to simplify. My question - I need to get rid of the xmlns="" in the
properties element. My other elements at the same level are doing the same.
I've tried adding elementFormDefault=qualified onto the top enterprise level,
however all that happens then is that the properties element disappears
completely from the output.

This is really confusing me now. Any help would be gratefully received.

Thanks
Ian
Ning Lin [MSFT]

2005-05-23, 5:53 pm

Hello Ian,

There are 2 properties that will be of interest to you in regards to
namespaces.

1) At the schema level the property: "ElementFormDefault": The default
value is unqualified. If you set it to qualified here, that means that
every single element in your schema is in the same namespace as specified
in the "TargetNamespace"; unless you overwrite it -- read on 2
2) At each element the property: "Form": the default here inherits from
schema level property. If the schema level was default or unqualified,
then the element is unqualified; otherwise it's qualified. You can
overwrite the schema level qualification by setting it to "qualified" or
"unqualified".

An element that is unqualified is in the namespace "".

For your case, to achieve what you want, you can set the schema level
property "ElementFormDefault" to be "qualified". Then you won't see the
xmlns="" portion in your element names, if you leave the individual
elements' "Form" property to be default or qualified.

Ning

This posting is provided "AS IS" with no warranties, and confers no rights.

Business Process Integration Team


Get Connected!
Meet and interact with key BizTalk Server program managers, developers, and
testers, and let them and other BizTalk Server community team members and
Most Valuable Professionals help you solve your product questions.

Navigate to http://msdn.microsoft.com/subscriptions/support/ in your
webrowser and register as a managed customer to receive MSDN Managed
Newsgroup Support!

MSDN managed newsgroups are available in English to MSDN Universal,
Enterprise, Professional, and Operating Systems subscribers to receive
free, unlimited technical support on select Microsoft technologies as well
as to share ideas with other subscribers.
--------------------[vbcol=seagreen]
<IanCastledine@discussions.microsoft.com>[vbcol=seagreen]
:[vbcol=seagreen]
message[vbcol=seagreen]
output[vbcol=seagreen]
nse[vbcol=seagreen]
ope>[vbcol=seagreen]
just[vbcol=seagreen]
same.[vbcol=seagreen]
level,[vbcol=seagreen]

Ian Castledine

2005-05-23, 5:53 pm

Hi Ning,

Thanks for the advice - although problem not quite solved.

1. Having set the elementformdefault value on the schema, the 'properties'
element no longer appears in the created message. I've tried setting the
elementformdefault value to 'qualified' on each element, but with no success.
2. On further investigation, the WSDL that has been created using the BT Web
Services Publishing Wizard, has only set 'qualified' on the schema. Each
element underneath is specifically set to 'unqualified' - despite changes I
have made in the schema (both with only the top 'schema' value set to
qualified, and also with each element specifically set to 'qualified',

Wierd. Any ideas?

Many thanks for your help
Ian

"Ning Lin [MSFT]" wrote:

> Hello Ian,
>
> There are 2 properties that will be of interest to you in regards to
> namespaces.
>
> 1) At the schema level the property: "ElementFormDefault": The default
> value is unqualified. If you set it to qualified here, that means that
> every single element in your schema is in the same namespace as specified
> in the "TargetNamespace"; unless you overwrite it -- read on 2
> 2) At each element the property: "Form": the default here inherits from
> schema level property. If the schema level was default or unqualified,
> then the element is unqualified; otherwise it's qualified. You can
> overwrite the schema level qualification by setting it to "qualified" or
> "unqualified".
>
> An element that is unqualified is in the namespace "".
>
> For your case, to achieve what you want, you can set the schema level
> property "ElementFormDefault" to be "qualified". Then you won't see the
> xmlns="" portion in your element names, if you leave the individual
> elements' "Form" property to be default or qualified.
>
> Ning
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> Business Process Integration Team
>
>
> Get Connected!
> Meet and interact with key BizTalk Server program managers, developers, and
> testers, and let them and other BizTalk Server community team members and
> Most Valuable Professionals help you solve your product questions.
>
> Navigate to http://msdn.microsoft.com/subscriptions/support/ in your
> webrowser and register as a managed customer to receive MSDN Managed
> Newsgroup Support!
>
> MSDN managed newsgroups are available in English to MSDN Universal,
> Enterprise, Professional, and Operating Systems subscribers to receive
> free, unlimited technical support on select Microsoft technologies as well
> as to share ideas with other subscribers.
> --------------------
> <IanCastledine@discussions.microsoft.com>
> :
> message
> output
> nse
> ope>
> just
> same.
> level,
>
>

Ian Castledine

2005-05-23, 5:53 pm

It's OK - I've sorted the problem. All to do with using a different schema on
the input and output messages. Now solved.

Thanks for the help
Ian

"Ian Castledine" wrote:
[vbcol=seagreen]
> Hi Ning,
>
> Thanks for the advice - although problem not quite solved.
>
> 1. Having set the elementformdefault value on the schema, the 'properties'
> element no longer appears in the created message. I've tried setting the
> elementformdefault value to 'qualified' on each element, but with no success.
> 2. On further investigation, the WSDL that has been created using the BT Web
> Services Publishing Wizard, has only set 'qualified' on the schema. Each
> element underneath is specifically set to 'unqualified' - despite changes I
> have made in the schema (both with only the top 'schema' value set to
> qualified, and also with each element specifically set to 'qualified',
>
> Wierd. Any ideas?
>
> Many thanks for your help
> Ian
>
> "Ning Lin [MSFT]" wrote:
>
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com