You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by babloosony <ba...@gmail.com> on 2005/03/04 12:45:24 UTC

namespace problem in request soap message

Hi All,

I am using both AXIS 1.2 RC2, Custom (De)Serializers on both client
side and server side. I am  using custom java beans in both my ejb
method call and return type.

I am using axis stubs in my java web service client program and trying
to consume a ejb web service. Below is the  request soap message I got
from my AXIS TCPMonitor:

<?xml version="1.0" encoding="UTF-8"?>   
   <soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <soapenv:Body>           
         <getDPL xmlns="http://ws.si.com/wsdl/dcplanlistws">            
            <d-p-l-r web-ivr-flag="0" >               
               <br-request-bean
xmlns="http://ws.si.com/schemas/dw"></br-request-bean>
            </d-p-l-r>         
         </getDPL>       
      </soapenv:Body>   
   </soapenv:Envelope>
   
   
  
The problem with the above message is that there is no namespace
declaration for the tag/element <d-p-l-r>  and because of this on my
server side my custom (de)serializer is not understanding this element
and hence it is
unable to marshal this element. So what do I do or configure axis so
that namespace declaration exists for each of the  elements in my
request soap message. Ideally I think I should send below soap request
message to my server so that  my deserializer on the server side can
understand how to translate the incoming xml back to java objects.
Please  correct me if my understanding is wrong.

<?xml version="1.0" encoding="UTF-8"?>   
   <soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <soapenv:Body>           
         <getDPL xmlns="http://ws.si.com/wsdl/dw">            
            <d-p-l-r web-ivr-flag="0" >               
               <br-request-bean
xmlns="http://ws.si.com/schemas/dw"></br-request-bean>
            </d-p-l-r>         
         </getDPL>       
      </soapenv:Body>   
   </soapenv:Envelope>



Thanks & Regards,
Kumar.

Re: namespace problem in request soap message

Posted by Anne Thomas Manes <at...@gmail.com>.
You don't need a separate namespace decalaration, because there is a
default namespace declared:

> <getDPL xmlns="http://ws.si.com/wsdl/dcplanlistws">
>             <d-p-l-r web-ivr-flag="0" >

<d-p-l-r> is in the "http://ws.si.com/wsdl/dcplanlistws" namespace. 

If this isn't the correct namespace, then you need to correct your
WSDL document. The WSDL document (or the schema in the WSDL) tells the
stub what namespace to use.

Anne

On Fri, 4 Mar 2005 17:15:24 +0530, babloosony <ba...@gmail.com> wrote:
> Hi All,
> 
> I am using both AXIS 1.2 RC2, Custom (De)Serializers on both client
> side and server side. I am  using custom java beans in both my ejb
> method call and return type.
> 
> I am using axis stubs in my java web service client program and trying
> to consume a ejb web service. Below is the  request soap message I got
> from my AXIS TCPMonitor:
> 
> <?xml version="1.0" encoding="UTF-8"?>
>    <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>       <soapenv:Body>
>          <getDPL xmlns="http://ws.si.com/wsdl/dcplanlistws">
>             <d-p-l-r web-ivr-flag="0" >
>                <br-request-bean
> xmlns="http://ws.si.com/schemas/dw"></br-request-bean>
>             </d-p-l-r>
>          </getDPL>
>       </soapenv:Body>
>    </soapenv:Envelope>
> 
> The problem with the above message is that there is no namespace
> declaration for the tag/element <d-p-l-r>  and because of this on my
> server side my custom (de)serializer is not understanding this element
> and hence it is
> unable to marshal this element. So what do I do or configure axis so
> that namespace declaration exists for each of the  elements in my
> request soap message. Ideally I think I should send below soap request
> message to my server so that  my deserializer on the server side can
> understand how to translate the incoming xml back to java objects.
> Please  correct me if my understanding is wrong.
> 
> <?xml version="1.0" encoding="UTF-8"?>
>    <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>       <soapenv:Body>
>          <getDPL xmlns="http://ws.si.com/wsdl/dw">
>             <d-p-l-r web-ivr-flag="0" >
>                <br-request-bean
> xmlns="http://ws.si.com/schemas/dw"></br-request-bean>
>             </d-p-l-r>
>          </getDPL>
>       </soapenv:Body>
>    </soapenv:Envelope>
> 
> Thanks & Regards,
> Kumar.
>