Namespace prefix

Discussion in 'ASP .Net Web Services' started by marc, Dec 22, 2005.

  1. marc

    marc Guest

    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
     
    marc, Dec 22, 2005
    #1
    1. Advertising

  2. marc

    Guest

    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...
     
    , Dec 30, 2005
    #2
    1. Advertising

  3. marc

    marc Guest

    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
     
    marc, Jan 2, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. heidi

    Tag prefix and namespace

    heidi, Nov 2, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    356
    heidi
    Nov 2, 2003
  2. =?Utf-8?B?c29tYXNsZWVw?=

    namespace prefix

    =?Utf-8?B?c29tYXNsZWVw?=, Jun 10, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    416
    =?Utf-8?B?c29tYXNsZWVw?=
    Jun 10, 2004
  3. Mark McKay
    Replies:
    0
    Views:
    450
    Mark McKay
    Dec 1, 2004
  4. Tim Tyler
    Replies:
    36
    Views:
    1,468
    Darryl L. Pierce
    Dec 10, 2004
  5. Chris  Chiasson
    Replies:
    6
    Views:
    622
    Richard Tobin
    Nov 14, 2006
Loading...

Share This Page