cancel
Showing results for 
Search instead for 
Did you mean: 

webservice consumption from abap system

Former Member
0 Kudos

hi colleagues,

I want to consume webservice that is in ABAP syatem in webdynpro java project .

I just want to know what is the basic thing need to do for consuming webservice.

Thanks,

sudhanshu

Accepted Solutions (0)

Answers (4)

Answers (4)

siddharth_jain
Active Contributor
0 Kudos

Hi,

Have u released ur webservice when u exposed it .

Also for your older webservice have u checked its working in WSADMIN by selecting the WS and from Main menu--Webservice-Webservice homepage ,This will directly open your Webservice in WS navigator for testing.

please make sure that in WS admin for the exposed webservice you have properly configured the Logon data.

But why you are consuming the RFC via webservice why not from ARFC model.

Siddharth

Former Member
0 Kudos

hi sid,

i am learning webdynpro java model part and here the option avail for consuming webservice,consuming adaptive rfc and other.so i try for all so that i can use all this in my future project.

and where is WSADMIN

do you know if have wsdl then how can i deploy in webservice navigator so taht i can test whether the created webservice working fine or not.

Thanks,

sudhanshu

Former Member
0 Kudos

Hi

Release of Webservice is done in R/3 level more over its abaper part to do.Once it is released it will be available in wsnavigator.

All webservices are available in wsnavigotor.Check your webservice name which was created by abaper and test it.

Otherwise Go to Tcode: WSADMIN

Select the webService and click on Execute method or WSDL icon it redirects to XML File.Savve the XML File to desktop and use it while creating the model by browse option it will work.

Thanks

Tulasi Palnati

Former Member
0 Kudos

Hi tulasi,

how this possible if some webservice released from abap system it will available in all webservice navigator .

I am not able the webservice in wsadmin tcode

Thanks,

sudhanshu

Edited by: Sudhanshu Agarwal on Jun 18, 2009 2:38 PM

Former Member
0 Kudos

Hi

Once it was released it will be deployed in WAS(ABAP+JAVA Stack) so all the webservices of java and abap are available in wsnavigator.

WSadmin is the tcode related to Abap.

Thanks

Tulasi

Former Member
0 Kudos

Hi Sudhashu,

wsadmin is a transaction in backend where you can see your pusblished web services.

You need to specify j2ee engine in the transaction 'soamanager' to make use of wsnavigator of your portal.

Are you using a standard bapi?

Why dont you try with this url to get the wsdl.

http://<HostName>:<PortNo>/sap/bc/soap/wsdl/?services=<BapiName>&sap-client=<ClientNo>;

Store it in your local system and try creating model.

Best Wishes

Idhaya R

Former Member
0 Kudos

Hi idhaya,

There is no such service in tcode WSADMIN

http://<HostName>:<PortNo>/sap/bc/soap/wsdl/?services=<BapiName>&sap-client=<ClientNo>;

in this url

host and port is abap host and port

bapi is service interface name is it...

Thanks,

sudhanshu

Former Member
0 Kudos

hi idharya,

You need to specify j2ee engine in the transaction 'soamanager' to make use of wsnavigator of your portal

how we can mention our j2ee in somanager

Thanks,

sudhanshu

Former Member
0 Kudos

Hi ,

What you said about the url is correct..

Regarding j2ee engine settings..

Start the transaction

SOAMANAGER -> Technical Configuration -> System Global Settings

There you need to specify your j2ee engine host and port no.

Best Wishes

Idhaya R

Former Member
0 Kudos

Hi ,

i specified host and port of my local j2ee engine .

so is this possible all previously exposed webservice automatically come to webservice navigator or we need to do something else.

and regarding the url that u specify

http://<HostName>:<PortNo>/sap/bc/soap/wsdl/?services=<BapiName>&sap-client=<ClientNo>;

i m just asking that we have to specify the abap host and port name here

and what we mention in Bapi....

Thanks

sudhanshu

Edited by: Sudhanshu Agarwal on Jun 18, 2009 3:20 PM

Former Member
0 Kudos

Hi,

You are using a bapi as a web service right? Use that bapi name.

Use this link for testing the web service.

http://help.sap.com/erp2005_ehp_04/helpdata/EN/47/39b5df39591a53e10000000a1553f7/content.htm

Best Wishes

Idhaya R

Former Member
0 Kudos

hi,

but there is no such business administration tab in soa management as mentioned in yr link.

i m not using bapi as a webservice.

Thanks,

sudhanshu

Former Member
0 Kudos

hi

exposing webservice from the abap , first thing you have to expose your FM to webservice

select the FM - from the menu Utilities ->more utilities ->provide the service name

and click next and finish . you can get your service definition in the SE80 , select you

service , in the right side you can find WSDL tab , you can download the wsdl file on the desktop

and integrate in the NWDS.

