I'm trying to create an application in java that hits the service exposed by hub.
To create the request in java, I'm trying to generate class files using the wsdl that is created and exposed by the hub.
Steps executed:
1. Created an application in OPA.
2. Deployed it on hub (usinf deploy snapshot option on policy modeling)
3. In the deployment tab, I see the application and by clicking on it I get the wsdl url.
I try executing wsimport command on this wsdl. But it gives me the following error messages.
---------------------------------------------------------------------------------------------------
C:\******\AllFiles>wsimport http://localhost:7001/hub/determinations-server/assess/soap/generic/12.2/AttemptOne?wsdl
parsing WSDL...
[ERROR] Invalid WSDL http://localhost:7001/hub/determinations-server/assess/soap/generic/12.2/AttemptOne?wsdl, expected {http://schemas.xmlsoap.org/wsdl/}definitions found html at (line 2)
Failed to read the WSDL document: http://localhost:7001/hub/determinations-server/assess/soap/generic/12.2/AttemptOne?wsdl, because 1) could not find the document; /2) the document could not be read; 3) the root element of the document is not <wsdl:definitions>.
[ERROR] Could not find wsdl:service in the provided WSDL(s):
At least one WSDL with at least one service definition needs to be provided.
Failed to parse the WSDL.
---------------------------------------------------------------------------------------------------
If I store the wsdl in a file on my local machine, and execute wsimport, it generates the classes just fine.
Can someone provide me with a way I can generate the classes using the wsdl url and not the local file?
Also, do I need to create a connection on the Connections tab on the hub?
Thanks in advance.
- Snehal