cancel
Showing results for 
Search instead for 
Did you mean: 

consuming a webservice from a portal service...

derekvincent
Participant
0 Kudos

Hello all,

I am playing around with the example code for imlimenting a federated search (found in the km section) and was trying to use a webservice call to google as an example of a the federated search.

I generated a client side portal service (from the goodle wsdl) and I am now trying to access it form the search virtual index service I wrote...

I someone can point me in the correct direction that would be great... I was looking at the following blog which helped setup the webservice but I find the code used to access it does not help. For one thing I can not find the IServiceName class anywhere in the portal or j2ee javadoc or jat files.

Cheers,

D.

Accepted Solutions (1)

Accepted Solutions (1)

Dan_Wroblewski
Developer Advocate
Developer Advocate
0 Kudos

Hi Derek,

First, I think IServiceName is really supposed to be the name of the service interface. So if you named it GoogleSearch, it would be IGoogleSearch.

The example seems to skip a few steps (like deploying your portal service), so I think it a bit confusing. Basically, what you are doing is creating a portal service that will offer the same methods as the web service, but is easily accessible from portal components. SO once you set up the portal service "proxy" -- you simply get your portal service and call methods. To get the service, you need the interface (displayed as IServiceName but really something else).

Second, this web services implementation is now outdated (as of SP15), and you should now use the J2EE implementation for web services. See http://help.sap.com/saphelp_nw04/helpdata/en/43/70614e4d1c3459e10000000a422035/frameset.htm, which explains how to do this.

Hope this helps.

Daniel

Former Member
0 Kudos

Hi ,

I am getting the problems while consuming the web services in portal component.

I am not able to call the methods of web services.

look at my code.

IListServiceName client=

(IListServiceName) PortalRuntime.getRuntimeResources ().getService (IListServiceName.KEY);

GetListResponse glr= client.getList();

frist line is working fine.

In my web service i have a method called GetList().

Any way i have to call that method and get the result.

But there are other classes which are automatically generated when i consumed the web service, like GetListResponse().

When i try to call client.GetList(); it gives the error at run time, No error in the code but the errors are coming at run time.

Where is the problem? other things like proxy settings, etc i have done.

What could be the problem? Can any one suggest.

Regards

Bala

Answers (0)