bulldog2011 / nano Goto Github PK
View Code? Open in Web Editor NEWA light Android web serivce client framework
License: Apache License 2.0
A light Android web serivce client framework
License: Apache License 2.0
Hi, there is a compilation error after generation java code. I'm generating the code from wsdl during compilation of my project, so manual fixing is not unacceptably for me.
Here is an quick example of generated code. Compilation error is on the line
public List<Element> any;
Because Element is a class from org.w3c.dom namespace
// Generated by xsd compiler for android/java
// DO NOT CHANGE!
package ws.schema;
import java.io.Serializable;
import com.leansoft.nano.annotation.*;
import java.util.List;
import org.w3c.dom.Element;
@RootElement(name = "RequestData", namespace = "ws/schema")
public class RequestData implements Serializable {
private static final long serialVersionUID = -1L;
@Element(name = "LoginInfo")
@Order(value=0)
public LoginInfo loginInfo;
@AnyElement
@Order(value=1)
public List<Element> any;
}
Nano does not handle WSDL attribute elementFormDefault="qualified" and generates namespaces in requests incorrectly.
Nano recognizes date format by length of string. But some of the valid formats are not recognized. For example:
"yyyy-MM-dd'T'HH:mm:ssZ"
"yyyy-MM-dd'T'HH:mm:ss.SSSZ"
I generated the wsdl: http://www.semhora.com/Payment.wsdl with mwsc.
And all elements come with this JAXBElement, but it isnt supported in Android.
What I need to do?
Thanks
Hi,
Hope you are doing great!
We are getting SSL issue with Nano 0.7.0 Lib. We have successfully generated the classes using MWSC Lib and Successfully implemented it with nano 0.7.0 without SSL. Now we are trying to implement it with SSL but getting "Trust anchor for certification path not found Exception". Is there any way to integrate Nano 0.7.0 with SSL or add a server-side certificate with Nano 0.7.0 Lib?
Can you please do suggest for the same?
Thanks & Regards
Yogesh Chander
Hi! I'm consuming a 1.1 soap service that requires the SOAPAction http header. I had to manually insert it in the generated class even when it is explicity set in the wsdl.
PS: Pico is able to insert this header automatically in objective-c
Thanks for the fine framework !
Hi , is there any option or not so difficult way to implement blocking on the webservice result ? The usage scenario would be for web-services that are already asynchronous by design - i.e they return a Ticket that you poll periodically to verify the task is complete, and retrieve the result later. I'm having kind of a hard time handling state in countless callbacks.
Hi, I'm trying to consume an API, the soap envelope generated by Nano looks like this:
<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="http://tempuri.org/">
<soapenv:Body>
<CreateQueryStrings_Start>
<userId>1234</userId>
<password>abcd</password>
<idOrgao>57</idOrgao>
<numeroProcesso>1</numeroProcesso>
<inputParameters>
<ParameterList>
<Parameter>
<Name>TipoConsulta</Name>
<Value>Precatórios / Beneficiário</Value>
</Parameter>
</ParameterList>
</inputParameters>
</CreateQueryStrings_Start>
</soapenv:Body>
</soapenv:Envelope>
It returns incorrect results from the WCF webservice.
The same input form is enveloped as this by a .NET MVC application:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<CreateQueryStrings_Start xmlns="http://tempuri.org/">
<userId>1234</userId>
<password>abcd</password>
<idOrgao>57</idOrgao>
<numeroProcesso>1</numeroProcesso>
<inputParameters xmlns:a="schemas.datacloud.novaprolink.com.br/IWSConsultaProcesso" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<a:ParameterList>
<a:Parameter>
<a:Description i:nil="true"/>
<a:Name>TipoConsulta</a:Name>
<a:PossibleValues i:nil="true" xmlns:b="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/>
<a:SuggestedValues i:nil="true" xmlns:b="http://schemas.microsoft.com/2003/10/Serialization/Arrays"/>
<a:Value>Precatórios / Beneficiário</a:Value>
</a:Parameter>
</a:ParameterList>
</inputParameters>
</CreateQueryStrings_Start>
</s:Body>
</s:Envelope>
What could be the reason it won't work ? Maybe the namespacing ? Nil value objects that aren't being encoded ?
The wsdl is: http://wsrobos.novaprolink.com.br/v2/WSConsultaProcessos.WSConsultaProcesso.svc?wsdl
Regards
nobre
Hi,
In this library one issue still present when my phone language set like Arabic than time stamp not make proper so please add Local English 'en' in sample->webservice->HelloAmazonProductAdvertising->src->com.amazon.service.ecommerce in class AWSECommerceClient.java in Line number '112' SimpleDateFormat is08601 = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'"); replace with
SimpleDateFormat is08601 = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'",new Locale("en"));
Please add second parameter 'new Locale("en")' in SimpleDataFormat constructor
I have in the wsdl file next line:
s:element minOccurs="0" maxOccurs="unbounded" name="base64Binary" nillable="true" type="s:base64Binary"
And Nano library throws exception when i try to parse the response from server:
Caused by: com.leansoft.nano.exception.MappingException: Can't get parameterized type of a List field, Nano framework only supports collection field of List<T> type, and T must be a Nano bindable type, field = base64Binary, type = java.util.List
at com.leansoft.nano.impl.MappingSchema.handleList(MappingSchema.java:282)
can you please advice me how can i handle base 64 serialization?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.