cancel
Showing results for 
Search instead for 
Did you mean: 

Sending logon ticket to web service

Former Member
0 Kudos

Hi, I wanted to send SAP login ticket(cookie) to my web service. I would like to add this cookie as part of the SOAP header. How can we get the handle of SOAP header so that i can add the info in the header? Pls help.Iam using web dynpro as my web service client.

Regards,

Sujesh

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi sujesh,

You do not need to pass manually this cookie to web service.

Do one thing.

1. Create one HTTP destination in Visual administrator under <b>"Destinations"</b> service.

Here, specify your web service endpoint as given in model's logical port and logon type as SAP logon ticket.

Now, at the time of executing web service model, specify this destination name.

Write following code before executing model.

wdcontext.crrent<node>element().modelobject()._destinationname("<destination name>");

Regards,

Bhavik

Former Member
0 Kudos

Thanks Bhavik.

but should i create destination for HTTP or web service???

i see http and web service in destination tab.

Also i am not able to see a method _destination in model object

instead i can see a method _setEndPoint.

wdContext.currentRequest_AcctBalServicePortType_acctBalRequestElement().modelObject()._setEndPoint("PORTALDEMO");

this throws exception:java.net.malformed url exception, no protocol:PORTALDEMO

Pls help

Former Member
0 Kudos

Hi Sujesh,

You need to use HTTP destination.

And sorry for my mistake. method name is, _setHTTPDestinationName()

Give your destination name inside this method.

Regards,

Bhavik

Former Member
0 Kudos

Thanks again Bhavik,

unfortunately iam not able to see this method either. All i can see is setEndpoint,setUser,_setPassword...

WHere am i going wrong?????

Former Member
0 Kudos

Hi Sujesh,

what is your NWDS version?

It should show for methods, setEndpoint,setUser,_setPassword and __setHTTPDestinationName.

Regards,

Bhavik

Former Member
0 Kudos

Thanks again :):)

my NWDS version is 2.0.9...

is that ok????

Former Member
0 Kudos

Hi Sujesh,

Yes, i guess this is the problem.

It is included in NWDS SP10 or higher versions.

That why you can't see this method.

So, if your WAS version is SP10 or higher then only upgrade your NWDS to SP10 or higher accordingly.

Otherwise, upgrade both WAS and NWDS to SP10 or higher versions.

Regards,

Bhavik

Former Member
0 Kudos

Oh!...

Iam using SP9. Is it possible to install NWDS of sp10 and using WAS of SP9??

Former Member
0 Kudos

Hi Sujesh,

Sorry, you cannot use a newer version of NWDS with an older WAS version. But the reverse is possible.

Best Regards,

Nibu.

Former Member
0 Kudos

Hi sujesh,

You have to install both NWDS and WAS SP10. If you have NWDS with lower version than WAS then it is possible.

NWDS version should be equal or lower than WAS server.

Regards,

Bhavik

Former Member
0 Kudos

Yes. it throws error when i use NWDS 10 with WAS SP10.

I will have to upgrade WAS to SP10. Now i need to recreate the model rt?? is there any way to update the model so that the method(setHttpDestination) is accessible. is there any way to reuse existing codes???

will EP6 work on SP10??

Former Member
0 Kudos

Hi Sujesh,

You can use same project in newer version also. You just need to deploy your web servcie in this newer WAS server. You have to delete your web servcie model and recreate this model once again. No, need to change anything in coding.

Regards,

Bhavik

P.S.: Reward points for helpful answers.

Former Member
0 Kudos

Bhavik, sorry thought of giving points in one short...i'll do that surely

my web service is not running on WAS. Its running on tomcat.only my web dynpro application(web service client) would br running on WAS. my requirement is to pass a cookiee string to my web service as part of SOAP header. Are we on the same plane??

Should i install portal on top of WAS to deploy the web dynpro????

Former Member
0 Kudos

Hi Sujesh,

Ohhh i didn't know that your web service is running on Tomcat server.

I knew about WAS server. But, i am not sure with Tomcat whether it accepts SAP logon ticket or not.

I didnt get any code to add cookie in SOAP header from webdynpro but if you want code for .NET client then i will give it to you.

Regards,

Bhavik

Former Member
0 Kudos

Thanks Bhavik for the continuous support

Well can u tell me what does this httpdestination do? does it add logon ticket to SOAP header? or how is the logon ticket sent?

if its sent as a part of header , i can parse soap header and get the ticket and validate it.Pls let me know

Former Member
0 Kudos

Hi Sujesh,

When you call your web service from webdynpro application, all processing will be done on Server side. And your ticket is recided on browser. So, to pick up this ticket from browser this HTTP destinations is needed. IT will fetch ticket from browser and add ticket in webserver SOAP header.

Regards,

Bhavik

Former Member
0 Kudos

Hi all,

I have got a similar problem as mentioned above.

I have already created a http-destination in visual admin, but I can't find the _setHttpDestination-method according to the modelObject.

I am using NW04 SP17.

Does anybody know how to solve this problem?

Thank you in advance.

Kind regards, Patrick.