webservice puts an empty element in the Output

Hi,

I have seen this several times and pondered more than the times that I have seen this. An IS service has DocumentList as output of the service and when the service returns no records, the Document List is empty (0 elements in the array).

Now, when this IS service is invoked as a webservice via CAF, the webservice has one element in the array with null values when the IS service returns an empty record set.

The Async Table “thinks” that there is indeed a single record in the array and it displays the Data Total as 1 of 1. Consequently, the Empty Message of the Data Total does not get displayed because as far as the Table is concerned, it has one record in the Content Provider it is bound to. I know that we can check for this in the bean code and handle it.

Can someone please help me with the following questions?

  • How can we make sure that the webservice honours the behaviour of the underlying service?
    Why does this happen?

Thanks,
Best regards,
Raj

That’s a good description.

Do you know if you are using the older style web services exposed by IS, or if you are using the new Web Service Descriptors?

The WSDs are the preferred way to consume IS services over WebServices and i think that the SOAP responses might be ‘more accurate’.

Again, i haven’t tried to replicate your scenario so I don’t know for sure if it would help, but that has been the area where the Integration Server team has invested a lot of effort with better Web Service Support, features and compliancy.

Regards,
–mark

Hi Mark,

I am indeed following the newer/recommended way of creating the webservices. It is quite easy to replicate by creating an IS service with a DocumentList as Output with no implementation in the service. Then you create a Provider WSC and then yada yada yada in CAF.

While I was in the middle of writing this post, I just quickly checked something and it resolved the issue.

“Something” below …
When you add elements (String/StringList/Document etc…) in an IS document, by default these elements have the following constraints defined on them.

Required = True
Allow null = True
Allow Unspecified values = True

Probably Glue (is it still Glue or Axis now?) uses the Required = True value and then decides, “Hmmm…, so you are required, but you have no value, but you can also have null, so I will make you null”

I made Required = False to resolve this.

Thanks,
Best regards,
Raj

Nice! Thanks for the info.
(Yes, we’re still using Glue… we actually have code to use Axis stubs for quite awhile, but we’ll probably adopt our WebService Stack in the next major release which is based upon AXIS 2)

Regards,
–mark