cancel
Showing results for 
Search instead for 
Did you mean: 

How to add "sap.com/tc~kmc~bc.uwl~api " reference to a web service in NWDS.

Former Member
0 Kudos

Hi ,

I have a web service created in NWDS for "UWL item count & display". I have the below code in it for

// retrieve UWL service

IUWLService uwlService = (IUWLService) ctx.lookup("/broker/services/" + IUWLService.ALIAS_KEY);

When code was checked line by line , I find the error happening due to the above line of code. And the error is as follows :

An error has occurred. Maybe the request is not accepted by the server:

com/sap/netweaver/bc/uwl/IUWLService

What is this error due to ?

If it is due to the reference "sap.com/tckmcbc.uwl~api " not being added , then where do I add this reference in web service perspective. ?

Suggestions invited.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

If you are working on web dynpro application then you can simply add reference of your API by right clicking on your project and select properties. Now select web-dynpro references -> library references....

and add "sap.com/tckmcbc.uwl~api" there.

Former Member
0 Kudos

Yup..

Would have been little easier if I had used a web dynpro component for my UWL item count functionality. But as per my requirements, I have developed a web service. I am doing it using a java class that has the code for the same functionality.

So, I am not knowing how to give that reference.

Now that I dont have a WSDL file , how do i follow your steps for creation of web services DC and deployable DC as mentioned in the below article.

Suggestions very much helpul and invited at this point in time for me.

Former Member
0 Kudos

Hi Saurabh,

In your article, please let me know what is that

1. UsingWebComp_WA

2.UsingWebComp_EA

mentioned in your article

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0cf9e42-ccb0-2c10-d0a4-f5aa8a79e...

Guide me creating them as I dont know how those were created.

Regards,

Vidya S

Former Member
0 Kudos

In order to cerate a web application in NWDS you need to have 2 components.

One will be your web application that you can create by New DC - Selct J2EE -> Web Module.

This application will contain call to proxy and all the related coding....

Now to deploy this application on server you need to create another application New DC -> Select J2EE - Enterprise Application.

This will ask you the referenced application there you will select web mpdule which you created earlier.

In my article

1. UsingWebComp_WA - is the web module DC

2.UsingWebComp_EA - is the Enterprise application DC

In you case you were earlier using Java class. Did you checked on net on how to reference a library from java class ??

Because this will be a completely different approach for you and you will have to start from scratch.

Former Member
0 Kudos

Hi Saurabh,

Yes, I have a Java class & was tryign to refer this "sap.com/tckmcbc.uwl~api " to my Java Class.. Nevertheless, tried by your approach also from the scratch. But am stuck at the last where you had given some java code snippet. Where is this to be added ? what changes are to be done.

Java Code to Call Proxy InitialContext ctx = new InitialContext(); ClassAService obj = (ClassAService)ctx.lookup("java:comp/env/proxyName"); ClassA port = (ClassA)obj.getLogicalPort("ClassBPort", ClassA.class); ClassC_Res result = port.classA(input);

In above code snippet:

ClassA : You will find name of this class in your proxy -> SEIs

ClassAService : You will find name of this class in your proxy -> SEIs

ClassBPort : You will find name of this class in your proxy -> Logical Ports

ClassC_Res : You will find name of this class in your proxy -> Proxy Classes

Could you please elaborate it !!

Former Member
0 Kudos

Hi All,

The IUWL service problem is solved by the addition of the refernce "sap.com/tckmcbc.uwl~api " . This refernce is contained in a UWLJWF.SCA component. This was downloaded from the sap service market place to the local system. Then a DC of type external library was created. Then, this SCA was copied into the library folder of that DC, built as per the below link.

http://help.sap.com/saphelp_nw70/helpdata/en/5a/2e2f4234135433e10000000a155106/content.htm

Now thid DC could be used as a project refernce to any other project where you need "sap.com/tckmcbc.uwl~api " refernce. This solved my problem.

Answers (2)

Answers (2)

Former Member
0 Kudos

Creating a External Library type DC with the Jars or .SCA files in its library folder as specified in the link http://help.sap.com/saphelp_nw70/helpdata/en/5a/2e2f4234135433e10000000a155106/content.htm

Then give this DC as the project reference in any project where this refernce is needed.

Former Member
0 Kudos

it seems that you are using some external api in your application.

For that you need to add a reference of it as well.

you can refer below article for this.

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/60d99678-1a29-2d10-94b4-9d9a67b71...

Former Member
0 Kudos

Hi Saurabh,

I had a look into the article that you had suggested.

Based on that I would like to proceed. But as I am a new developer of Web services & web dynpro in NWDS , I have no idea as to what a deployment component is (ENterprise Application Development Component).

Please advise as to how to create deployment component , once I have my web development component ready.

Regards,

Vidya S

Former Member
0 Kudos

Saurabh,

Hi Again !

From one another article as pointed below, created by you, there are steps to create a web development component.

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0cf9e42-ccb0-2c10-d0a4-f5aa8a79e...

In my case, I only have a java class having the code for the functionality needed ( UWL item count ) , but not the wsdl file neither do i know the proxy related details. How do I proceed. Please let me know now how I should create a development component for a web service with this .