I am trying to connect to a REST Web Service which outputs JSON. I have used SOAPUI to create the WADL and could import the function successfully. However there was no response tag created in the WADL and so while the function call successfully connected to the web service, the result set wasn’t written to my temp table.
A bit of digging on the SAP Support Portal has got me a note (2230626) which talks about how a WADL generated by SOAPUI may not have a response/reply element and how the WADL file needs to be amended and an XSD provided.
I’ve used the examples in the note to amend my WADL but I’m not sure if I need to reference an XSD in the Grammars element for this to work. And if I do need to reference an XSD then what format do I used when the output is a JSON array?
Can’t seem to find much on this online but any ideas gratefully received.
if you expect a response either json or xml, you will have to specify the schema of the response it can be declared with the response or you can reference it from a XSD
if you are able to generate WADL from SoapUI, when making the call, you will see a tab under response named schema if you click on that you can get the response schema, depending on your response you may get multiple schemas
if the service provider is not giving an WADL that you can use, then yes, it can be little tricky to get the WADL
is this a public service ? if yes, let me know the link I can generate a WADL for you
or
Open a support case, let me know the number I can take a look
extract the attached WALD and XSD file to a folder, create a new WebService REST Datastore and point to this WADL file, import getWeather function
also, attached is the SOAPUI screen, showing how to get the schema
under the response, click on Schema, the click on Conflicts tab, select Auo-Resolve, you will get some prompts click yes/ok
Select schema tab, you can see the schema namespaces, select each and you can see the XSD, select all and save this to a file, if you have multiple namespaces same all of them to separate files and use them in WADL file WeatherREST.zip (176.0 KB)