Problem creating SOAP SOE (Java)

473
1
02-25-2014 06:07 AM
FreddyBröring
New Contributor II
I used the sample "findnearbyfeaturessoapsoe" to create a Java SOAP enabled Server Object Extension with the Eclipse plugin but the build ends with: "javac terminated with errors". As this is not very informative I went to the commandline utility "soepackager" in the developerkit. This put out the following stacktrace:

Port Class .\release\JavaFindNearbyFeaturesSOAPSOE\stubs\arcgissamples\soe\IJavaFindNearbyFeatures.class
Working on File : IJavaFindNearbyFeatures.java
Created Port Classes
Service Class .\release\JavaFindNearbyFeaturesSOAPSOE\stubs\arcgissamples\soe\JavaFindNearbyFeaturesSOAPSOEService.class

Port Class .\release\JavaFindNearbyFeaturesSOAPSOE\stubs\arcgissamples\soe\IJavaFindNearbyFeatures.class
Working on File : JavaFindNearbyFeaturesSOAPSOEServiceBindingStub.java
Created Service Class
Generated Stub classes in .\release\JavaFindNearbyFeaturesSOAPSOE\stubs\

release\JavaFindNearbyFeaturesSOAPSOE\stubs\arcgissamples\soe\IJavaFindNearbyFeatures.java:9: error: variable arg is alr
eady defined in method findNearbyFeatures
        public com.esri.arcgisws.RecordSet findNearbyFeatures (int arg, Point arg, double arg);
                                                                              ^
release\JavaFindNearbyFeaturesSOAPSOE\stubs\arcgissamples\soe\IJavaFindNearbyFeatures.java:9: error: variable arg is alr
eady defined in method findNearbyFeatures
        public com.esri.arcgisws.RecordSet findNearbyFeatures (int arg, Point arg, double arg);
                                                                                          ^
release\JavaFindNearbyFeaturesSOAPSOE\stubs\arcgissamples\soe\JavaFindNearbyFeaturesSOAPSOEServiceBindingStub.java:18: e
rror: variable arg is already defined in method findNearbyFeatures
        public com.esri.arcgisws.RecordSet findNearbyFeatures (int arg, Point arg, double arg) {
                                                                              ^
release\JavaFindNearbyFeaturesSOAPSOE\stubs\arcgissamples\soe\JavaFindNearbyFeaturesSOAPSOEServiceBindingStub.java:18: e
rror: variable arg is already defined in method findNearbyFeatures
        public com.esri.arcgisws.RecordSet findNearbyFeatures (int arg, Point arg, double arg) {
                                                                                          ^
release\JavaFindNearbyFeaturesSOAPSOE\stubs\arcgissamples\soe\JavaFindNearbyFeaturesSOAPSOEServiceBindingStub.java:20: e
rror: cannot find symbol
                ((FindNearbyFeatures)object).setArg(arg);
                                            ^
  symbol:   method setArg(double)
  location: class FindNearbyFeatures
release\JavaFindNearbyFeaturesSOAPSOE\stubs\arcgissamples\soe\JavaFindNearbyFeaturesSOAPSOEServiceBindingStub.java:21: e
rror: cannot find symbol
                ((FindNearbyFeatures)object).setArg(arg);
                                            ^
  symbol:   method setArg(double)
  location: class FindNearbyFeatures
release\JavaFindNearbyFeaturesSOAPSOE\stubs\arcgissamples\soe\JavaFindNearbyFeaturesSOAPSOEServiceBindingStub.java:22: e
rror: cannot find symbol
                ((FindNearbyFeatures)object).setArg(arg);
                                            ^
  symbol:   method setArg(double)
  location: class FindNearbyFeatures
7 errors

java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at com.esri.arcgis.tools.SOEPackager.generateStubs(SOEPackager.java:664)
        at com.esri.arcgis.tools.SOEPackager.processSoes(SOEPackager.java:423)
        at com.esri.arcgis.tools.SOEPackager.main(SOEPackager.java:955)
Caused by: java.lang.RuntimeException: "javac" terminated with errors.
        at com.esri.arcgis.server.StubGen.invokeCommand(Unknown Source)
        at com.esri.arcgis.server.StubGen.createAndRefactorStubs(Unknown Source)
        at com.esri.arcgis.server.StubGen.generateStubs(Unknown Source)
        at com.esri.arcgis.server.StubGen.generateStubs(Unknown Source)
        at com.esri.arcgis.server.StubGen.main(Unknown Source)


It looks like that the method in the generated file IJavaFindNearbyFeatures.java has parameters with equal names "arg" and the compiler will not accept that.

Has anyone encountered this same problem? And if so, what was your solution to fix it?

My developer tools are:
Eclipse Juno
Java 1.7.0.51 (64 bit)
ArcGIS 10.2.0 and 10.2.1

Thanx in advance!
Freddy
1 Reply
KendallPonder
New Contributor II

I know this is four years old but I have the same issue.  Does anyone have an answer?

0 Kudos