you have to create the destinations in the visual admin tool to successfully execute the weebservice .

you can find many articles to use webservice in SDN

Former Member
0 Kudos

hi colleagues,

I did all the settings in sap visual administrator also but i m getting this exception

" java.io.IOException: com.sap.engine.lib.xml.util.NestedException: WSDL 'portType' can not have child 'wsp:Policy' of namespace 'http://schemas.xmlsoap.org/ws/2004/09/policy' ! "

Even i set the destination for both metadata and execution .

Please help me on this issue.

Former Member
0 Kudos

Hi,

I guess there is a problem in the WSDL format. Just check WebService is created properly and it is working fine using any other client like XML Spy.

Or you can use "Enterprise portal webservice checker" of Enterprise Portal perspective of NWDS to test the webservice.

Regards,

Charan

Former Member
0 Kudos

hi,

as this statment show that there will be some configuiration problem.how can i check that thing .I maintained all info in visual admin under websecurity and create one for each meta data and modelinstance.

plz refer this statment with the above message exception

"com.sap.tc.webdynpro.model.webservice.exception.WSModelRuntimeException: Exception on creation of service metadata for WS metadata destination 'DEFAULT_WS_METADATA_DEST' and WS interface 'BusinessPartnerERPByElementsQueryResponse_In'. One possible reason is that the metadata destination 'DEFAULT_WS_METADATA_DEST' has not been properly configured; check configuration."

plz help me on this issue.

Thanks,

sudhanhsu

Former Member
0 Kudos

Hi

Hav you created the destianation with the exact name: 'DEFAULT_WS_METADATA_DEST'?

And have you created the destination in the same location mentioned in the below document?

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/b2bc0932-0d01-0010-6d8e-cff...

Please confirm?

Regards,

Charan

Former Member
0 Kudos

hi ,

I created destination for both

DEFAULT_WS_METADATA_DEST

DEFAULT_WS_EXECUTION_DEST

with same info in both.

Thanks ,

sudhanshu

Former Member
0 Kudos

Hi,

And how did you give the URL in the url field of the destination. Try giving eitire wsdl url.

Using that url you should be able to access the wsdl in the internet explorer.

I guess no need to give system id, client and language.

Regards,

Charan

Former Member
0 Kudos

Hi,

Could u plz tell me that how can i check whether there is problem in webservice .

Thanks,

sudhanhsu

Former Member
0 Kudos

Hi,

You can create the Adaptive Webservice model with no logical destinations and in the model propery you can give the design time url (webservice url).

This is for testing purpose. Using this we can make out whether the problem is with the destination configuration or with the webservice structure.

Regards,

Charan

Former Member
0 Kudos

hi,

http://usai3q43.wdf.sap.corp:50036/sap/bc/srt/wsdl/bndg_4A37AE5EA4693FE0E10000000A421805/wsdl11/alli...

ya i gave this URL and also i check on IE its working fine.

And why we donot need to give clent system and all this..

as we are accessing info frm ABAP backend system i think this info is must.

Thanks

sudhanshu

Former Member
0 Kudos

Hi Sudhanshu,

If you are using Bapi as a webservice try to use this url to get wsdl document

http://<HostName>:<PortNo>/sap/bc/soap/wsdl/?services=<BapiName>&sap-client=<ClientNo>;

Choose View --> Source in your internet explorer

And save the source code as .wsdl file . Use this in your project for creating model.

Give this Url in your modeldata dest which you might have created in Visual Admin.

Best Wishes

Idhaya R

Former Member
0 Kudos

Hi ,

I tried what u mentioned in last thread.

1.create model

2.select "Import adaptive webservice model"

3.select" Local File Syatem or URL"

4.select "No logical destination"

5.url = "http://usai3q43.wdf.sap.corp:50036/sap/bc/srt/wsdl/bndg_4A37AE5EA4693FE0E10000000A421805/wsdl11/allinone/ws_policy/document?sap-client=340"

but when i pressed next it give me error " error in loading the wsdl file"

plz help me on this issue.

Thanks,

sudhanshu

Former Member
0 Kudos

Hi,

Try as below

"http://usai3q43.wdf.sap.corp:50036/sap/bc/srt/wsdl/bndg_4A37AE5EA4693FE0E10000000A421805/wsdl11/allinone/ws_policy/document?sap-client=340&wsdl"

First you try to dnld the wsdl in internet explorer.

If you are able to dnld the WSDL in IE then you can save it on your machine and you can create the model using this wsdl (by choosing the local file option).

Or if possible ask abap team to give the wsdl.

Regards,

Charan

Former Member
0 Kudos

hi Charan,

this URL given by abap team only.

the wsdl is coming in IE correctly,but when i am giving the same URL in creating model its giving

"error in loading the wsdl file" with selecting no logical destination option

Thanks,

