I've filed a JIRA or two. It's very difficult to control the namespace
prefixes in Xfire.

 

Why do you want to? So long as they correspond correctly to their
definitions in the header, no compliant implementation should care.

 

________________________________

From: Jamie Lister [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 16, 2007 6:36 PM
To: [email protected]
Subject: [xfire-user] Re: Namespace in Soap body breaks client

 

Further to previous post.

I use RPC/Literal/Bare style, annotated service. The JSR181
specification on WebParam namespaces indicate there should not be any
WebParam namespace for my style (only for document, or if parameter is
header). Could my problem be a bug? Also, If I explicitly annotate with
targetNamespace="" then it still puts a namespace on the "demand"
parameter (see example Soap:Body). The demand parameter is an
ArrayOfDemand type. 

i also tried binding XmlBeans, with almost identical results.

cheers,
Jamie

targetNamespace (Web Services Metadata for the
JavaTM Platform - JSR181 PDF)

The XML namespace for the
parameter. 
Only used if the operation is
document style or the paramater
maps to a header.
If the target namespace is set to "",
this represents the empty
namespace.

The empty namespace,
if the operation is 
document style, the
parameter style is
WRAPPED, and the
parameter does not map
to a header.
Otherwise, the default is
the targetNamespace for
the Web Service.

On 1/16/07, Jamie Lister <[EMAIL PROTECTED]> wrote:

Hi,

 I have an Xfire-client that connects to a .NET service.



Xfire/JAXB produces the following soap body, is the embedded namespace
"ns2" necessary? Or even correct?

<soap:Body> 
        <GetBestAvailable xmlns="http://services.softix.com/nlsr/";>
            <performanceId xmlns="">EBEC2007637</performanceId> 
            <categoryId xmlns="">@0</categoryId>
            <ns2:demand xmlns:ns2=" http://services.softix.com/nlsr/
<http://services.softix.com/nlsr/> ">
                <Demand> 
                    <typeId>A</typeId>
                    <quantity>2</quantity>
                </Demand>
            </ns2:demand>
        </GetBestAvailable>
    </soap:Body>

This request breaks the .NET service.
Whereas the .NET client produces this:

    <soap:Body>
        <GetBestAvailable xmlns=" http://services.softix.com/nlsr/
<http://services.softix.com/nlsr/> ">
            <performanceId xmlns="">EBEC2007637</performanceId>
            <categoryId xmlns="">@0</categoryId>
            <demand xmlns=""> 
                <Demand>
                    <typeId>A</typeId>
                    <quantity>2</quantity>
                </Demand>
            </demand>
        </GetBestAvailable> 
    </soap:Body>


cheers,
Jamie

 

Reply via email to