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 Ivano Luberti <lu...@archicoop.it> on 2006/01/24 22:54:35 UTC

avoid xmlns="" in a Axis client call

Hi to all.
Before sending thi post I hve searched the mailing listo for hours 
but I couldn't  find an answer, maybe beacuse I'm not an XML expert.

I'm trying to consume a web service on a .NET server using an Axis Client.
I have downloaded the WSDL and built the client using wsdl2jave.
When I try to call a method I don't get the expected answer.
I have been able to diagnose that the web service is not getting the 
parameter specificied in my call.

I have used a proxy server to read the XML sent by the Axis client.
Here it is:

<?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>
<idprogetto xmlns="http://localhost:8088/DocProviderWS/">
<valore xmlns="">s</valore>
</idprogetto>
</soapenv:Body>
</soapenv:Envelope>

I have found a solution reading on the Internet: have to specify the 
xmlns attribute in all the childs, like this.

<?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>
<idprogetto xmlns="http://localhost:8088/DocProviderWS/">
<valore xmlns="http://localhost:8088/DocProviderWS">s</valore>
</idprogetto>
</soapenv:Body>
</soapenv:Envelope>

Is there soemone who knows how to force the Client to fill all the 
xmlns attributes ?
TIA



==================================================
Archimede Informatica NEWS!
==================================================

Realizzato il Sistema Integrato per la biglietteria della Torre di Pisa:
prenotazione, vendita, pre-vendita ed emissione dei biglietti di ingresso
alla Torre sia online che presso le biglietterie dislocate sulla piazza:

http://www.opapisa.it/boxoffice

Partner del Progetto Ci-Tel "Front office Telematico per il cittadino"
Ente Coordinatore Comune di Pisa

http://www.comune.pisa.it/doc/e-government.htm


==================================================
dott. Ivano Mario Luberti
Archimede Informatica societa' cooperativa a r. l.
Sede Operativa
Via Gereschi 36 - 56126- Pisa
tel.: +39-050- 580959
tel/fax: +39-050-9711344
e-mail: archimede@archicoop.it
web: http://www.archicoop.it



Re: avoid xmlns="" in a Axis client call

Posted by Ivano Luberti <lu...@archicoop.it>.
Thanks Anne it worked out .
Actually the effect has been this:

<?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>
<idprogetto xmlns="http://localhost:8088/DocProviderWS/">
<valore>oi</valore>
</idprogetto></soapenv:Body>
</soapenv:Envelope>


no xmlns attribute at all , but the .NET serve understan it in the right way.

Thanks again




At 00.40 25/01/2006, Anne Thomas Manes wrote:

>Modify the WSDL and add
>
>elementFormDefault="qualified"
>
>to the <schema> definition.
>
>This is caused by a bug in .NET. Per the XML Schema spec, the 
>default value is "unqualified", but .NET always assumes "qualified".
>
>Anne
>
>On 1/24/06, Ivano Luberti 
><<m...@archicoop.it> wrote:
>Hi to all.
>Before sending thi post I hve searched the mailing listo for hours 
>but I couldn't  find an answer, maybe beacuse I'm not an XML expert.
>
>I'm trying to consume a web service on a .NET server using an Axis Client.
>I have downloaded the WSDL and built the client using wsdl2jave.
>When I try to call a method I don't get the expected answer.
>I have been able to diagnose that the web service is not getting the 
>parameter specificied in my call.
>
>I have used a proxy server to read the XML sent by the Axis client.
>Here it is:
>
><?xml version="1.0" encoding="UTF-8"?>
><soapenv:Envelope 
>xmlns:soapenv="<http://schemas.xmlsoap.org/soap/envelope/>http://schemas.xmlsoap.org/soap/envelope/" 
>xmlns:xsd="<http://www.w3.org/2001/XMLSchema>http://www.w3.org/2001/XMLSchema" 
>xmlns:xsi="<http://www.w3.org/2001/XMLSchema-instance> 
>http://www.w3.org/2001/XMLSchema-instance">
><soapenv:Body>
><idprogetto xmlns="<http://localhost:8088/DocProviderWS/> 
>http://localhost:8088/DocProviderWS/">
><valore xmlns="">s</valore>
></idprogetto>
></soapenv:Body>
></soapenv:Envelope>
>
>I have found a solution reading on the Internet: have to specify the 
>xmlns attribute in all the childs, like this.
>
><?xml version="1.0" encoding="UTF-8"?>
><soapenv:Envelope 
>xmlns:soapenv="<http://schemas.xmlsoap.org/soap/envelope/>http://schemas.xmlsoap.org/soap/envelope/" 
>xmlns:xsd="<http://www.w3.org/2001/XMLSchema>http://www.w3.org/2001/XMLSchema" 
>xmlns:xsi="<http://www.w3.org/2001/XMLSchema-instance> 
>http://www.w3.org/2001/XMLSchema-instance">
><soapenv:Body>
><idprogetto xmlns="<http://localhost:8088/DocProviderWS/> 
>http://localhost:8088/DocProviderWS/">
><valore xmlns="<http://localhost:8088/DocProviderWS> 
>http://localhost:8088/DocProviderWS">s</valore>
></idprogetto>
></soapenv:Body>
></soapenv:Envelope>
>
>Is there soemone who knows how to force the Client to fill all the 
>xmlns attributes ?
>TIA
>
>
>==================================================
>Archimede Informatica NEWS!
>==================================================
>
>Realizzato il Sistema Integrato per la biglietteria della Torre di Pisa:
>prenotazione, vendita, pre-vendita ed emissione dei biglietti di ingresso
>alla Torre sia online che presso le biglietterie dislocate sulla piazza:
>
><http://www.opapisa.it/boxoffice>http://www.opapisa.it/boxoffice
>
>Partner del Progetto Ci-Tel "Front office Telematico per il cittadino"
>Ente Coordinatore Comune di Pisa
>
><http://www.comune.pisa.it/doc/e-government.htm>http://www.comune.pisa.it/doc/e-government.htm
>
>
>==================================================
>dott. Ivano Mario Luberti
>Archimede Informatica societa' cooperativa a r. l.
>Sede Operativa
>Via Gereschi 36 - 56126- Pisa
>tel.: +39-050- 580959
>tel/fax: +39-050-9711344
>e-mail: <ma...@archicoop.it>archimede@archicoop.it
>web: <http://www.archicoop.it>http://www.archicoop.it
>
>
>
>
>
>No virus found in this outgoing message.
>Checked by AVG Anti-Virus.
>Version: 7.1.375 / Virus Database: 267.14.21/235 - Release Date: 19/01/2006
>
>
>
>
>
>
>No virus found in this incoming message.
>Checked by AVG Anti-Virus.
>Version: 7.1.375 / Virus Database: 267.14.21/235 - Release Date: 19/01/2006

