cancel
Showing results for 
Search instead for 
Did you mean: 

web service empty relationship problem

Former Member
0 Kudos

hi all,

I have a pretty simple web service. Two entities, a citizen and a business. A citizen is able to register 0..n businesses. There is a WS which reads the citizen. When the business key list in citizen is empty the web service wont return the citizen (portal request failed could not execute web service operation). When at least one relation is defined all works fine.

I've tested the web service. The problem occurs only with VC.

thanks for your help,

regards, felix

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI Flex

There you go .....The web service does nt get anything that is the reasn why it throws an eroor in the earlier case ... what i would suggest is make use of the "ISNULL" function in t he table/form were you are stroing the output.

Also you have to modify the webserives stating that if no values if found return some EROOR message this means the webservice has to have TWO ports one returing the data the other The message just like n the case of BAPIS.

Thanx

Pankaj

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Pankaj

Because i got this answer from one of your replies only i was abt to wrtie

Thanx Pankaj for this but suddendly pressed enter ...

Thanx

Rakesh

Former Member
0 Kudos

thx for your help!

obviously VC is not able to handle empty lists.

Felix

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

Hi Flex

i completly agree with what rakesh suggests if the xml is what you have enetered is .

Former Member
0 Kudos

Hi Flix

Is the error related to execution of the web servcie / or the web service is getting exe cuted properly but yet returing nothing.

Former Member
0 Kudos

Hi Pankaj,

seems that the service ist executed in the back end properly. It creates all db entries. But VC has somehow problems with the return values (I think especially the empty list is the problem).

thanks for your answer,

felix

ankur_garg5
Active Contributor
0 Kudos

Hi Felix,

You say the problem occurs only with VC. But you have not told what the problem is. Can you explain what problem you are facing, or what error you are getting.

By the way, you can have a look at this doc, may be it helps:

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e017128b-0c01-0010-fa85-e3a576f1a40d">Consume a Web Service from Visual Composer</a>

Bye

Ankur

Reward points if it helps!!

Former Member
0 Kudos

Hi,

the problem is, that the web service does not return a result (but an error ) when there is an empty list in the return values. The list consits of object references. When there is at least one entry defined the service works fine.

felix

ankur_garg5
Active Contributor
0 Kudos

This message was moderated.

Former Member
0 Kudos

Hi Ankur,

no, not exactly...

The webservice is tested with an id as input and returns some string values (name, firstname...) and a list of references to other objects. When this list is empty...(depending on the back end system)

part of the SOAP message:

<ns1:businessRef xmlns:ns1='urn:com.sap.bureg001.core.besrv.citizen' xmlns:pns='urn:java/lang'></ns1:businessRef>

... visual composer returns an error.

when this list is not empty (again depending on database entries in the back end)

part of the SOAP message:

<ns1:businessRef xmlns:ns1='urn:com.sap.bureg001.core.besrv.citizen' xmlns:pns='urn:java/lang'><pns:String>c22bc900-dec3-11db-cdce-00505625e523</pns:String>

</ns1:businessRef>

... visual composer does not return an error but returns the values like the service is supposed to do.

Testing the web service with Web Services Navigator both scenarios are working without problems.

thanks for your fast response,

felix