Giter Club home page Giter Club logo

wsdl2apigee's Introduction

wsdl2apigee

wsdl2apigee is an open source project that extends Apigee Edge functionality to provide the ability to:

  • Expose a SOAP Service as a REST API (over JSON or XML) or
  • Expose a SOAP Service in a pass through mode for deployment on Apigee Edge

Support

This is an open-source project of the Apigee Corporation. It is not covered by Apigee support contracts. However, we will support you as best we can. For help, please open an issue in this GitHub project. You are also always welcome to submit a pull request.

Install

mvn install

Usage

java -jar wsdl2apigee-1.0.0-jar-with-dependencies.jar -wsdl=<wsdl URL or Path>

Other Options

java -jar wsdl2apigee-1.0.0-jar-with-dependencies.jar -wsdl=<wsdl URL or Path> -passthru=<true|false> -desc=<description> -allpost=<true|false> -opsmap=<opsmapping.xml> -service=<service name> -port=<port name> -debug=<true|false> -oauth=<true|false> -vhosts=comma separated values for virtuals hosts> -build=<build folder name> -cors=<true|false> -apikey=<true|false> -quota=<true|false> -basepath=<specify base path>

Defaults:
passthru=false            Do not convert to API/JSON. Treat as SOAP
allpost=false             Treat all wsdls operations as HTTP POST
service=If the wsdl contains > 1 service, specify the name. Otherwise, the first service is selected
port=If the service contains > 1 port, specify the port name. Otherwise, the first port is selected
debug=false               Set to true to enable trace.
vhosts=default
oauth=false               Don't add the oauth policy
apikey=false              Don't add apikey verification
quota=false               Works only if apikey or oauth is set
basepath=Uses the basepath from the wsdl
cors=false                Don't enable CORS; Works only for SOAP to REST
build=specify build folder   default is temp folder; ensure user has access to read/write to temp folder
opsmap=specify operations map
backendurl = Specify the target backend url
backendurlvalidation=false    Specify to disable the backendurl validation

Output

You should see an API Proxy bundle generated in the same folder you ran the command. The bundle follows the convention of {soap-servicename}.zip. You can import the bundle via the Edge Admin UI or tools like apigeetool.

Open API Specification

When a proxy bundle for SOAP->REST is generated, an attempt is made to generate an Open API specification. This document is hosted at http://{proxy-url}/{basePath}/openapi.json

NOTE: The Open API specification is not expected to be accurate for all WSDLs. For ex: OAS does not support xsd:choice.

WSDL

When a proxy bundle for SOAP PassThru is generated, the WSDL is hosted at http://{proxy-url}/{basePath}?wsdl

Appendix

OpsMap: A file that maps WSDL operations to HTTP Verbs. A Sample Ops Mapping file looks like:

{
  "proxywriter": {
    "get": {
      "operation": [
        {
          "pattern": "get",
          "location": "beginsWith"
        },
        {
          "pattern": "inq",
          "location": "beginsWith"
        },
        {
          "pattern": "search",
          "location": "beginsWith"
        },
        {
          "pattern": "list",
          "location": "beginsWith"
        },
        {
          "pattern": "retrieve",
          "location": "beginsWith"
        }
      ]
    },
    "post": {
      "operation": [
        {
          "pattern": "create",
          "location": "contains"
        },
        {
          "pattern": "add",
          "location": "beginsWith"
        },
        {
          "pattern": "process",
          "location": "beginsWith"
        }
      ]
    },
    "put": {
      "operation": [
        {
          "pattern": "update",
          "location": "beginsWith"
        },
        {
          "pattern": "change",
          "location": "beginsWith"
        },
        {
          "pattern": "modify",
          "location": "beginsWith"
        },
        {
          "pattern": "set",
          "location": "beginsWith"
        }
      ]
    },
    "delete": {
      "operation": [
        {
          "pattern": "delete",
          "location": "beginsWith"
        },
        {
          "pattern": "remove",
          "location": "beginsWith"
        },
        {
          "pattern": "del",
          "location": "beginsWith"
        }
      ]
    }
  }
}

wsdl2apigee's People

Contributors

coverbeck avatar dependabot[bot] avatar earth2marsh avatar gideongoodwin avatar johncanthony avatar kurtkanaskie avatar mat-613 avatar micovery avatar nigelwalters avatar srinandan avatar ssvaidyanathan avatar theganyo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wsdl2apigee's Issues

OAS required type should be in Boolean format

https://github.com/apigee/wsdl2apigee/blob/master/src/main/java/com/apigee/oas/OASUtils.java#L93

