a4tunado / wsdl2ksoap Goto Github PK
View Code? Open in Web Editor NEWTuned wsdl2ksoap for .NET
Home Page: http://code.google.com/p/wsdl2ksoap
Tuned wsdl2ksoap for .NET
Home Page: http://code.google.com/p/wsdl2ksoap
On the google code site it states it is under Apache License 2.0
would be nice if this would alos mentioned in this reposetory.
I’m testing the wsdl2ksoap tool and it fail me with the attached wsdl.
I think the problem is in the ServiceSoap class method InsertPerson. The generated code is the following:
public InsertPersonResponse InsertPerson(InsertPerson params) throws Exception {
SoapSerializationEnvelope envelope = newEnvelope();
envelope.setOutputSoapObject(params.GetSoapParams());
new InsertPersonResponse().register(envelope);
return (InsertPersonResponse)Transport(params.GetSoapAction(), envelope);
}
In this method is called the InsertPersonResponse().register(envelope) but don´t call the Person.register(envelope). If i add this line it works fine.
<s:element name="InsertPerson">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="person" type="tns:Person"/>
</s:sequence>
</s:complexType>
</s:element>
<s:complexType name="Person">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="FirstName" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="LastName" type="s:string"/>
</s:sequence>
</s:complexType>
I identified that when we use methods with return type BOOLEAN, the expression generated Boolean.getBoolean(value.ToString()) to return object is not working properly. I did a test where value.ToString() => "true" and the result of Boolean.getBoolean(value.ToString()) is false. The solution is to swap Boolean.getBoolean(value.ToString()); to Boolean.valueOf(value.ToString ());
Problem when generating other primitive types (ex. short) and also how some classes are istantiated when their class is obtained. I've personally modified it to rely to the static class reference, seemed better.
diff --git a/src/wsdl2ksoap/businesslogic/ClassProcessor.java b/src/wsdl2ksoap/businesslogic/ClassProcessor.java
index e2f2360..d885111 100644
--- a/src/wsdl2ksoap/businesslogic/ClassProcessor.java
+++ b/src/wsdl2ksoap/businesslogic/ClassProcessor.java
@@ -394,6 +394,14 @@ public class ClassProcessor
{
return String.format("Float.valueOf(value.toString())", propType);
}
+ else if (propType.equals("double"))
+ {
+ return String.format("Double.valueOf(value.toString())", propType);
+ }
+ else if (propType.equals("short"))
+ {
+ return String.format("Short.valueOf(value.toString())", propType);
+ }
else if (propType.equals("dateTime"))
{
return String.format("new Date(value.toString())", propType);
@@ -432,27 +440,35 @@ public class ClassProcessor
if (propType.equals("boolean"))
{
- return String.format("PropertyInfo.BOOLEAN_CLASS", propType);
+ return String.format("Boolean.TYPE", propType);
}
else if (propType.equals("int"))
{
- return String.format("PropertyInfo.INTEGER_CLASS", propType);
+ return String.format("Integer.TYPE", propType);
}
else if (propType.equals("float"))
{
return String.format("Float.TYPE", propType);
}
+ else if (propType.equals("double"))
+ {
+ return String.format("Double.TYPE", propType);
+ }
+ else if (propType.equals("short"))
+ {
+ return String.format("Short.TYPE", propType);
+ }
else if (propType.equals("dateTime"))
{
- return String.format("new Date().getClass()", propType);
+ return String.format("Date.class", propType);
}
else if (propType.equals("base64Binary"))
{
- return String.format("new byte[0].getClass()", propType);
+ return String.format("Byte.class", propType);
}
else
{
- return String.format("new %s().getClass()",propType);
+ return String.format("%s.class",propType);
}
}
public static void CreateFunctionClasses(String packageName) throws Exception
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.