We are using API Manager 2.1.0 with a distributed deployment (double gateways). When we create a SOAP API using a soap endpoint, we get an error. These are the steps we followed in the API creator web interface:
- Create a new API 'I Have SOAP endpoint'
- In the Design API we add all the information required and save
When saving, we have an error when importing the WSDL:
ERROR {org.wso2.carbon.apimgt.impl.utils.APIMWSDLReader} - Error occurred while getting the wsdl address location {org.wso2.carbon.apimgt.impl.utils.APIMWSDLReader}
java.net.MalformedURLException: no protocol: null/testphone/1.0
at java.net.URL.<init>(URL.java:593)
at java.net.URL.<init>(URL.java:490)
at java.net.URL.<init>(URL.java:439)
at org.wso2.carbon.apimgt.impl.utils.APIMWSDLReader.setServiceDefinition(APIMWSDLReader.java:307)
at org.wso2.carbon.apimgt.impl.utils.APIMWSDLReader.updateWSDL(APIMWSDLReader.java:156)
at org.wso2.carbon.apimgt.impl.utils.APIUtil.createWSDL(APIUtil.java:1375)
at org.wso2.carbon.apimgt.impl.APIProviderImpl.updateWsdl(APIProviderImpl.java:731)
at org.wso2.carbon.apimgt.impl.APIProviderImpl.updateAPI(APIProviderImpl.java:836)
at org.wso2.carbon.apimgt.impl.UserAwareAPIProvider.manageAPI(UserAwareAPIProvider.java:72)
at org.wso2.carbon.apimgt.hostobjects.APIProviderHostObject.saveAPI(APIProviderHostObject.java:1061)
at org.wso2.carbon.apimgt.hostobjects.APIProviderHostObject.jsFunction_updateAPIImplementation(APIProviderHostObject.java:672)
at sun.reflect.GeneratedMethodAccessor392.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:386)
and the WSDL imported (in the registry) has a null in the location in wsdl:port. If we use only one gateway and import the same WSDL we do not have the error and everything works smoothly. The problem is not related to the WSDL and it happens with all WSDL. How can we solve it?