In getBodyParameter(String name) the required field is set using a quoted true which will cause openapi interpreters to fail this field as it is expected to be in an unquoted boolean representation.

https://swagger.io/docs/specification/2-0/basic-structure/

Currently the 'required' field is correctly set to false in getQueryParameters(ArrayList queryParams).
https://github.com/apigee/wsdl2apigee/blob/master/src/main/java/com/apigee/oas/OASUtils.java#L76

The erroneous line (#93) currently shows as:

parameter.addProperty("required", "true");

It should instead look like

parameter.addProperty("required", true);

Not able to run wsdl2apigee on macOS

$ javac -version
javac 17

$ java -version
java version "17" 2021-09-14 LTS
Java(TM) SE Runtime Environment (build 17+35-LTS-2724)
Java HotSpot(TM) 64-Bit Server VM (build 17+35-LTS-2724, mixed mode, sharing)

Error thrown when running java -jar wsdl2apigee-1.0.0-jar-with-dependencies.jar -wsdl=library-wsdl.xml
java.lang.reflect.InaccessibleObjectException: Unable to make protected void java.lang.Object.finalize() throws java.lang.Throwable accessible: module java.base does not "opens java.lang" to unnamed module @755c9148

Getting Error when trying to run MVN install on windows..

INFO: Retrieved WSDL endpoint: http://wsf.cdyne.com/WeatherWS/Weather.asmx
Jul 14, 2016 11:13:55 AM com.apigee.proxywriter.GenerateProxy begin
INFO: Parsed WSDL Successfully.
Jul 14, 2016 11:13:55 AM com.apigee.proxywriter.GenerateProxy begin
INFO: Base Path: /foo
WSDL Path: http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL
Jul 14, 2016 11:13:55 AM com.apigee.proxywriter.GenerateProxy begin
INFO: Build Folder: C:\Users\387823\AppData\Local\Temp\3525789997475750520
SOAP Version: SOAP11
Jul 14, 2016 11:13:55 AM com.apigee.proxywriter.GenerateProxy begin
INFO: Proxy Name: Weather
Proxy Description: Weather
Jul 14, 2016 11:13:55 AM com.apigee.proxywriter.GenerateProxy begin
INFO: Generated Apigee proxy file.
Jul 14, 2016 11:13:55 AM com.apigee.proxywriter.GenerateProxy begin
INFO: Copied standard policies.
Jul 14, 2016 11:13:55 AM com.apigee.proxywriter.GenerateProxy writeTargetEndpoint
INFO: Generated Target xml: C:\Users\387823\AppData\Local\Temp\3525789997475750520\apiproxy\targets\default.xml
Jul 14, 2016 11:13:55 AM com.apigee.proxywriter.GenerateProxy begin
INFO: Generated target XML.
Jul 14, 2016 11:13:55 AM com.apigee.proxywriter.GenerateProxy begin
INFO: Generated Apigee Edge API Bundle file: Weather.zip
Jul 14, 2016 11:13:55 AM com.apigee.proxywriter.GenerateProxy begin
SEVERE: C:\Users\387823\AppData\Local\Temp\3525789997475750520\apiproxy\proxies\default.xml: The process cannot access the file because it is being u
ed by another process.

Jul 14, 2016 11:13:55 AM com.apigee.proxywriter.GenerateProxy prepareTargetFolder
INFO: Target proxy folder setup complete
Jul 14, 2016 11:13:55 AM com.apigee.proxywriter.GenerateProxy begin
INFO: Read operations map
Jul 14, 2016 11:13:56 AM com.apigee.proxywriter.GenerateProxy parseWSDL
INFO: Retrieved WSDL endpoint: http://wsf.cdyne.com/WeatherWS/Weather.asmx
Jul 14, 2016 11:13:56 AM com.apigee.proxywriter.GenerateProxy begin
INFO: Parsed WSDL Successfully.
Jul 14, 2016 11:13:56 AM com.apigee.proxywriter.GenerateProxy begin
INFO: Base Path: /foo
WSDL Path: http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL
Jul 14, 2016 11:13:56 AM com.apigee.proxywriter.GenerateProxy begin
INFO: Build Folder: C:\Users\387823\AppData\Local\Temp\243511184057154342
SOAP Version: SOAP11
Jul 14, 2016 11:13:56 AM com.apigee.proxywriter.GenerateProxy begin
INFO: Proxy Name: Weather
Proxy Description: WhateverWeather
Jul 14, 2016 11:13:56 AM com.apigee.proxywriter.GenerateProxy begin
INFO: Generated Apigee proxy file.
Jul 14, 2016 11:13:56 AM com.apigee.proxywriter.GenerateProxy begin
INFO: Generated SOAP Message Templates.
Jul 14, 2016 11:13:56 AM com.apigee.proxywriter.GenerateProxy begin
INFO: Generated proxies XML.
Jul 14, 2016 11:13:57 AM com.apigee.proxywriter.GenerateProxy begin
INFO: Copied standard policies.
Jul 14, 2016 11:13:57 AM com.apigee.proxywriter.GenerateProxy writeTargetEndpoint
INFO: Generated Target xml: C:\Users\387823\AppData\Local\Temp\243511184057154342\apiproxy\targets\default.xml
Jul 14, 2016 11:13:57 AM com.apigee.proxywriter.GenerateProxy begin
INFO: Generated target XML.
Jul 14, 2016 11:13:57 AM com.apigee.proxywriter.GenerateProxy begin
INFO: Generated Apigee Edge API Bundle file: Weather.zip
Jul 14, 2016 11:13:57 AM com.apigee.proxywriter.GenerateProxy begin
SEVERE: C:\Users\387823\AppData\Local\Temp\243511184057154342\apiproxy\policies\GetCityForecastByZIP-build-soap.xml: The process cannot access the fi
e because it is being used by another process.

Tests run: 7, Failures: 2, Errors: 4, Skipped: 0, Time elapsed: 17.932 sec <<< FAILURE!
testOpsMap1(com.apigee.proxywriter.GenerateProxyTest) Time elapsed: 1.343 sec <<< ERROR!
java.lang.NullPointerException
at com.apigee.proxywriter.GenerateProxyTest.testOpsMap1(GenerateProxyTest.java:183)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)

testOpsMap2(com.apigee.proxywriter.GenerateProxyTest) Time elapsed: 0.522 sec <<< ERROR!
java.lang.NullPointerException
at com.apigee.proxywriter.GenerateProxyTest.testOpsMap2(GenerateProxyTest.java:194)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)

testGenerateRest(com.apigee.proxywriter.GenerateProxyTest) Time elapsed: 9.668 sec <<< FAILURE!
java.lang.AssertionError: Missing apiproxy/policies\extract-format.xml
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.assertTrue(Assert.java:41)
at com.apigee.proxywriter.GenerateProxyTest.checkForFilesInBundle(GenerateProxyTest.java:24)
at com.apigee.proxywriter.GenerateProxyTest.testGenerateRest(GenerateProxyTest.java:115)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)

testCors(com.apigee.proxywriter.GenerateProxyTest) Time elapsed: 1.67 sec <<< ERROR!
java.lang.NullPointerException
at com.apigee.proxywriter.GenerateProxyTest.testCors(GenerateProxyTest.java:151)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)

testGeneratePassthrough(com.apigee.proxywriter.GenerateProxyTest) Time elapsed: 1.592 sec <<< FAILURE!
java.lang.AssertionError: Missing apiproxy/policies\Extract-Operation-Name.xml
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.assertTrue(Assert.java:41)
at com.apigee.proxywriter.GenerateProxyTest.checkForFilesInBundle(GenerateProxyTest.java:24)
at com.apigee.proxywriter.GenerateProxyTest.testGeneratePassthrough(GenerateProxyTest.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)

testVHosts(com.apigee.proxywriter.GenerateProxyTest) Time elapsed: 1.644 sec <<< ERROR!
java.lang.NullPointerException
at com.apigee.proxywriter.GenerateProxyTest.testVHosts(GenerateProxyTest.java:138)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)

Results :

Failed tests: testGenerateRest(com.apigee.proxywriter.GenerateProxyTest): Missing apiproxy/policies\extract-format.xml
testGeneratePassthrough(com.apigee.proxywriter.GenerateProxyTest): Missing apiproxy/policies\Extract-Operation-Name.xml

Tests in error:
testOpsMap1(com.apigee.proxywriter.GenerateProxyTest)
testOpsMap2(com.apigee.proxywriter.GenerateProxyTest)
testCors(com.apigee.proxywriter.GenerateProxyTest)
testVHosts(com.apigee.proxywriter.GenerateProxyTest)

Tests run: 7, Failures: 2, Errors: 4, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 29.195 s
[INFO] Finished at: 2016-07-14T11:13:57+05:30
[INFO] Final Memory: 9M/75M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project wsdl2apigee: There are test failu
es.
[ERROR]
[ERROR] Please refer to D:\Raghav\Softwares\wsdl2apigee-master\wsdl2apigee-master\target\surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

fault handling

if the response from the target endpoint is not a soap fault, handle the error gracefully.

Issue while doing mvn install

Hi,
I downloaded the tool and tried to do mvn install, i get the below error. Please help.

[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/Rule.java:[3,33] package javax.xml.bind.annotation does not exist
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/Rule.java:[4,33] package javax.xml.bind.annotation does not exist
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/Rule.java:[5,33] package javax.xml.bind.annotation does not exist
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/Rule.java:[6,33] package javax.xml.bind.annotation does not exist
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/Rule.java:[7,33] package javax.xml.bind.annotation does not exist
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/Rule.java:[10,2] cannot find symbol
symbol: class XmlRootElement
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/Rule.java:[11,2] cannot find symbol
symbol: class XmlAccessorType
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[4,22] package javax.xml.bind does not exist
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[5,22] package javax.xml.bind does not exist
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[6,22] package javax.xml.bind does not exist
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[7,22] package javax.xml.bind does not exist
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[8,22] package javax.xml.bind does not exist
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[12,33] package javax.xml.bind.annotation does not exist
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[13,33] package javax.xml.bind.annotation does not exist
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[14,33] package javax.xml.bind.annotation does not exist
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[15,33] package javax.xml.bind.annotation does not exist
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[24,2] cannot find symbol
symbol: class XmlRootElement
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[25,2] cannot find symbol
symbol: class XmlAccessorType
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[87,31] cannot find symbol
symbol: class JAXBException
location: class com.apigee.xsltgen.RuleSet
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/Rule.java:[11,18] cannot find symbol
symbol: variable XmlAccessType
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/Rule.java:[14,6] cannot find symbol
symbol: class XmlTransient
location: class com.apigee.xsltgen.Rule
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/Rule.java:[17,6] cannot find symbol
symbol: class XmlAttribute
location: class com.apigee.xsltgen.Rule
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/Rule.java:[20,6] cannot find symbol
symbol: class XmlAttribute
location: class com.apigee.xsltgen.Rule
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/Rule.java:[23,6] cannot find symbol
symbol: class XmlAttribute
location: class com.apigee.xsltgen.Rule
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/Rule.java:[26,6] cannot find symbol
symbol: class XmlAttribute
location: class com.apigee.xsltgen.Rule
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[25,18] cannot find symbol
symbol: variable XmlAccessType
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[30,6] cannot find symbol
symbol: class XmlElement
location: class com.apigee.xsltgen.RuleSet
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[78,9] cannot find symbol
symbol: class JAXBContext
location: class com.apigee.xsltgen.RuleSet
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[78,35] cannot find symbol
symbol: variable JAXBContext
location: class com.apigee.xsltgen.RuleSet
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[79,9] cannot find symbol
symbol: class Unmarshaller
location: class com.apigee.xsltgen.RuleSet
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[82,9] cannot find symbol
symbol: class JAXBElement
location: class com.apigee.xsltgen.RuleSet
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[82,36] cannot find symbol
symbol: class JAXBElement
location: class com.apigee.xsltgen.RuleSet
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[90,9] cannot find symbol
symbol: class JAXBContext
location: class com.apigee.xsltgen.RuleSet
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[90,29] cannot find symbol
symbol: variable JAXBContext
location: class com.apigee.xsltgen.RuleSet
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[91,9] cannot find symbol
symbol: class Marshaller
location: class com.apigee.xsltgen.RuleSet
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[94,27] cannot find symbol
symbol: variable Marshaller
location: class com.apigee.xsltgen.RuleSet
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[96,27] cannot find symbol
symbol: variable Marshaller
location: class com.apigee.xsltgen.RuleSet
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[97,9] cannot find symbol
symbol: class JAXBElement
location: class com.apigee.xsltgen.RuleSet
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[97,39] cannot find symbol
symbol: class JAXBElement
location: class com.apigee.xsltgen.RuleSet
[INFO] 39 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 33.983 s
[INFO] Finished at: 2019-12-11T00:13:55-07:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.3:compile (default-compile) on project wsdl2apigee: Compilation failure: Compilation failure:
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/Rule.java:[3,33] package javax.xml.bind.annotation does not exist
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/Rule.java:[4,33] package javax.xml.bind.annotation does not exist
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/Rule.java:[5,33] package javax.xml.bind.annotation does not exist
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/Rule.java:[6,33] package javax.xml.bind.annotation does not exist
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/Rule.java:[7,33] package javax.xml.bind.annotation does not exist
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/Rule.java:[10,2] cannot find symbol
[ERROR] symbol: class XmlRootElement
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/Rule.java:[11,2] cannot find symbol
[ERROR] symbol: class XmlAccessorType
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[4,22] package javax.xml.bind does not exist
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[5,22] package javax.xml.bind does not exist
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[6,22] package javax.xml.bind does not exist
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[7,22] package javax.xml.bind does not exist
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[8,22] package javax.xml.bind does not exist
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[12,33] package javax.xml.bind.annotation does not exist
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[13,33] package javax.xml.bind.annotation does not exist
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[14,33] package javax.xml.bind.annotation does not exist
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[15,33] package javax.xml.bind.annotation does not exist
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[24,2] cannot find symbol
[ERROR] symbol: class XmlRootElement
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[25,2] cannot find symbol
[ERROR] symbol: class XmlAccessorType
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[87,31] cannot find symbol
[ERROR] symbol: class JAXBException
[ERROR] location: class com.apigee.xsltgen.RuleSet
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/Rule.java:[11,18] cannot find symbol
[ERROR] symbol: variable XmlAccessType
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/Rule.java:[14,6] cannot find symbol
[ERROR] symbol: class XmlTransient
[ERROR] location: class com.apigee.xsltgen.Rule
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/Rule.java:[17,6] cannot find symbol
[ERROR] symbol: class XmlAttribute
[ERROR] location: class com.apigee.xsltgen.Rule
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/Rule.java:[20,6] cannot find symbol
[ERROR] symbol: class XmlAttribute
[ERROR] location: class com.apigee.xsltgen.Rule
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/Rule.java:[23,6] cannot find symbol
[ERROR] symbol: class XmlAttribute
[ERROR] location: class com.apigee.xsltgen.Rule
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/Rule.java:[26,6] cannot find symbol
[ERROR] symbol: class XmlAttribute
[ERROR] location: class com.apigee.xsltgen.Rule
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[25,18] cannot find symbol
[ERROR] symbol: variable XmlAccessType
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[30,6] cannot find symbol
[ERROR] symbol: class XmlElement
[ERROR] location: class com.apigee.xsltgen.RuleSet
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[78,9] cannot find symbol
[ERROR] symbol: class JAXBContext
[ERROR] location: class com.apigee.xsltgen.RuleSet
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[78,35] cannot find symbol
[ERROR] symbol: variable JAXBContext
[ERROR] location: class com.apigee.xsltgen.RuleSet
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[79,9] cannot find symbol
[ERROR] symbol: class Unmarshaller
[ERROR] location: class com.apigee.xsltgen.RuleSet
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[82,9] cannot find symbol
[ERROR] symbol: class JAXBElement
[ERROR] location: class com.apigee.xsltgen.RuleSet
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[82,36] cannot find symbol
[ERROR] symbol: class JAXBElement
[ERROR] location: class com.apigee.xsltgen.RuleSet
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[90,9] cannot find symbol
[ERROR] symbol: class JAXBContext
[ERROR] location: class com.apigee.xsltgen.RuleSet
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[90,29] cannot find symbol
[ERROR] symbol: variable JAXBContext
[ERROR] location: class com.apigee.xsltgen.RuleSet
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[91,9] cannot find symbol
[ERROR] symbol: class Marshaller
[ERROR] location: class com.apigee.xsltgen.RuleSet
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[94,27] cannot find symbol
[ERROR] symbol: variable Marshaller
[ERROR] location: class com.apigee.xsltgen.RuleSet
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[96,27] cannot find symbol
[ERROR] symbol: variable Marshaller
[ERROR] location: class com.apigee.xsltgen.RuleSet
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[97,9] cannot find symbol
[ERROR] symbol: class JAXBElement
[ERROR] location: class com.apigee.xsltgen.RuleSet
[ERROR] /Users/shamanthvijayakumar/Desktop/Work/wsdl2apigee-master/src/main/java/com/apigee/xsltgen/RuleSet.java:[97,39] cannot find symbol
[ERROR] symbol: class JAXBElement
[ERROR] location: class com.apigee.xsltgen.RuleSet
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

Issue with regular expression matching SOAP message (Content-Type)

https://github.com/apigee/wsdl2apigee/blob/master/src/main/resources/templates/soappassthru/proxyDefault.xml

Line 8 : !(request.header.Content-Type ~~ "(text|application)/(xml|([a-z]+xml))(;(\w)=(\S*))?") and (request.verb != "GET")

Use : (text|application)/(xml|([a-z]+xml))(;( +|)(\w)=(\S*))? instead.
I 've done several tests and I found a problem with text/xml; charset=UTF-8 (When a space is present, the regular expression doesn't match).

image

Utility doesnt work in Windows due to a bug in StringUtils.java

Hi,
I see the below error when i try to run the utility. The issue seems to be due to line 39 in StringUtils.java which expects "/" instead of "" on windows machines.
wsdl2apigee_bug

Jan 08, 2020 1:54:40 AM com.apigee.proxywriter.GenerateProxy prepareTargetFolder
INFO: Target proxy folder setup complete
Jan 08, 2020 1:54:40 AM com.apigee.proxywriter.GenerateProxy begin
INFO: Read operations map
Jan 08, 2020 1:54:41 AM com.apigee.proxywriter.GenerateProxy begin
SEVERE: String index out of range: -1
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(Unknown Source)
at com.apigee.utils.StringUtils.proxyNameAndBasePath(StringUtils.java:41)
at com.apigee.proxywriter.GenerateProxy.getWSDLDetails(GenerateProxy.java:2318)
at com.apigee.proxywriter.GenerateProxy.begin(GenerateProxy.java:2796)
at com.apigee.proxywriter.GenerateProxy.main(GenerateProxy.java:3103)

How to update <HTTPTargetConnection> in Apigee Edge Proxy Dynamically or Runtime?

I am deploying some service called MyService on Ec2 and got the ip or url let's say https://myservice.com

Now I want to use this url https://myservice.com in apigee edge runtime,

