cancel
Showing results for 
Search instead for 
Did you mean: 

Pass own defined structure as input to application service

Former Member
0 Kudos

Hi Experts,

I want to create an application service which accepts as input a structure type which I created in the dictionary part of my CAF project (in the same way one would add say caf.core.FolderDS as an input). Problem is I can't see the structure on the operations tab of the application service, even though the structure is part of the same CAF project. I also created a simple type which I can access from the operations tab.

Any ideas?

Thank you,

JP

Accepted Solutions (1)

Accepted Solutions (1)

former_member206397
Contributor
0 Kudos

Hi,

I think you have done the mistake to publish your structure within the dictionary project. Please do the following steps.

1. Right click on your structure.

2. select <b>Add to Public Part</b>.

3. Now select <b>types_compilation</b>.

4. Then click ok.

5. in the same way as step 1 to step 4 select <b>types_assembly</b> and click ok.

6. Now save all metadata and build your dictionary project.

7. Then check it in your CAF main project. I think it will be availavle.

Thanks

Chandan

Former Member
0 Kudos

Hi Chandan,

Thank you for the reply.

I did exactly what you said, but it did not work.

Do I have to do anything else with the public parts?

Could it possible have anything to do with the namespace I give to the structure?

What's really frustrating is that this works from the get go for simple types

former_member206397
Contributor
0 Kudos

Hi,

You are right. I have tested it today in my machine. Accessing Structure from dictionary project to CAF Application Service is not possible. It only suports Custom Simple Types data. If you check the same procedure which I have told in earlier reply for simple type data it will work fine but for structure it will not work.

Just tell me one thing why are you going to create structure from dictionary project. Within the application service you can create the custom structure and assign it to input of application service. I am telling you the steps

1. in Operation tab page of application service create a custom operation. within the Attribute/Type Repository pane expand Catalog->Data Structures->select your CAF project name(Shown by project Name).

2. Right click on project name and click New.

3.Now Data Structure wizerd will come, Put your Structure name and from left pane enter select data type and add it to structure. You can also edit the names if attributes from the property tab page which is available in buttom side of screen.

4. After creation of structure click on finish.

5. Now you can add the structure as the input of your operation.

If you have any query please let me know.

Thanks

Chandan

Former Member
0 Kudos

Thanks Chandan, that sounds like it should work.

I'll try it a bit later and then come award points

One question though, how does the model generated from the application services look if I create a structure as you described? Don't I need access to the structure in order to pass it to the ServiceProxy of the model?

former_member206397
Contributor
0 Kudos

Hi,

After creation of your custom structure you need to add it in input of your operation of Application service. Then you need to write your custom business logic.

But one sad information that you can not test it from CAF service browser. Because inut structure in Application service does not support. You need to create web service and try to test it from Web service nevagitor. It may work.

Thanks

Chandan

Former Member
0 Kudos

Hi Chandan,

The structure works fine in the Application Service, but it isn't working correctly in the Web Dynpro model. I had a look at SAP Note 1030595 and it seems to be my exact problem. I want to create a method similar to the 'findByMultipleParameters' method in Entity Services but which is accessible through the model; do you have any suggestion how I could do this?

Thank you,

JP

Former Member
0 Kudos

Hi JP,I got the same problem.

I have created a custom method in the application service and in that custom method i am calling a web service method.I have created my own data structures and using them as the input parameters for the custom method.

Now the first problem is i am not able to test it from the service browser .As you said i will create a web service for that and test it.

The secondproblem is that in the webdynpro it isnot showing these complex data types as parameters.It is only showing IAspect Object.due to this i am not able invoke that method from web dynpro.

How did you solve these issue?.i am working on this issue since one week but i was not able to find a solution.Can you plz suggest a solution for this?.

Thanks

Sampath.G

former_member4529
Active Contributor
0 Kudos

Hi,

The issue you are getting because of CAF Web Dynpro model which has lot of limitations and has been discarded in the next Netweaver release(CE). Check for more details of the limitations of CAF WDP model.

Better you create adaptive web service model in Web Dynpro and access the CAF web service through it. That works fine.

Thanks,

Dipankar

Answers (0)