You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Alexander Vaagan (JIRA)" <ax...@ws.apache.org> on 2006/03/28 09:30:36 UTC

[jira] Created: (AXIS-2449) Axis does not supply correct namespace in SOAP message

Axis does not supply correct namespace in SOAP message
------------------------------------------------------

         Key: AXIS-2449
         URL: http://issues.apache.org/jira/browse/AXIS-2449
     Project: Apache Axis
        Type: Bug
  Components: Basic Architecture, Serialization/Deserialization  
 Environment: Windows XP, JBoss 4.0.3
    Reporter: Alexander Vaagan


Hi.
I have a WebService running on axis and are trying to consume it from a .NET (C#) client, but all I get back is NULL values.

I have search both this mailing list and others and I can see that I am not the only one having this problem, but I can't seem to find a real fix to the problem.
Some people says I should manually edit the wsdl file and some mean I should manualy edit the .NET proxy, but I don't like either solution sinse it fixes the
symptom not the real problem. 

The service takes a complex type and an int as input and returns å complex type.
In the .wsdd file I have adden a beanMapping that looks like this:

		<beanMapping 
			xmlns:bedriftws="http://data.foo.bar.company"
			qname="companyws:FoobarDO" 
			languageSpecificType="java:company.bar.foo.data.FoobarDO"
		/>
which puts the type in the http://data.foo.bar.company namespace. 
The default namespace is http://foo.bar.company namespace.
The wsdl file is automatically generated from axis like this: http://hostname/webapp/services/FoobarWS?wsdl

The schema definition of the returned object in the wsdl looks like this: (The extension base i found in the "http://framework.company" namespace)

            <schema elementFormDefault="qualified" targetNamespace="http://data.foo.bar.company" xmlns="http://www.w3.org/2001/XMLSchema">   
               <import namespace="http://framework.company"/>   
               <complexType name="FoobarDO">    
                  <complexContent>     
                     <extension base="tns1:Data">      
                        <sequence>       
                           <element name="signatur" nillable="true" type="xsd:string"/>       
                           <element name="kommentar" nillable="true" type="xsd:string"/>       
                        </sequence>     
                     </extension>    
                  </complexContent>   
               </complexType>   

To me it looks like it's located in the correkt namespace as defines in the beanMapping in the wsdd file.

The problem is that axis does not send the response in the correkt namespace:
Eg. Soap response from axis:

<?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>
         <hentFoobarResponse xmlns="http://foo.bar.company">
            <hentFoobarReturn>
               <signatur xsi:nil="true"/>
               <kommentar>Viskom testing testing testing</kommentar>
            </hentFoobarReturn>
         </hentFoobarResponse>
      </soapenv:Body>
   </soapenv:Envelope>

Here the .NET client clearly is trying to find objects and values in the wrong namespace. The wsdl says it's in http://data.foo.bar.company and axis sends it in http://foo.bar.company

I have deployed the same app on a Websphere server (without axis) and this works fine. The return message from Websphere looks like this:

<?xml version="1.0" encoding="utf-8"?>
   <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <soapenv:Header/>
      <soapenv:Body>
         <hentFoobarResponse xmlns="http://foo.bar.company">
            <hentFoobarReturn>
               <signatur xsi:nil="true" xmlns="http://data.foo.bar.company"/>
               <kommentar xmlns="http://data.foo.bar.company">Viskom testing testing testing</kommentar>
            </hentFoobarReturn>
         </hentFoobarResponse >
      </soapenv:Body>
   </soapenv:Envelope>

Here the correkt namespace is supplied and the .NET client can read and deserialize it correctly.

Axis version: Implementation-Version: 1.3 2244 October 5 2005
Java version: java full version "1.4.2_08-b03"



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS-2449) Axis does not supply correct namespace in SOAP message

Posted by "John Busfield (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS-2449?page=comments#action_12413838 ] 

John Busfield commented on AXIS-2449:
-------------------------------------

AXIS-2473 and AXIS-1529 describe the same issue and are also unresolved.