Let's say, Below is Apigee Edge Proxy Project Structure.

apiproxy
  - policies
    - somepolicy
  - proxies
    - default.xml
  - targets
    - default.xml
  apiproxy.xml

In below xml file from targets/default.xml, I want to replace https://example.com url Dynamically or Runtime with the url (https://myservice.com) which I got when I deployed the Service called MyService on ec2.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<TargetEndpoint name="default">
  <PreFlow name="PreFlow">
    <Request/>
    <Response/>
  </PreFlow>
  <Flows/>
  <PostFlow name="PostFlow">
    <Request/>
    <Response/>
  </PostFlow>
  <HTTPTargetConnection>
    <URL>https://example.com</URL>
  </HTTPTargetConnection>
</TargetEndpoint>

Main reason behind updating this url runtime is:

In my network, we are updating urls on daily basis of the services which are deployed on ec2, here for example, it is MyService on ec2

Exception Handling in proxyNameAndBasePath() Method

I've noticed an issue with the proxyNameAndBasePath() method in StringUtils.java class that can cause an IndexOutOfBoundsException. This exception is thrown if the URL does not contain the / character. For example when creating a bundle from a wsdl file in the same directory.

Feb 21, 2024 9:12:36 AM com.apigee.proxywriter.GenerateProxy begin
SEVERE: begin -1, end 2, length 7
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: begin -1, end 2, length 7
	at java.base/java.lang.String.checkBoundsBeginEnd(String.java:3319)
	at java.base/java.lang.String.substring(String.java:1874)
	at com.apigee.utils.StringUtils.proxyNameAndBasePath(StringUtils.java:41)
	at com.apigee.proxywriter.GenerateProxy.getWSDLDetails(GenerateProxy.java:2358)
	at com.apigee.proxywriter.GenerateProxy.begin(GenerateProxy.java:2889)
	at com.apigee.proxywriter.GenerateProxy.main(GenerateProxy.java:3206)

Here the code in question:

public static KeyValue<String, String> proxyNameAndBasePath(String url) {
...
int beginIndex = lowercaseUrl.lastIndexOf("/");
map = new KeyValue<String,String>(url.substring(beginIndex+1, endIndex), url.substring(beginIndex, endIndex).toLowerCase());
...
}

Steps to Reproduce

The issue occurs when the provided URL does not contain a "/", such as: "my_fille.wsdl"

java -jar wsdl2apigee-1.0.0-jar-with-dependencies.jar -wsdl=my_fille.wsdl

Suggested Solution

The proxyNameAndBasePath() method can be updated to handle cases where the "/" character does not exist in the provided URL. When the lastIndexOf("/") method returns -1, beginIndex should be set to 0.

public static KeyValue<String, String> proxyNameAndBasePath(String url) {
...
int beginIndex = lowercaseUrl.lastIndexOf("/");
if (beginIndex == -1) {
   beginIndex = 0; // Set to 0 if "/" is not found
} else {
   beginIndex++; // Skipping "/"
}
...
}

This will prevent the IndexOutOfBoundsException from being thrown by the substring() method.

