Hi, I was able to reproduce the error by deploying an API (SoapTest) with an existing SOAP Endpoint as per the doc[1] and trying to build a jar with "mvn package"
Apparently the compilation fails because it is trying to import the following package which does not get generated with the SDK. import org.wso2.client.model.SoapTest.*; I tried generating an Android SDK using the online swagger editor[2] and the same issue came up. However, the "model" package gets generated for the "PetStore" API that is given as an example in the swagger editor. So I believe the issue here arises due a lack of some definition in the swagger definition of the API. I still could not figure out what the issue is but I'm working on it and will provide an update asap. For the time being, simply try commenting out the "import org.wso2.client.model.TestApi1.*" in the "DefaultApi.java" and "JsonUtil.java" and then building the jar. It should work since this imported package is an empty package and doesn't seem to have any dependencies. [1] https://docs.wso2.com/display/APICloud/Publish+and+Invoke+a+SOAP+API [2] https://editor.swagger.io/ On Wed, Nov 22, 2017 at 7:53 AM, Isuru Uyanage <isur...@wso2.com> wrote: > Hi All, > > I have an Android application developed and need to invoke an API created > in WSO2 API Manager(2.1.0) through the Android app. > > The following tasks have been done. > > 1. I have created an API using an existing SOAP Endpoint(wsdl) > > 2. Downloaded the SDK from API Manager for Android. > > 3. Android application has been developed. > > 4. As in the README.md file(which has been downloaded with the SDK), when > I'm trying to generate the jar by executing *'mvn package' *command, the > build gets failed as below. The API which I created was TestApi1. > > /TestApi1_1.0.0_android/src/main/java/org/wso2/client/api/TestApi1/DefaultApi.java:[31,1] > package org.wso2.client.model.TestApi1 does not exist > > org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute > goal org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile > *(default-compile)* on projectorg.wso2.client.TestApi1: *Compilation > failure* > > at org.apache.maven.lifecycle.internal.MojoExecutor.execute(Moj > oExecutor.java:213) > > at org.apache.maven.lifecycle.internal.MojoExecutor.execute(Moj > oExecutor.java:154) > > at org.apache.maven.lifecycle.internal.MojoExecutor.execute(Moj > oExecutor.java:146) > > at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.b > uildProject(LifecycleModuleBuilder.java:117) > > at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.b > uildProject(LifecycleModuleBuilder.java:81) > > at org.apache.maven.lifecycle.internal.builder.singlethreaded.S > ingleThreadedBuilder.build(SingleThreadedBuilder.java:51) > > at org.apache.maven.lifecycle.internal.LifecycleStarter.execute > (LifecycleStarter.java:128) > > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309) > > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194) > > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107) > > at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993) > > at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345) > > at org.apache.maven.cli.MavenCli.main(MavenCli.java:191) > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce > ssorImpl.java:62) > > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe > thodAccessorImpl.java:43) > > at java.lang.reflect.Method.invoke(Method.java:498) > > at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnha > nced(Launcher.java:289) > > at org.codehaus.plexus.classworlds.launcher.Launcher.launch( > Launcher.java:229) > > at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithEx > itCode(Launcher.java:415) > > at org.codehaus.plexus.classworlds.launcher.Launcher.main( > Launcher.java:356) > > Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: > Compilation failure > > at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execut > e(AbstractCompilerMojo.java:972) > > at org.apache.maven.plugin.compiler.CompilerMojo.execute(Compil > erMojo.java:129) > > at org.apache.maven.plugin.DefaultBuildPluginManager.executeMoj > o(DefaultBuildPluginManager.java:134) > > at org.apache.maven.lifecycle.internal.MojoExecutor.execute(Moj > oExecutor.java:208) > > ... 20 more > > Any thoughts on what should be done to invoke API created through the > Android Application. And any comments are appreciated on what has gone > wrong here in step 4. > > > *Thanks and Best Regards,* > > *Isuru Uyanage* > *Software Engineer - QA | WSO2* > *Mobile : **+94 77 <+94%2077%20767%201807> 55 30752* > *LinkedIn: **https://www.linkedin.com/in/isuru-uyanage/ > <https://www.linkedin.com/in/isuru-uyanage/>* > > > > > _______________________________________________ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- Regards, *Viduranga Gunarathne* *Software Engineer Intern* *WSO2* Email : vidura...@wso2.com Mobile : +94712437484 Web : http://wso2.com [image: https://wso2.com/signature] <https://wso2.com/signature>
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev