cancel
Showing results for 
Search instead for 
Did you mean: 

Calling a Webservice with a list (array) as an input parameter

Former Member
0 Kudos

Hello all,

i am trying to use a webservice where one of its input parameters is a list (array) of strings.

Unfortunately Visual Composer doesn't show this input parameter in the list of parameters.

Is it possible that Visual Composer does not support list (array) input-parameters in webservices?

Thanks

Florian

Edited by: Florian Kandlinger on May 8, 2008 8:48 AM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Sorry Ahmed, but this document is not about my problem.

Here is an excerpt of the WSDL from the webservice i would like to call:


[...]
<xs:complexType name="ArrayOfString">
  <xs:sequence>
  <xs:element maxOccurs="unbounded" minOccurs="0" name="String" type="xs:string" nillable="true"/>
  </xs:sequence>
</xs:complexType>
[...]
    <xs:complexType name="KennzeichenDTO">
        <xs:complexContent>
          <xs:extension base="tns:DTO">
            <xs:sequence>
              <xs:element name="ablauftageKurzzeitkennzeichen" type="xs:short" nillable="true" minOccurs="0"/>
              <xs:element name="betriebszeitraumBis" type="xs:short" nillable="true" minOccurs="0"/>
              <xs:element name="betriebszeitraumVon" type="xs:short" nillable="true" minOccurs="0"/>
              <xs:element name="datumKennzeichenGueltigBis" type="xs:dateTime" nillable="true" minOccurs="0"/>
              <xs:element name="kennzeichen" type="xs:string" nillable="true" minOccurs="0"/>
              <xs:element name="kennzeichenBisher" type="xs:string" nillable="true" minOccurs="0"/>
              <xs:element name="kennzeichenreservierung" type="xs:boolean" nillable="true" minOccurs="0"/>
              <xs:element name="listeMerkmalKennzeichenart" type="s0:ArrayOfString" nillable="true" minOccurs="0"/>
              <xs:element name="merkmalKennzeichenart" type="xs:string" nillable="true" minOccurs="0"/>
              <xs:element name="zeitpunktZuteilungKennzeichen" type="xs:dateTime" nillable="true" minOccurs="0"/>
            </xs:sequence>
          </xs:extension>
        </xs:complexContent>
      </xs:complexType>

When trying to call this webservice in Visual Composer, in the list of arguments, "listeMerkmalKennzeichenart" is not offered.

So i cannot call the webservice. Is it possible that Visual Composer cannot handle nested list types as input parameter of web services?

Grettings

Florian

Edited by: Florian Kandlinger on May 13, 2008 8:12 AM

Former Member
0 Kudos

Hi Florian,

Does your webserivce work with WS Navigator or any other WS testing tools like "Strike Iron", "SOAP UI"?

Best regards,

Dharmi

Former Member
0 Kudos

Yes it works with WS Navigator and SOAP UI.

Here are two screenshots:

