You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by "Tolsch, Ed" <Ed...@fmr.com> on 2001/10/29 21:24:11 UTC

RE: How to get rid of default Namespace URI

Hi,
    Did you ever get a response to this? I'm trying to do the same thing
only opposite. I'm receiving a message generated by a .NET client and am
using the Apache Soap server(2.2). When I return the message to the .NET
client it prepends the default namespace ns1. How can you get rid of this.
Did you have any luck?

-----Original Message-----
From: Dinh Viet Hung [mailto:dinhviet.hung@epiqus.com]
Sent: Thursday, September 06, 2001 12:52 AM
To: soap-user@xml.apache.org
Subject: How to get rid of default Namespace URI




I got a problem when using Apache Soap client to invoke .NET web service. 
The problem is the "Namespace URI" which is generated by default along with
the method name. Below is my soap envelope, 


<SOAP-ENV:Envelope xmlns:SOAP-ENV="
http://schemas.xmlsoap.org/soap/envelope/
<http://schemas.xmlsoap.org/soap/envelope/> " xmlns:xsi="
http://www.w3.org/1999/XMLSchema-instance
<http://www.w3.org/1999/XMLSchema-instance> " xmlns:xsd="
http://www.w3.org/1999/XMLSchema <http://www.w3.org/1999/XMLSchema> ">

  <SOAP-ENV:Body> 
     <ns1:VerifyCreditCard xmlns:ns1=" http://tempuri.org/
<http://tempuri.org/> " SOAP-ENV:encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/
<http://schemas.xmlsoap.org/soap/encoding/> ">

        <CardNumber
xsi:type="ns1:VerifyCreditCardResult">4123123412341234</CardNumber> 
     </ns1:VerifyCreditCard> 
  </SOAP-ENV:Body> 

</SOAP-ENV:Envelope> 


The method VerifyCreditCard is fully qualified element name with namespace
URI "ns1" and local name "VerifyCreditCard". However the .NET soap server
doesn't seem to like the namespace URI "ns1".

If I manually take that namespace URI out, then it works fine. But it is
done manually. I don't know how to do it programmatically using Apache soap
client.

Does anyone have any ideas ? 


BTW: the SOAP spec say that "Immediate child elements of the SOAP Body
element MAY be namespace-qualified" 
==> that means we MAY not need the namespace URI "ns1" here 


Any help is really appreciated, 

Thanks, 
Hung 


RE: How to get rid of default Namespace URI

Posted by "Hung D. Viet" <di...@epiqus.com>.
How to get rid of default Namespace URIUnfortunately no, I haven't got any
work around solution without touching the code :-(

It seems to be a bug with apache soap 2.2 implementation. I have looked at
the code, there is no option for you to turn off this "namespace".

I wonder why other people haven't been hit by this ?!?


  -----Original Message-----
  From: Tolsch, Ed [mailto:Ed.Tolsch@fmr.com]
  Sent: Tuesday, October 30, 2001 4:24 AM
  To: 'dinhviet.hung@epiqus.com'
  Cc: 'soap-user@xml.apache.org'
  Subject: RE: How to get rid of default Namespace URI


  Hi,
      Did you ever get a response to this? I'm trying to do the same thing
only opposite. I'm receiving a message generated by a .NET client and am
using the Apache Soap server(2.2). When I return the message to the .NET
client it prepends the default namespace ns1. How can you get rid of this.
Did you have any luck?
    -----Original Message-----
    From: Dinh Viet Hung [mailto:dinhviet.hung@epiqus.com]
    Sent: Thursday, September 06, 2001 12:52 AM
    To: soap-user@xml.apache.org
    Subject: How to get rid of default Namespace URI




    I got a problem when using Apache Soap client to invoke .NET web
service.
    The problem is the "Namespace URI" which is generated by default along
with the method name. Below is my soap envelope,



    <SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">

      <SOAP-ENV:Body>
         <ns1:VerifyCreditCard xmlns:ns1="http://tempuri.org/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

            <CardNumber
xsi:type="ns1:VerifyCreditCardResult">4123123412341234</CardNumber>
         </ns1:VerifyCreditCard>
      </SOAP-ENV:Body>

    </SOAP-ENV:Envelope>



    The method VerifyCreditCard is fully qualified element name with
namespace URI "ns1" and local name "VerifyCreditCard". However the .NET soap
server doesn't seem to like the namespace URI "ns1".

    If I manually take that namespace URI out, then it works fine. But it is
done manually. I don't know how to do it programmatically using Apache soap
client.

    Does anyone have any ideas ?



    BTW: the SOAP spec say that "Immediate child elements of the SOAP Body
element MAY be namespace-qualified"
    ==> that means we MAY not need the namespace URI "ns1" here



    Any help is really appreciated,

    Thanks,
    Hung


RE: How to get rid of default Namespace URI

Posted by "Hung D. Viet" <di...@epiqus.com>.
How to get rid of default Namespace URIUnfortunately no, I haven't got any
work around solution without touching the code :-(

It seems to be a bug with apache soap 2.2 implementation. I have looked at
the code, there is no option for you to turn off this "namespace".

I wonder why other people haven't been hit by this ?!?


  -----Original Message-----
  From: Tolsch, Ed [mailto:Ed.Tolsch@fmr.com]
  Sent: Tuesday, October 30, 2001 4:24 AM
  To: 'dinhviet.hung@epiqus.com'
  Cc: 'soap-user@xml.apache.org'
  Subject: RE: How to get rid of default Namespace URI


  Hi,
      Did you ever get a response to this? I'm trying to do the same thing
only opposite. I'm receiving a message generated by a .NET client and am
using the Apache Soap server(2.2). When I return the message to the .NET
client it prepends the default namespace ns1. How can you get rid of this.
Did you have any luck?
    -----Original Message-----
    From: Dinh Viet Hung [mailto:dinhviet.hung@epiqus.com]
    Sent: Thursday, September 06, 2001 12:52 AM
    To: soap-user@xml.apache.org
    Subject: How to get rid of default Namespace URI




    I got a problem when using Apache Soap client to invoke .NET web
service.
    The problem is the "Namespace URI" which is generated by default along
with the method name. Below is my soap envelope,



    <SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">

      <SOAP-ENV:Body>
         <ns1:VerifyCreditCard xmlns:ns1="http://tempuri.org/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

            <CardNumber
xsi:type="ns1:VerifyCreditCardResult">4123123412341234</CardNumber>
         </ns1:VerifyCreditCard>
      </SOAP-ENV:Body>

    </SOAP-ENV:Envelope>



    The method VerifyCreditCard is fully qualified element name with
namespace URI "ns1" and local name "VerifyCreditCard". However the .NET soap
server doesn't seem to like the namespace URI "ns1".

    If I manually take that namespace URI out, then it works fine. But it is
done manually. I don't know how to do it programmatically using Apache soap
client.

    Does anyone have any ideas ?



    BTW: the SOAP spec say that "Immediate child elements of the SOAP Body
element MAY be namespace-qualified"
    ==> that means we MAY not need the namespace URI "ns1" here



    Any help is really appreciated,

    Thanks,
    Hung