Security Policy violation Binary Artifacts

This issue was automatically created by Allstar.

Security Policy Violation
Project is out of compliance with Binary Artifacts policy: binaries present in source code

Rule Description
Binary Artifacts are an increased security risk in your repository. Binary artifacts cannot be reviewed, allowing the introduction of possibly obsolete or maliciously subverted executables. For more information see the Security Scorecards Documentation for Binary Artifacts.

Remediation Steps
To remediate, remove the generated executable artifacts from the repository.

Artifacts Found

  • src/test/xslttester/saxon/saxon9he.jar

Additional Information
This policy is drawn from Security Scorecards, which is a tool that scores a project's adherence to security best practices. You may wish to run a Scorecards scan directly on this repository for more details.


Allstar has been installed on all Google managed GitHub orgs. Policies are gradually being rolled out and enforced by the GOSST and OSPO teams. Learn more at http://go/allstar

This issue will auto resolve when the policy is in compliance.

Issue created by Allstar. See https://github.com/ossf/allstar/ for more information. For questions specific to the repository, please contact the owner or maintainer.

Unable to access jarfile wsdl2apigee-1.0.0-jar-with-dependencies.jar

We tried to execute the command java -jar wsdl2apigee-1.0.0-jar-with-dependencies.jar -wsdl= but getting Unable to access jar file wsdl2apigee-1.0.0-jar-with-dependencies.jar Error.

We are not able to find WSDL URL, but we tried with wsdl2 Apigee folder Path but still getting above error.
Can anyone help us to resolve the issue?

delete operation

If the wsdl contains an operation called "delete", the operation should be preserved as-is when it appears as a resource.

wsdl2apigee tool is not working on a windows machine

Users on windows machine are getting String index out of bound exception. Code is looking for "/" in the file path for wsdl file and it gives error on windows machine. Find the details in the attached screenshot.

image002 (1)

Exception in thread "main" java.lang.NullPointerException

I am attempting to create an APIGEE bundle from the WSDL file. I have uploaded the WSDL file in the SOAP UI software, so the WSDL file format is correct.

However, I encountered the following error while generating the APIGEE bundle:

Mar 19, 2024 6:55:27 PM com.apigee.proxywriter.GenerateProxy begin
SEVERE: null
Exception in thread "main" java.lang.NullPointerException
        at com.apigee.proxywriter.GenerateProxy.parseElement(GenerateProxy.java:1548)
        at com.apigee.proxywriter.GenerateProxy.parseSchema(GenerateProxy.java:1664)
        at com.apigee.proxywriter.GenerateProxy.parseElement(GenerateProxy.java:1563)
        at com.apigee.proxywriter.GenerateProxy.parseSchema(GenerateProxy.java:1664)
        at com.apigee.proxywriter.GenerateProxy.getOASDefinitions(GenerateProxy.java:2336)
        at com.apigee.proxywriter.GenerateProxy.generateOAS(GenerateProxy.java:2770)
        at com.apigee.proxywriter.GenerateProxy.begin(GenerateProxy.java:2900)
        at com.apigee.proxywriter.GenerateProxy.main(GenerateProxy.java:3215)

Can someone suggest what is happening and what should be done.

Unable to run wsdl2apigee in windows

I am getting below error.

