Our web service is a Natural subprogram wrapped by EntireX.
It is the Out structure that is giving a problem in a C# application (not ours) that is using our web service. That application is crashing because it is expecting the minimum 1 occurrence (as specified by the wsdl) of a decimal field. Instead it is getting an empty tag and is reacting badly.
As soon as I edit the xmm and change Min Occurences from 1 to 0, the wsdl shows MinOccurs=‘0’, the resulting xml no longer has the empty tag at all, and the C# application is happy. Only I am not happy because of this intervention, which may be necessary only because of my ignorance of EntireX.
The Natural subprogram does not ‘materialize’ the array if there is no data for it. I can imagine that materializing the array for at least one occurrence will avoid the C# crash by returning a tag containing a zero rather than the empty one, but I would prefer to avoid sending the unnecessary tags.)
Changing the array group definition in the IDL from (/V) or (/1:V) to (/0:V) makes no difference to the xmm Min Occurences. The IDL Grammar manual hints that for x-arrays minOccurs will be 1: unbounded-array-index ::= [1:] V[maximum-upper-bound]
Changing assorted perferences for the XML Mapping Editor in EntireX Workbench doesn’t seem to help either.
So now I have Software AG Designer 8 installed on my pc, with no plans to install NaturalONE instead of Natural Studio, and Designer 8 generates a wsdl from a Natural IDL file with the desired minOccurs = 0.
[i]From the context menu of the IDL file, choose Properties.
Change the EntireX settings if necessary.
If necesssary, change the Web service generation settings using the WSDL tab (Service Name and Service URL).
Choose OK to leave the Properties dialog. [/i]
The problem is that I can’t see a field labelled Service URL where I would expect it, and the Web Services Wrapper insists on using location=“http://localhost:10010/wsstack/services/Test”/
The manual goes on:
Before the wizard is started for the first time, you should initialize the preference pages Window > Preferences > Software AG > EntireX and Window > Preferences > Software AG > EntireX > Web Service Wrapper with values appropriate for your environment.
I have changed the URL of XML Runtime (and ticked the box ‘Configure service with XML-INIT’) but to no avail.
Have I installed Designer 8 incorrectly, perhaps with wrong installation parameters? Are there other preferences that need tweaking?
Forgive me if I haven’t read enough of the manual.
Although I don’t see it documented in v8.2, entirex-forward.jar is still provided in \EntireX\webapps. To get “TestServices” instead of “entirex” in the URL, rename the entirex-forward.jar file as TestServices.jar (instead of entirex.jar as the documentation suggests).
I really don’t know what I am doing, and am working with the barest minimum of experience in all of this.
When using ‘Generate Web Service from Software AG IDL’ in Workbench v7 I was able to specify a URL which appeared in the resulting wsdl as location=… I don’t know how or where to do this in Designer v8.
the Web service’s URL has no meaning as long as the service is not deployed into a runtime where it is accessible. That’s why at service generation time a default URL is inserted (that actually points into the default WS-stack installation that comes with EntireX 8.2).
An easy way to generate, deploy an test a Web service starting from an IDL would be:
Right-click on the IDL: Generate Web Service from Software AG IDL…
On the first wizard page check the “Deploy service” checkbox and go to the next page
Optionally select which programs should be exposed as Web service operations; go to the next page
On the Deploy wizard page, you’ll see the default WS-stack deploy location
The final wizard page deploys the Web service archive (.aar) to the WS-stack runtime
Now you can right click on the service archive (.aar) and from the “Web Services Stack” submenu chose “View deployed Web service”. This will display the service’s WSDL from the URL where it has been deployed to.
Additionally you can test your service as follows:
Right-click on the .aar and select “Test EntireX Web service”
In the XML Tester window that is started click on the “Create sample XML” icon on the toolbar.
Click the “Run” (green arrow) button on the toolbar. You’ll see the result SOAP message of your WS call in the output area of the Tester.
Thank you very much for your advice, and apologies for my late reply.
Using Deploy Service gave an error which is far too long to transcribe here.
For the purposes of the current project (which of course has time pressures), we will stick with V7 of the Workbench and edit each xmm file to change the minOccurs from 1 to 0.