cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic - Web Service Call

Former Member
0 Kudos

Hi All

I am working on 12.2.3 build 165. I am trying to call web service dynamically providing url at the run time..

I tried using wizard way- giving url, then selecting operation and it works fine. But is it possible to give url as input at run time... I have tried giving no. of inputs at run time but none worked. Pls guide in detail if this is possible.

thanking you all , taranum

Accepted Solutions (1)

Accepted Solutions (1)

suhas_nagaraju
Participant
0 Kudos

Hi Taranum,

There are 3 things that you need to provide during runtime:

1. WSDL URL

2. Credential Alias or Username and password

3. Operation

With the above parameters it is possible to run the web service action block at runtime. The output will be available in the parameter named Output.

Thanks,

Suhas

Former Member
0 Kudos

Hi Suhas,

thanks for guiding me through.. Algh it seems to work but how do i provide input to Service?

I tried giving it same way as we give while wizard way but it is throwing unknown variable error to tag am trying to give input.. can u throw more light how to assign input in run time mode..

if possible guide me with ex.

thanks for all your help .. looking forward to closing this query with all your support!

thanks/regards

taranum

Edited by: Taranum Garg on Mar 9, 2012 5:23 AM

agentry_src
Active Contributor
0 Kudos

Put a tracer in after your webservice call and display the various inputs to see if you need to escape any characters(like //). I have run into those kinds of problems in the past. You should be able to see what it is being rendered as from the tracer. You could also run it through a monitor, but start with the tracer as it is quick to implement.

Regards,

Mike

Former Member
0 Kudos

Hi Mike

Can you guide how to pass input parameters for Request objects of particular web service in runtime.

Can you provide an example to illustrate the same. It will be of great help to know how to use it!

Looking forward to it. Thanking You!

Regrads

Taranum

agentry_src
Active Contributor
0 Kudos

It is a little confusing, but you should be able to apply your URL string to the Web Service action block using the property WSDLUrl.  If you populate the URL in the Configuration Editor, you should be able to go to the Link Editor and do a mouse over that property (slowly) to see what you applied in the Configuration Editor.  At that point, I would create a Transaction (or Local) property with your URL in it, drag and drop it onto the WSDLUrl property, then test it.  Since it will show up in the Expression Editor, you should be able to Execute it locally in the Expression Editor to see how it is rendered.  Sometimes it renders differently in actual use, so keep testing it using Tracer to see how it is rendered when you run the whole transaction.

Good luck!  Mike

Former Member
0 Kudos

Hi Mike

As you described, it might help me in executing the same but i am looking for how to provide input variables to the Web Service. As we discussed, we have input tag for same. But how to use it. Also, if i have more than one input- how to proceed on the same.

Looking forward to it.

Thanking You All in Anticipation, Taranum

suhas_nagaraju
Participant
0 Kudos

Hi Taranum,

I have thought about the dynamic passing of parameters. There is one solution:

1. Intially configure the web service using the configuration wizard. Thereby we get the request object which is a xml type.

2. Define a input xml based on the type of request and link it to the request object xml.

For example: The BrowseFoldersRequest is the request object for BrowseFolders service in the webservice WS provided by MII. Now we can create a transaction property of type xml and link to BrowseFoldersRequest. The xml will be as below:

<?xml version="1.0" encoding="UTF-8"?>

<BrowseFoldersRequest xmlns="http://www.sap.com/MII">

<FolderRoot>FolderName</FolderRoot>

</BrowseFoldersRequest>

So when we run the webservice we get the desired result.

Thanks,

Suhas

Former Member
0 Kudos

Hi Suhas

I tried the way described. Providing the URL, Credential, Operation and other input param as stated.. But i got error at last stating the RFC method is invalid ...RFC input which we tag to Service call was not recognised.

Have you/ anyone tried this before and successfully accompalished it?

Looking forward to any clue..

Thanks/Regards

Taranum

suhas_nagaraju
Participant
0 Kudos

I have tried it for the WS service provided by MII and succesfully accomplished. When we configure the webservice through the configuration wizard we need not provide URL and Operation through link editor.

Can you post the structure of request xml that you are passing and the structure that the request object expects?

Thanks,

Suhas

Former Member
0 Kudos

Hi Suhas

Sry for coming late. I am trying to create a simple scenario like creating notification or simply creating ecc production order from mii to ecc. So just tagging the xml input details for std. RFC for same.

can u throw more light on - WS service provided by MII..which are those?

-- I tried through link editors only - no configuration done .. it was giving me error..

looking forward to some successful example details - where in -i can 2 try it out.. if possible. pls try creatng production order n sharing inpt details..

thanking u

taranum

siriyadav0902
Explorer
0 Kudos

Hello Nagaraju,

I need to create a dynamic Webservice call for my application.

As you mentioned on above I passed the following with link editor in Web service call,

1. WSDL Base URL

2. WSDL URL

3. Opertaion

but its showing the following error

com.sap.lhcommon.webservice.SoapOperation.getInputMessage() of an object loaded from local variable 'oper'

Am i missing any mandatory field value to pass to Webservice call ?

how can I pass XML input at run time to the request object in this scenario ?


Here I'm using this as a common transaction, so multiple transaction can use it to post to Web sphere.


Looking forward for your assistance.


I need to pass wsdl's dynamically, So can I pass Input XML to request object in linke editor ?


on of the WSDL structure:


Regards,

Srisailam Yadav

Answers (0)