==================================================
Archimede Informatica NEWS!
==================================================

Realizzato il Sistema Integrato per la biglietteria della Torre di Pisa:
prenotazione, vendita, pre-vendita ed emissione dei biglietti di ingresso
alla Torre sia online che presso le biglietterie dislocate sulla piazza:

http://www.opapisa.it/boxoffice

Partner del Progetto Ci-Tel "Front office Telematico per il cittadino"
Ente Coordinatore Comune di Pisa

http://www.comune.pisa.it/doc/e-government.htm


==================================================
dott. Ivano Mario Luberti
Archimede Informatica societa' cooperativa a r. l.
Sede Operativa
Via Gereschi 36 - 56126- Pisa
tel.: +39-050- 580959
tel/fax: +39-050-9711344
e-mail: archimede@archicoop.it
web: http://www.archicoop.it



Re: avoid xmlns="" in a Axis client call

Posted by Anne Thomas Manes <at...@gmail.com>.
Modify the WSDL and add

elementFormDefault="qualified"

 to the <schema> definition.

This is caused by a bug in .NET. Per the XML Schema spec, the default value
is "unqualified", but .NET always assumes "qualified".

Anne

On 1/24/06, Ivano Luberti <lu...@archicoop.it> wrote:
>
> Hi to all.
> Before sending thi post I hve searched the mailing listo for hours but I
> couldn't  find an answer, maybe beacuse I'm not an XML expert.
>
> I'm trying to consume a web service on a .NET server using an Axis Client.
> I have downloaded the WSDL and built the client using wsdl2jave.
> When I try to call a method I don't get the expected answer.
> I have been able to diagnose that the web service is not getting the
> parameter specificied in my call.
>
> I have used a proxy server to read the XML sent by the Axis client.
> Here it is:
>
> <?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>
> <idprogetto xmlns=" http://localhost:8088/DocProviderWS/">
> <valore xmlns="">s</valore>
> </idprogetto>
> </soapenv:Body>
> </soapenv:Envelope>
>
> I have found a solution reading on the Internet: have to specify the xmlns
> attribute in all the childs, like this.
>
> <?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>
> <idprogetto xmlns=" http://localhost:8088/DocProviderWS/">
> <valore xmlns=" http://localhost:8088/DocProviderWS">s</valore>
> </idprogetto>
> </soapenv:Body>
> </soapenv:Envelope>
>
> Is there soemone who knows how to force the Client to fill all the xmlns
> attributes ?
> TIA
>
>
>  ==================================================
> Archimede Informatica NEWS!
> ==================================================
>
> Realizzato il Sistema Integrato per la biglietteria della Torre di Pisa:
> prenotazione, vendita, pre-vendita ed emissione dei biglietti di ingresso
> alla Torre sia online che presso le biglietterie dislocate sulla piazza:
>
> * http://www.opapisa.it/boxoffice
>
> *Partner del Progetto Ci-Tel "Front office Telematico per il cittadino"
> Ente Coordinatore Comune di Pisa
>
> * http://www.comune.pisa.it/doc/e-government.htm
>
>
> *==================================================
> dott. Ivano Mario Luberti
> Archimede Informatica societa' cooperativa a r. l.
> Sede Operativa
> Via Gereschi 36 - 56126- Pisa
> tel.: +39-050- 580959
> tel/fax: +39-050-9711344
> e-mail: archimede@archicoop.it
> web: *http://www.archicoop.it
>
>
> * <http://www.archicoop.it>
>
>
>
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.1.375 / Virus Database: 267.14.21/235 - Release Date:
> 19/01/2006
>
>
>
>