Giter Club home page Giter Club logo

wsdl2ksoap's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

wsdl2ksoap's Issues

License

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.

Complex type in params

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>

boolean types

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 ());

primitive types

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.