C:\a\wsdl2apigee-master\wsdl2apigee-master\target>java -jar wsdl2apigee-1.0.0-jar-with-dependencies.jar -wsdl=http://www.xignite.com/xcurrencies.asmx?WSDL
Jun 27, 2022 6:40:20 PM com.apigee.proxywriter.GenerateProxy prepareTargetFolder
INFO: Target proxy folder setup complete
Jun 27, 2022 6:40:20 PM com.apigee.proxywriter.GenerateProxy begin
INFO: Read operations map
java.lang.reflect.InaccessibleObjectException: Unable to make protected void java.lang.Object.finalize() throws java.lang.Throwable accessible: module java.base does not "opens java.lang" to unnamed module @2d6eabae
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)
at java.base/java.lang.reflect.AccessibleObject.setAccessible(AccessibleObject.java:130)
at org.codehaus.groovy.reflection.CachedClass$3$1.run(CachedClass.java:86)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
at org.codehaus.groovy.reflection.CachedClass$3.initValue(CachedClass.java:81)
at org.codehaus.groovy.reflection.CachedClass$3.initValue(CachedClass.java:79)
at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46)
at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33)
at org.codehaus.groovy.reflection.CachedClass.getMethods(CachedClass.java:250)
at org.codehaus.groovy.reflection.CachedClass$3.initValue(CachedClass.java:116)
at org.codehaus.groovy.reflection.CachedClass$3.initValue(CachedClass.java:79)
at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46)
at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33)
at org.codehaus.groovy.reflection.CachedClass.getMethods(CachedClass.java:250)
at org.codehaus.groovy.reflection.CachedClass$3.initValue(CachedClass.java:116)
at org.codehaus.groovy.reflection.CachedClass$3.initValue(CachedClass.java:79)
at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46)
at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33)
at org.codehaus.groovy.reflection.CachedClass.getMethods(CachedClass.java:250)
at org.codehaus.groovy.reflection.stdclasses.CachedClosureClass.(CachedClosureClass.java:29)
at org.codehaus.groovy.reflection.ClassInfo.createCachedClass(ClassInfo.java:312)
at org.codehaus.groovy.reflection.ClassInfo.access$400(ClassInfo.java:37)
at org.codehaus.groovy.reflection.ClassInfo$LazyCachedClassRef.initValue(ClassInfo.java:484)
at org.codehaus.groovy.reflection.ClassInfo$LazyCachedClassRef.initValue(ClassInfo.java:475)
at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46)
at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33)
at org.codehaus.groovy.reflection.ClassInfo.getCachedClass(ClassInfo.java:94)
at org.codehaus.groovy.reflection.ReflectionCache.getCachedClass(ReflectionCache.java:107)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.registerMethods(MetaClassRegistryImpl.java:189)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.(MetaClassRegistryImpl.java:93)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.(MetaClassRegistryImpl.java:71)
at groovy.lang.GroovySystem.(GroovySystem.java:33)
at org.codehaus.groovy.runtime.InvokerHelper.(InvokerHelper.java:61)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallStaticSite(CallSiteArray.java:72)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallSite(CallSiteArray.java:159)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
at com.predic8.xml.util.ExternalResolver.(ExternalResolver.groovy:33)
at com.apigee.proxywriter.GenerateProxy$WSDLParser2.(GenerateProxy.java:3181)
at com.apigee.proxywriter.GenerateProxy$WSDLParser2.(GenerateProxy.java:3179)
at com.apigee.proxywriter.GenerateProxy.getWSDLDetails(GenerateProxy.java:2306)
at com.apigee.proxywriter.GenerateProxy.begin(GenerateProxy.java:2806)
at com.apigee.proxywriter.GenerateProxy.main(GenerateProxy.java:3113)
Exception in thread "main" BUG! UNCAUGHT EXCEPTION: java.lang.invoke.MethodHandles$Lookup.(java.lang.Class,int)
at org.codehaus.groovy.vmplugin.v7.Java7.(Java7.java:44)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
at java.base/java.lang.reflect.ReflectAccess.newInstance(ReflectAccess.java:128)
at java.base/jdk.internal.reflect.ReflectionFactory.newInstance(ReflectionFactory.java:347)
at java.base/java.lang.Class.newInstance(Class.java:645)
at org.codehaus.groovy.vmplugin.VMPluginFactory.createPlugin(VMPluginFactory.java:56)
at org.codehaus.groovy.vmplugin.VMPluginFactory.(VMPluginFactory.java:37)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.(MetaClassRegistryImpl.java:99)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.(MetaClassRegistryImpl.java:71)
at groovy.lang.GroovySystem.(GroovySystem.java:33)
at org.codehaus.groovy.runtime.InvokerHelper.(InvokerHelper.java:61)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallStaticSite(CallSiteArray.java:72)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallSite(CallSiteArray.java:159)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
at com.predic8.xml.util.ExternalResolver.(ExternalResolver.groovy:33)
at com.apigee.proxywriter.GenerateProxy$WSDLParser2.(GenerateProxy.java:3181)
at com.apigee.proxywriter.GenerateProxy$WSDLParser2.(GenerateProxy.java:3179)
at com.apigee.proxywriter.GenerateProxy.getWSDLDetails(GenerateProxy.java:2306)
at com.apigee.proxywriter.GenerateProxy.begin(GenerateProxy.java:2806)
at com.apigee.proxywriter.GenerateProxy.main(GenerateProxy.java:3113)
Caused by: java.lang.NoSuchMethodException: java.lang.invoke.MethodHandles$Lookup.(java.lang.Class,int)
at java.base/java.lang.Class.getConstructor0(Class.java:3585)
at java.base/java.lang.Class.getDeclaredConstructor(Class.java:2754)
at org.codehaus.groovy.vmplugin.v7.Java7.(Java7.java:42)
... 24 more

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.