Discussion:
Namespace prefix in Axis 2 - 1.7.3
Sterpu Victor
2018-09-10 16:34:07 UTC
Permalink
Hello

I use Axis 2, version 1.7.3.
I generated a SOAP client java source file with wsdl2java but I have
problems using this service because the namespace prefix is not correct
in the XML send from the client.
How can I set the namespace in Axis client?

Thank you,
Victor Sterpu
Andreas Veithen
2018-09-10 16:49:29 UTC
Permalink
In which way are those namespace prefix not correct?

Andreas
Post by Sterpu Victor
Hello
I use Axis 2, version 1.7.3.
I generated a SOAP client java source file with wsdl2java but I have problems using this service because the namespace prefix is not correct in the XML send from the client.
How can I set the namespace in Axis client?
Thank you,
Victor Sterpu
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-***@axis.apache.org
For additional commands, e-mail: java-user-***@axis.apache.org
Sterpu Victor
2018-09-10 16:56:55 UTC
Permalink
This is what Axis2 client generates:
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Header/>
<soapenv:Body>
<ns2:G110Request xmlns:ns2="urn:wsdltypes.nmvs.eu:v2.0">
<Body xmlns="urn:types.nmvs.eu:v2.0">
<Pack sn="PK0019AD10873229648"/>
</Body>
</ns2:G110Request>
</soapenv:Body>
</soapenv:Envelope>

And this is what server will accept:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
xmlns:urn="urn:wsdltypes.nmvs.eu:v2.0"
xmlns:urn1="urn:types.nmvs.eu:v2.0">
<soap:Header/>
<soap:Body>
<urn:G110Request>
<urn1:Body>
<urn1:Pack urn1:sn="PK0019AD10873229648"/>
</urn1:Body>
</urn:G110Request>
</soap:Body>
</soap:Envelope>

------ Original Message ------
From: "Andreas Veithen" <***@gmail.com>
To: "java-user" <java-***@axis.apache.org>; "Sterpu Victor"
<***@caido.ro>
Sent: 10/9/2018 7:49:29 PM
Subject: Re: Namespace prefix in Axis 2 - 1.7.3
Post by Andreas Veithen
In which way are those namespace prefix not correct?
Andreas
Post by Sterpu Victor
Hello
I use Axis 2, version 1.7.3.
I generated a SOAP client java source file with wsdl2java but I have
problems using this service because the namespace prefix is not
correct in the XML send from the client.
How can I set the namespace in Axis client?
Thank you,
Victor Sterpu
Andreas Veithen
2018-09-10 19:50:31 UTC
Permalink
So basically the namespace of the sn attribute is not correct. There had
been a couple of regressions with respect to namespace handling in Axis2
1.7 which were subsequently fixed in patch releases. Can you test this with
1.7.9 (Don't forget to regenerate the code) and if the issue still exists,
create a JIRA ticket with the WSDL and the wsdl2java command line?

Andreas
Post by Sterpu Victor
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Header/>
<soapenv:Body>
<ns2:G110Request xmlns:ns2="urn:wsdltypes.nmvs.eu:v2.0">
<Body xmlns="urn:types.nmvs.eu:v2.0">
<Pack sn="PK0019AD10873229648"/>
</Body>
</ns2:G110Request>
</soapenv:Body>
</soapenv:Envelope>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
v2.0">
<soap:Header/>
<soap:Body>
<*urn*:G110Request>
<*urn1*:Body>
<*urn1*:Pack *urn1*:sn="PK0019AD10873229648"/>
</*urn1*:Body>
</*urn*:G110Request>
</soap:Body>
</soap:Envelope>
------ Original Message ------
Sent: 10/9/2018 7:49:29 PM
Subject: Re: Namespace prefix in Axis 2 - 1.7.3
In which way are those namespace prefix not correct?
Andreas
Hello
I use Axis 2, version 1.7.3.
I generated a SOAP client java source file with wsdl2java but I have
problems using this service because the namespace prefix is not correct in
the XML send from the client.
How can I set the namespace in Axis client?
Thank you,
Victor Sterpu
Loading...