Open tomaszgrygo opened 11 years ago
Hi,
Thx for posting issue about nano!
Can you give more details about the issue, or could you give a sample? so I may better understand the issue and may fix it if possbile.
Thx! -William
Here is a fragment of the WSDL (is it possible to attach the whole file?)
<?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions name="secws" targetNamespace="secws" xmlns="secws" xmlns:impl="secws/schema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="secws" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://schemas.xmlsoap.org/wsdl/">
Hi,
Thx for your suggestion, could you help to send the sample wsdl to my mail box at : 51startup@sina.com
Thx! -William
WSDL sent
Thx, I am working on adding a flag on the nano client, so elementFormDefault and the serialization behaviour can be configured, will let you know when it's done
Hi Tomas:
I understand your problem, and I have tried to support the feature proposed by you, however, current Nano does not support namespace at element level, elements will only inherit namespace from their parent elements. In other word, Nano only supports single target namespace.
Nano is only a light weight library targeting Android platorm, considering the complexity introduced, it will not support the feature(or fix) proposed by you in short term.
You have 2 options:
Thx! -William
Hi William, I already did the change that solves this problem for me. Please look at it and see if you can use it. I file SOADWriter.java I changed this fragment
if (!StringUtil.isEmpty(innerNamespace)) {
if (serializer.getPrefix(innerNamespace, false) == null) {
serializer.setPrefix("", innerNamespace);
}
}
into this
if (!StringUtil.isEmpty(innerNamespace)) {
if (serializer.getPrefix(innerNamespace, false) == null) {
serializer.setPrefix(XmlPullWriter.elementFormDefault_qualified?"":INNER_PREFIX, innerNamespace);
}
}
where XmlPullWriter.elementFormDefault_qualified is a variable storing value for WSDL attribute that I set before calling NANO, and INNER_PREFIX is constant: static final String INNER_PREFIX = "inner"; . Hope this help Tomasz
Hi Tomasz:
Look like you've done a smart fix, what does the xml message look like after you made the fix?
some thing like this:
`
It looks like your first example
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:inner="secws/schema">
<soapenv:Body>
<inner:SecInitSessionRequestData>
<PCName>asd</PCName>
<ProductName>asd</ProductName>
</inner:SecInitSessionRequestData>
</soapenv:Body>
</soapenv:Envelope>
Looks like you just used a workaround, let's keep this issue open until we can find a generic way to fix this issue.
Thx! -William
Nano does not handle WSDL attribute elementFormDefault="qualified" and generates namespaces in requests incorrectly.