> Axis does not supply correct namespace in SOAP message
> ------------------------------------------------------
>
>          Key: AXIS-2449
>          URL: http://issues.apache.org/jira/browse/AXIS-2449
>      Project: Apache Axis
>         Type: Bug

>   Components: Basic Architecture, Serialization/Deserialization
>  Environment: Windows XP, JBoss 4.0.3
>     Reporter: Alexander Vaagan
>  Attachments: SampleWS.wsdl
>
> Hi.
> I have a WebService running on axis and are trying to consume it from a .NET (C#) client, but all I get back is NULL values.
> I have search both this mailing list and others and I can see that I am not the only one having this problem, but I can't seem to find a real fix to the problem.
> Some people says I should manually edit the wsdl file and some mean I should manualy edit the .NET proxy, but I don't like either solution sinse it fixes the
> symptom not the real problem. 
> The service takes a complex type and an int as input and returns å complex type.
> In the .wsdd file I have adden a beanMapping that looks like this:
> 		<beanMapping 
> 			xmlns:bedriftws="http://data.foo.bar.company"
> 			qname="companyws:FoobarDO" 
> 			languageSpecificType="java:company.bar.foo.data.FoobarDO"
> 		/>
> which puts the type in the http://data.foo.bar.company namespace. 
> The default namespace is http://foo.bar.company namespace.
> The wsdl file is automatically generated from axis like this: http://hostname/webapp/services/FoobarWS?wsdl
> The schema definition of the returned object in the wsdl looks like this: (The extension base i found in the "http://framework.company" namespace)
>             <schema elementFormDefault="qualified" targetNamespace="http://data.foo.bar.company" xmlns="http://www.w3.org/2001/XMLSchema">   
>                <import namespace="http://framework.company"/>   
>                <complexType name="FoobarDO">    
>                   <complexContent>     
>                      <extension base="tns1:Data">      
>                         <sequence>       
>                            <element name="signatur" nillable="true" type="xsd:string"/>       
>                            <element name="kommentar" nillable="true" type="xsd:string"/>       
>                         </sequence>     
>                      </extension>    
>                   </complexContent>   
>                </complexType>   
> To me it looks like it's located in the correkt namespace as defines in the beanMapping in the wsdd file.
> The problem is that axis does not send the response in the correkt namespace:
> Eg. Soap response from axis:
> <?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>
>          <hentFoobarResponse xmlns="http://foo.bar.company">
>             <hentFoobarReturn>
>                <signatur xsi:nil="true"/>
>                <kommentar>Viskom testing testing testing</kommentar>
>             </hentFoobarReturn>
>          </hentFoobarResponse>
>       </soapenv:Body>
>    </soapenv:Envelope>
> Here the .NET client clearly is trying to find objects and values in the wrong namespace. The wsdl says it's in http://data.foo.bar.company and axis sends it in http://foo.bar.company
> I have deployed the same app on a Websphere server (without axis) and this works fine. The return message from Websphere looks like this:
> <?xml version="1.0" encoding="utf-8"?>
>    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>       <soapenv:Header/>
>       <soapenv:Body>
>          <hentFoobarResponse xmlns="http://foo.bar.company">
>             <hentFoobarReturn>
>                <signatur xsi:nil="true" xmlns="http://data.foo.bar.company"/>
>                <kommentar xmlns="http://data.foo.bar.company">Viskom testing testing testing</kommentar>
>             </hentFoobarReturn>
>          </hentFoobarResponse >
>       </soapenv:Body>
>    </soapenv:Envelope>
> Here the correkt namespace is supplied and the .NET client can read and deserialize it correctly.
> Axis version: Implementation-Version: 1.3 2244 October 5 2005
> Java version: java full version "1.4.2_08-b03"

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS-2449) Axis does not supply correct namespace in SOAP message

Posted by "Alexander Vaagan (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS-2449?page=comments#action_12372110 ] 

Alexander Vaagan commented on AXIS-2449:
----------------------------------------

I see  I  have made a small typo in the above description.
Please substitue bedriftws witth companyws.