Sudhanshu

Edited by: Sudhanshu Agarwal on Jun 18, 2009 10:52 AM

Former Member
0 Kudos

Hi,

Can you try selecting the option Local File Syatem and select the downloaded wsdl file?

And have you tried appending the &wsdl at the end?

Regards,

Charan

Former Member
0 Kudos

Hi

1.Try to check whether webservice is working or not through wsnavigator http://<hostname>:<portno>/wsnavigator

2.Try to save the xml file in desktop and select it when you are creating the model.

Thanks,

Tulasi Palnati

Former Member
0 Kudos

Hi ,

I tried with &wsdl also but i m getting same error.

Thanks,

sudhanshu

Former Member
0 Kudos

Hi Charan,

Now are not giving me any error when i am using the file that is saved locally.So tell what is the problem if i am giving URL not the file that saved locally.

Thanks,

sudhanshu

Edited by: Sudhanshu Agarwal on Jun 18, 2009 11:12 AM

Former Member
0 Kudos

Hi tulasi ,

i tried in webservice navigator,but it giving error

"Cannot download WSDL from http://usai3q43.wdf.sap.corp:50036/sap/bc/srt/wsdl/bndg_4A37AE5EA4693FE0E10000000A421805/wsdl11/alli... WSDL 'portType' can not have child 'wsp:Policy' of namespace 'http://schemas.xmlsoap.org/ws/2004/09/policy' ! "

i think this is same error that i m getting on run time.

Plz help me on this issue

Thanks,

sudhanshu

Former Member
0 Kudos

Hi

1.are you giving all the mandtory input parameters in the Request(wsnavigator).

2.If it is not working on Wsnavigator it was related to abaper issue.

3.In Wsnavigator,Are you able to see the webservice which was given by abaper.

Thanks,

Tulasi

Edited by: Tulasi Palnati on Jun 18, 2009 11:21 AM

Former Member
0 Kudos

Hi tulasi,

1. i run http://localhost:53000/

2.select webservice navigator

3. then they ask to enter "enter wsdl url" so i wnter the the given url.

"http://usai3q43.wdf.sap.corp:50036/sap/bc/srt/wsdl/bndg_4A37AE5EA4693FE0E10000000A421805/wsdl11/allinone/ws_policy/document?sap-client=340

"

4. then tjey ask for username and password then i given that

5 after when i press next it will give the error

" Cannot download WSDL from http://usai3q43.wdf.sap.corp:50036/sap/bc/srt/wsdl/bndg_4A37AE5EA4693FE0E10000000A421805/wsdl11/alli... WSDL 'portType' can not have child 'wsp:Policy' of namespace 'http://schemas.xmlsoap.org/ws/2004/09/policy' ! "

Help required on this issue.

I also mailed to abap guy and waiting for response.

Thanks ,

sudhanshu

Former Member
0 Kudos

Hi,

In the WSDL xml file go to the below location and take the url from this location.

<soap:address location>

And you are telling like with WSDL xml file you are able to successfully create the model right?

Exactly when you are getting this error??

While creating the model ? Or While executing the model?

And go to the blow location in NWDS IDE and check whether proxy is configured properly.

Windows>Preferences>Workbench-->Proxy settings

Regards,

Charan

Former Member
0 Kudos

Hi

Dont enter URL in the inputfield.All Webservices are available below the Input Field.

Select your service and here u will find methods defined for the same .

Select the method required for ur component , test the method .

while testing , u will able to find the input and output parameters .

http://help.sap.com/saphelp_nwce10/helpdata/en/46/7a875063e42d86e10000000a11466f/frameset.htm

How to create a web service and how to consume it in portal step by step blog:

/people/sap.user72/blog/2005/09/15/creating-a-web-service-and-consuming-it-in-web-dynpro

/people/siva.maranani/blog/2005/09/03/invoke-webservices-using-sapxi

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40611dd6-e66e-2910-f383-e80fb44f...

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/d23cbe11-0d01-0010-5287-873...

some more:

/people/purushothaman.vyasarao3/blog/2006/01/02/accessing-an-external-web-services-in-portal

/people/sridhar.k2/blog/2006/09/12/creating-and-exposing-bapi-as-web-service-and-using-it-in-web-dynpro

Thanks

Tulasi Palnati

Former Member
0 Kudos

Hi charan,

what i have to set in proxy setting.

and i m getting design time when i select option no logical destination

and i m getting run tim when i select option "use destination for metadata and execution"

Thanks,

sudhanshu

Former Member
0 Kudos

Hi,

If you have any proxy configured in IE --> Tools --> Internet Options --> Connections --> Lan Settings

you need to configure that proxy here in NWDS.

Regards,

Charan

Former Member
0 Kudos

Hi charan,

proxy server is same in both.