The [first one|http://img212.imageshack.us/img212/9830/vc1bu5.jpg] shows the web service interface as it is viewed in WS Navigator. Which is correct.

The [second one|http://img291.imageshack.us/img291/323/vc2xf7.jpg] shows the web service interface like Visual Composer sees it. As you can the the

nested array structure "listeMerkmalKennzeichenart" is missing.

Former Member
0 Kudos

Hi Florian,

Can you post the screenshot of your WS as it is in Design mode of VC?

Also can you please check the log on the server for any messages on that or email it?

Best regards,

Dharmi

Former Member
0 Kudos

Is [this|http://img241.imageshack.us/img241/6852/vc3sn4.jpg] the screenshot you requested?

Former Member
0 Kudos

Hi Florian,

Yes, that is what I wanted to see.

Can you right click (from the context menu) on the service, and select redefine ports -> Reimport and check what happens?

Also send me the log / trace file which is located on server.

Best regards,

Dharmi

Former Member
0 Kudos

Result after reimport: [Link|http://img341.imageshack.us/img341/6118/vc4ty3.jpg]

In the log file is no error message or warning.

Greets

Florian

Former Member
0 Kudos

Hi Florian,

From the context menu, can you test your data service?

Regards,

Dharmi

Former Member
0 Kudos

Hi Dharmi,

when trying to test it, [this message|http://img227.imageshack.us/img227/3497/vccciz2.jpg] appears.

Greetings

Florian

Former Member
0 Kudos

Hi Florian,

Ok. I am sure, you must have taken the flow out from the input port of your service to the input form of yours. Just checking???

Can you put a text editor on your form and try to check the value in the configuration to see if you see that liste.... (ArrayofString) thing???

Best regards,

Dharmi

Former Member
0 Kudos

Hi,

but when i make a TextEdit then i can only enter one single value. I cannot enter multiple values.

So i can only fill the first element of the array, but i cannot fill the whole list.

So thats the problem.

Greetings

Florian

Former Member
0 Kudos

Hi Florian,

Thatz what! How do you plan to fill data for this StringofArray?

Regards,

Dharmi

Former Member
0 Kudos

Hi Dharmi,

the user should be able to enter the values (strings).

But there is no control supporting this.

I dont't find a way to get values in this nested array. Because i just cannot find a control for this.

Have you a solution, or have you already made something like this?

Greetings

Florian

Former Member
0 Kudos

Hi Florian,

If I understood you correctly, you have a WS with a cluster structure as input and you want to send nested data to that input.

If so can you please do the following and attache a snapshot?

1. Drag the WS to the Drawing board

2. Drag a Data Bridge element(in the Compose panel -> under connectors) to the Drawing board

3. Connect the input port of the WS to the Data Bridge element

4. Right click the Data Bridge element and select the Define Data option

5. Capture a snapshot of the dialog and attache it please.

Thanks,

Udi

Former Member
0 Kudos

The webservice has several input-arguments, one of this arguments has a nested ArrayOfStrings.

And the user should be able to fill all arguments, including the nested ArrayOfStrings.

[Here it is|http://img364.imageshack.us/img364/2954/dfasdfasdfasyu5.jpg]

Edited by: Florian Kandlinger on May 13, 2008 1:57 PM

Former Member
0 Kudos

According to the structure in the snapshot this is what you should do.

I will continue the scenrio in the previous corresponding...

6. Drag a Form View to the Drawing board and connect the input of the Form View to the Data Bridge

7. Right click the Form View and select the Define Data option

8. Select the fields you'd like to display to the user

9. Drag a Table View and connect the input of the Table View to the output of the Form View

10. Right click the Table View and select the Define Data option

11. In the right pane select the desired node (in your case I beleive it's "kennzeichen_list...")

12. In the left pane select the fields you'd like to display to the user

13. Switch to the Layout board and drag a button to the toolbar of the Table View.

14. Right click the button and select the Action option

15. Add the Insert Row action (you can rename the button to "Insert")

16. Add another button to the toolbar and add a Custom Action to it named "submit1" (you can rename the button to "Submit")

17. Switch back to the Drawing board

18. Right click the line that connects the Data Bridge element with the input of the service and select Map Data option

19. Select the root node (most likely named 'bridge1') and click Mapp All.

20. Close the Dialog and open Configure panel (while the line is still selected)

21. In the "Event name" type "submit1" and in the "Select mode" field select the "All data rows" options

I tested this scenario on VC 7.1 SP5 and it worked.

Good luck,

Udi

Edited by: Udi Cohen on May 13, 2008 4:26 PM

Former Member
0 Kudos

Hi Udi,

i tried your solution.

Unfortunately i doesn't work. The Webservice is never called. It looks like the event "submit1" is ignored.

Have i done something wrong?

Thanks

Florian

Former Member
0 Kudos

I extended your solution and the problem was solved. The event should be called "*submit1".

Thanks.

Answers (3)

Answers (3)

Former Member
0 Kudos

Dear Florian,

please refer to the following artocle it has exactly what you are looking for:

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/7000a4db-d4e2-2a10-ebaf-c6e1de63...

Former Member
0 Kudos

Hi,

what do you want to do exactly? Use a form to fill in and then pass the parameters to the web service?

And do you mean java List object or array? You can surely use List, array can be used as output but as input I suppose but not sure.

Best regards,

v s

Former Member
0 Kudos

no one?

Edited by: Florian Kandlinger on May 9, 2008 7:53 AM