Namespace prefix

Marc (archive)

Usenet Archive
Joined
Dec 14, 1999
Messages
640
Reaction score
0
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
 

amar.ingole

Usenet Archive
Joined
Dec 30, 2005
Messages
1
Reaction score
0
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...
 

Marc (archive)

Usenet Archive
Joined
Dec 14, 1999
Messages
640
Reaction score
0
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
548,049
Messages
3,104,246
Members
248,133
Latest member
DujonT

Latest Threads

Top