this is soap:address location="http://usai3q43.wdf.sap.corp:50036/sap/bc/srt/xip/sap/ecc_bpbyelementsqr/340/test/test

and this url that i m using for creating model

http://usai3q43.wdf.sap.corp:50036/sap/bc/srt/wsdl/bndg_4A37AE5EA4693FE0E10000000A421805/wsdl11/alli...

now plz suggest me which one i have to use.

Thanks,

sudhanhsu

Former Member
0 Kudos

Hi,

Can you try downloading(save as xml) the WSDL in the browser using the below URL.

http://usai3q43.wdf.sap.corp:50036/sap/bc/srt/xip/sap/ecc_bpbyelementsqr/340/test/test&WSDL

And using the below url you are able to download(save as xml) on your machine right? Adn are you able to create the model using that wsdl file or not?

http://usai3q43.wdf.sap.corp:50036/sap/bc/srt/wsdl/bndg_4A37AE5EA4693FE0E10000000A421805/wsdl11/alli...

Regards,

Charan

Former Member
0 Kudos

Hi Charan

i download the wsdl in my local using

http://usai3q43.wdf.sap.corp:50036/sap/bc/srt/xip/sap/ecc_bpbyelementsqr/340/test/test

not

http://usai3q43.wdf.sap.corp:50036/sap/bc/srt/xip/sap/ecc_bpbyelementsqr/340/test/test&WSDL,here it ask for user name and password .I given but it not working

BUt the xml is totally different from old one and it has very minimal info.

and regarding older wsdl i.e.

http://usai3q43.wdf.sap.corp:50036/sap/bc/srt/wsdl/bndg_4A37AE5EA4693FE0E10000000A421805/wsdl11/alli...

i am able to create model using this but i m getting error on run time that i mentioned in last posts.

Thanks,

sudhanshu

Former Member
0 Kudos

Hi,

Is this WebService generated by XI system? Please check with the backend team who has created this WebService?

Regards,

Charan

Former Member
0 Kudos

Hi tulasi,

how can i find in webservice navigator my webservice.

And if its not there then how can i deploy in my webservice navigator.

Thanks,

sudhanshu

Former Member
0 Kudos

hi

you can save the url as file on the desktop , and then integrate in NWDS,

and use logical destinations , and create them in the visual admin tool ,

or if you dont want to use logical destinations , you can use

webservice with deprecated version .

Former Member
0 Kudos

Hi Murali,

What is the difference if i am using wsdl by saving locally and then integrate in nwds instead of directing giving URL there

Plz help on this topic

Thanks,

sudhanshu

Former Member
0 Kudos

Hi,

I have one question.

Can you please tell us why are you going for WebService? Because your backend is R/3 right?

You can directly consume the RFC(BAPI) using adaptive RFC model.

There are many problems with webservices.

Regards,

Charan

Former Member
0 Kudos

Hi Murali ,

i m getting same problem while saving wsdl locally and then integrated in nwds as i was getting previously.

Thanks,

sudhanshu

Former Member
0 Kudos

Hi Charan,

As several option available in nwds so i m just trying to use each option so that if there is req in future to consume webservice so that i can use my knowledge that time.As i am also interested in learning new things.

Thanks,

sudhanshu

Edited by: Sudhanshu Agarwal on Jun 18, 2009 4:44 PM

Former Member
0 Kudos

Hi,

Good I agree with you.

I guess there is some problem with the WebService format. Just ask your abaper to give another simple webservice for learning purpose.

Or you can use this free webservice: http://www.webservicex.net/ValidateEmail.asmx?wsdl

for learning purpose. At least you will get some idea.

Regards,

Charan

Former Member
0 Kudos

hi Charan,

what setting needed to use this fre webservice.ie.e setting in visual admin and what option we choose

to imort in nwds.

one thing how can i see this in our webservice navigator.

Thanks

sudhanshu

Former Member
0 Kudos

Hi

Try to learn the links mentioned above...

Thanks

Tulasi Palnati

Former Member
0 Kudos

Hi charan,

which link u r talking..

thanks,

sudhanshu

Former Member
0 Kudos

Hi

Check out this link

Thanks

Tulasi Palnati

Former Member
0 Kudos

Hi,

You need to create the Adaptive Webservice Model.

After that you need to create the destination for this WebService in the below location of Visual Admin.

services>WebServiceSecurity>Dynamic WebService Proxies-->Click on Create button.

And you need to give this destination in the properties of Webservice Model.

See the below document for destinations configuration:

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/b2bc0932-0d01-0010-6d8e-cff...

This destination is to handle the url, credentials (uname, pwd) dynamically.

See the complete tutorial "Accessing an Email Web Service using the Adaptive Web Service Model" in the below link.

[original link is broken]

If you are using CE 7.1 go through the below document.

https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/50d70a19-45a3-2b10-bba0-807d819d...

Regards,

Charan