/Alex


> Axis does not supply correct namespace in SOAP message
> ------------------------------------------------------
>
>          Key: AXIS-2449
>          URL: http://issues.apache.org/jira/browse/AXIS-2449
>      Project: Apache Axis
>         Type: Bug
>   Components: Basic Architecture, Serialization/Deserialization
>  Environment: Windows XP, JBoss 4.0.3
>     Reporter: Alexander Vaagan

>
> Hi.
> I have a WebService running on axis and are trying to consume it from a .NET (C#) client, but all I get back is NULL values.
> I have search both this mailing list and others and I can see that I am not the only one having this problem, but I can't seem to find a real fix to the problem.
> Some people says I should manually edit the wsdl file and some mean I should manualy edit the .NET proxy, but I don't like either solution sinse it fixes the
> symptom not the real problem. 
> The service takes a complex type and an int as input and returns å complex type.
> In the .wsdd file I have adden a beanMapping that looks like this:
> 		<beanMapping 
> 			xmlns:bedriftws="http://data.foo.bar.company"
> 			qname="companyws:FoobarDO" 
> 			languageSpecificType="java:company.bar.foo.data.FoobarDO"
> 		/>
> which puts the type in the http://data.foo.bar.company namespace. 
> The default namespace is http://foo.bar.company namespace.
> The wsdl file is automatically generated from axis like this: http://hostname/webapp/services/FoobarWS?wsdl
> The schema definition of the returned object in the wsdl looks like this: (The extension base i found in the "http://framework.company" namespace)
>             <schema elementFormDefault="qualified" targetNamespace="http://data.foo.bar.company" xmlns="http://www.w3.org/2001/XMLSchema">   
>                <import namespace="http://framework.company"/>   
>                <complexType name="FoobarDO">    
>                   <complexContent>     
>                      <extension base="tns1:Data">      
>                         <sequence>       
>                            <element name="signatur" nillable="true" type="xsd:string"/>       
>                            <element name="kommentar" nillable="true" type="xsd:string"/>       
>                         </sequence>     
>                      </extension>    
>                   </complexContent>   
>                </complexType>   
> To me it looks like it's located in the correkt namespace as defines in the beanMapping in the wsdd file.
> The problem is that axis does not send the response in the correkt namespace:
> Eg. Soap response from axis:
> <?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>
>          <hentFoobarResponse xmlns="http://foo.bar.company">
>             <hentFoobarReturn>
>                <signatur xsi:nil="true"/>
>                <kommentar>Viskom testing testing testing</kommentar>
>             </hentFoobarReturn>
>          </hentFoobarResponse>
>       </soapenv:Body>
>    </soapenv:Envelope>
> Here the .NET client clearly is trying to find objects and values in the wrong namespace. The wsdl says it's in http://data.foo.bar.company and axis sends it in http://foo.bar.company
> I have deployed the same app on a Websphere server (without axis) and this works fine. The return message from Websphere looks like this:
> <?xml version="1.0" encoding="utf-8"?>
>    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>       <soapenv:Header/>
>       <soapenv:Body>
>          <hentFoobarResponse xmlns="http://foo.bar.company">
>             <hentFoobarReturn>
>                <signatur xsi:nil="true" xmlns="http://data.foo.bar.company"/>
>                <kommentar xmlns="http://data.foo.bar.company">Viskom testing testing testing</kommentar>
>             </hentFoobarReturn>
>          </hentFoobarResponse >
>       </soapenv:Body>
>    </soapenv:Envelope>
> Here the correkt namespace is supplied and the .NET client can read and deserialize it correctly.
> Axis version: Implementation-Version: 1.3 2244 October 5 2005
> Java version: java full version "1.4.2_08-b03"

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (AXIS-2449) Axis does not supply correct namespace in SOAP message

Posted by "Alexander Vaagan (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-2449?page=all ]

Alexander Vaagan updated AXIS-2449:
-----------------------------------

    Attachment: SampleWS.wsdl

Hi.
Thanks for looking in to this problem. It's a real showstopper for me sinse a lot of the consumers of the services I write are .NET.
The WSDL file I attached is not the exact same one that I used in my previous post, but it has the same problem. As far as I can see,
unless the WebService and the data objects are in the same namespace, Axis will always get this wrong.

I downloaded the latest CVS snapshot and it has the same problem.

/alex



> Axis does not supply correct namespace in SOAP message
> ------------------------------------------------------
>
>          Key: AXIS-2449
>          URL: http://issues.apache.org/jira/browse/AXIS-2449
>      Project: Apache Axis
>         Type: Bug
>   Components: Basic Architecture, Serialization/Deserialization
>  Environment: Windows XP, JBoss 4.0.3
>     Reporter: Alexander Vaagan
>  Attachments: SampleWS.wsdl
>
> Hi.
> I have a WebService running on axis and are trying to consume it from a .NET (C#) client, but all I get back is NULL values.
> I have search both this mailing list and others and I can see that I am not the only one having this problem, but I can't seem to find a real fix to the problem.
> Some people says I should manually edit the wsdl file and some mean I should manualy edit the .NET proxy, but I don't like either solution sinse it fixes the
> symptom not the real problem. 
> The service takes a complex type and an int as input and returns å complex type.
> In the .wsdd file I have adden a beanMapping that looks like this:
> 		<beanMapping 
> 			xmlns:bedriftws="http://data.foo.bar.company"
> 			qname="companyws:FoobarDO" 
> 			languageSpecificType="java:company.bar.foo.data.FoobarDO"
> 		/>
> which puts the type in the http://data.foo.bar.company namespace. 
> The default namespace is http://foo.bar.company namespace.
> The wsdl file is automatically generated from axis like this: http://hostname/webapp/services/FoobarWS?wsdl
> The schema definition of the returned object in the wsdl looks like this: (The extension base i found in the "http://framework.company" namespace)
>             <schema elementFormDefault="qualified" targetNamespace="http://data.foo.bar.company" xmlns="http://www.w3.org/2001/XMLSchema">   
>                <import namespace="http://framework.company"/>   
>                <complexType name="FoobarDO">    
>                   <complexContent>     
>                      <extension base="tns1:Data">      
>                         <sequence>       
>                            <element name="signatur" nillable="true" type="xsd:string"/>       
>                            <element name="kommentar" nillable="true" type="xsd:string"/>       
>                         </sequence>     
>                      </extension>    
>                   </complexContent>   
>                </complexType>   
> To me it looks like it's located in the correkt namespace as defines in the beanMapping in the wsdd file.
> The problem is that axis does not send the response in the correkt namespace:
> Eg. Soap response from axis:
> <?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>
>          <hentFoobarResponse xmlns="http://foo.bar.company">
>             <hentFoobarReturn>
>                <signatur xsi:nil="true"/>
>                <kommentar>Viskom testing testing testing</kommentar>
>             </hentFoobarReturn>
>          </hentFoobarResponse>
>       </soapenv:Body>
>    </soapenv:Envelope>
> Here the .NET client clearly is trying to find objects and values in the wrong namespace. The wsdl says it's in http://data.foo.bar.company and axis sends it in http://foo.bar.company
> I have deployed the same app on a Websphere server (without axis) and this works fine. The return message from Websphere looks like this:
> <?xml version="1.0" encoding="utf-8"?>
>    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>       <soapenv:Header/>
>       <soapenv:Body>
>          <hentFoobarResponse xmlns="http://foo.bar.company">
>             <hentFoobarReturn>
>                <signatur xsi:nil="true" xmlns="http://data.foo.bar.company"/>
>                <kommentar xmlns="http://data.foo.bar.company">Viskom testing testing testing</kommentar>
>             </hentFoobarReturn>
>          </hentFoobarResponse >
>       </soapenv:Body>
>    </soapenv:Envelope>
> Here the correkt namespace is supplied and the .NET client can read and deserialize it correctly.
> Axis version: Implementation-Version: 1.3 2244 October 5 2005
> Java version: java full version "1.4.2_08-b03"

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS-2449) Axis does not supply correct namespace in SOAP message

Posted by "Bjorn Townsend (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS-2449?page=comments#action_12372499 ] 

Bjorn Townsend commented on AXIS-2449:
--------------------------------------

Can you attatch the full WSDL so we can try and reproduce this more easily?

> Axis does not supply correct namespace in SOAP message
> ------------------------------------------------------
>
>          Key: AXIS-2449
>          URL: http://issues.apache.org/jira/browse/AXIS-2449
>      Project: Apache Axis
>         Type: Bug
>   Components: Basic Architecture, Serialization/Deserialization
>  Environment: Windows XP, JBoss 4.0.3
>     Reporter: Alexander Vaagan

>
> Hi.
> I have a WebService running on axis and are trying to consume it from a .NET (C#) client, but all I get back is NULL values.
> I have search both this mailing list and others and I can see that I am not the only one having this problem, but I can't seem to find a real fix to the problem.
> Some people says I should manually edit the wsdl file and some mean I should manualy edit the .NET proxy, but I don't like either solution sinse it fixes the
> symptom not the real problem. 
> The service takes a complex type and an int as input and returns å complex type.
> In the .wsdd file I have adden a beanMapping that looks like this:
> 		<beanMapping 
> 			xmlns:bedriftws="http://data.foo.bar.company"
> 			qname="companyws:FoobarDO" 
> 			languageSpecificType="java:company.bar.foo.data.FoobarDO"
> 		/>
> which puts the type in the http://data.foo.bar.company namespace. 
> The default namespace is http://foo.bar.company namespace.
> The wsdl file is automatically generated from axis like this: http://hostname/webapp/services/FoobarWS?wsdl
> The schema definition of the returned object in the wsdl looks like this: (The extension base i found in the "http://framework.company" namespace)
>             <schema elementFormDefault="qualified" targetNamespace="http://data.foo.bar.company" xmlns="http://www.w3.org/2001/XMLSchema">   
>                <import namespace="http://framework.company"/>   
>                <complexType name="FoobarDO">    
>                   <complexContent>     
>                      <extension base="tns1:Data">      
>                         <sequence>       
>                            <element name="signatur" nillable="true" type="xsd:string"/>       
>                            <element name="kommentar" nillable="true" type="xsd:string"/>       
>                         </sequence>     
>                      </extension>    
>                   </complexContent>   
>                </complexType>   
> To me it looks like it's located in the correkt namespace as defines in the beanMapping in the wsdd file.
> The problem is that axis does not send the response in the correkt namespace:
> Eg. Soap response from axis:
> <?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>
>          <hentFoobarResponse xmlns="http://foo.bar.company">
>             <hentFoobarReturn>
>                <signatur xsi:nil="true"/>
>                <kommentar>Viskom testing testing testing</kommentar>
>             </hentFoobarReturn>
>          </hentFoobarResponse>
>       </soapenv:Body>
>    </soapenv:Envelope>
> Here the .NET client clearly is trying to find objects and values in the wrong namespace. The wsdl says it's in http://data.foo.bar.company and axis sends it in http://foo.bar.company
> I have deployed the same app on a Websphere server (without axis) and this works fine. The return message from Websphere looks like this:
> <?xml version="1.0" encoding="utf-8"?>
>    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>       <soapenv:Header/>
>       <soapenv:Body>
>          <hentFoobarResponse xmlns="http://foo.bar.company">
>             <hentFoobarReturn>
>                <signatur xsi:nil="true" xmlns="http://data.foo.bar.company"/>
>                <kommentar xmlns="http://data.foo.bar.company">Viskom testing testing testing</kommentar>
>             </hentFoobarReturn>
>          </hentFoobarResponse >
>       </soapenv:Body>
>    </soapenv:Envelope>
> Here the correkt namespace is supplied and the .NET client can read and deserialize it correctly.
> Axis version: Implementation-Version: 1.3 2244 October 5 2005
> Java version: java full version "1.4.2_08-b03"

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira