Namespace prefix

M

marc

Hi,

I would like to add a prefix to a WebService namespace

When I write :

[WebService(Namespace = "http://MyNamespace/WebService")]
....

I have the following response when I test my WebService.

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>

////////////
<TestXMLResponse xmlns="http://MyNamespace/WebService">
/////////////

<TestXMLResult>xml</TestXMLResult>
</TestXMLResponse>
</soap:Body>
</soap:Envelope>

I would like instead : (I only put the modified line)

////////////
<TestXMLResponse xmlns:mns="http://MyNamespace/WebService">
////////////

How can I do that ?

TIA,

Marc
 
A

amar.ingole

Hi,

I am also facing fame problem of adding prefix to the namespace.

If you got the solution can u please let me know the how it can be done.

Thanks,
Amar

**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
 
M

marc

(e-mail address removed) a écrit :
Hi,

I am also facing fame problem of adding prefix to the namespace.

If you got the solution can u please let me know the how it can be done.

Thanks,
Amar

**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...

Amar,

In fact my problem is that I cannot read the XML document that comes
from my webservice with namespace like that :
xmlns="http://MyNamespace".(xmlns:foo="http://MyNamespace" would be better)
I think it's a Saxon issue.(I call this WS from a Java application).

So by now I wrote a no conform WS with : [WebServiceBinding(ConformsTo =
WsiProfiles.None)]. So I can write parameter :ResponseNamespace = "" in
SoapDocumentMethod. The resulting XML document belong to no namespace,
and Saxon can read it.

I know that it's a bad workaround but I don't find other way to make it
work.

Marc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top