Set request parameters for web services

My .net application is to consume a Java web services exposed using
AXIS.
The web service will extract the user name and password to perform some
custom authentication.
	/** Java **/
	userId = hReq.getParameter("wsUserName");
	password = hReq.getParameter("wsPassword");

So my ASP.net application will need to set the user id and password to
be passed as a HTTP request parameters
upon calling the java web service.

I have added a web refernce to this web service inside my .net
application.
But i can't seems to find any methods or parameters to set the request
parameters.

I have search the web for issues similar to this but don't seems to get
any related help.
Does someone encounter this before???? Any help will be greatly
appreciated.

Thanks.



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
0
anon1 (58)
5/7/2004 1:43:31 AM
dotnet.xml 7266 articles. 0 followers. Follow

1 Replies
442 Views

Similar Articles

[PageSpeed] 58

I am not familiar with java web services. But what do you mean by
parameters?

Usually web service consist of using HTTP post method by setting SOAPAction
http header with a value of web service method url. The post contents would
be SoapEnvelope xml.

If you are saying that the wsUserName and wsPassword need to be http header
name and value pairs, then you are out side of SoapEnvelope. The Add Web
Reference feature does not help you. However you can manually edit the proxy
code that was generated with add web reference feature as shown below:

1) In the solution explorer, click on Show All Files.
2) Expand the Web References node all the way until you see Reference.cs
file (assuming you are writing C# code).
3) You should see a class (say TestService, whatever your webservice name
is) that derives from SoapHttpClientProtocol.
4) In the constructor, add following code, below the existing Url setting
code:

Uri uri = new Uri(this.Url);
System.Net.WebRequest req =this.GetWebRequest(uri);

req.Headers["wsUserName"] = "myuser";

req.Headers["wsPassword"] = "mypassword";

5) You can even modify the constructor signature to accept user name and
password and use those values to set headers.

If the above does not work for you, then you may need to use Web Service
Enahancements from micrsoft. You can search the MSDN for it.

Hope this helps.
Raghu/..
"wawa_piggy" <anon@anon.com> wrote in message
news:elCp0S9MEHA.3972@TK2MSFTNGP10.phx.gbl...

>
> My .net application is to consume a Java web services exposed using
> AXIS.
> The web service will extract the user name and password to perform some
> custom authentication.
> /** Java **/
> userId = hReq.getParameter("wsUserName");
> password = hReq.getParameter("wsPassword");
>
> So my ASP.net application will need to set the user id and password to
> be passed as a HTTP request parameters
> upon calling the java web service.
>
> I have added a web refernce to this web service inside my .net
> application.
> But i can't seems to find any methods or parameters to set the request
> parameters.
>
> I have search the web for issues similar to this but don't seems to get
> any related help.
> Does someone encounter this before???? Any help will be greatly
> appreciated.
>
> Thanks.
>
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!


0
Raghu9367 (9)
5/10/2004 9:57:57 PM
Reply:

Similar Artilces:

Replacing values based on a set list
Hi Could anyone help me with this one: - I have an Excel workbook with two worksheets: sheet1 and sheet2. On sheet1, I have 2 columns of data:- Column 1 - CityID Column2 - CityName On sheet2, I have a list of 500 office locations, some of which are in the same city. Sheet2 has several columns, one of which is the city location of the office. I am trying to prepare the Excel sheet ready to import into Access and want to replace each instance of the city location listed on sheet2 with the CityID number from sheet1 where the city is matched. For example: - Sheet 1 CityID CityName 1...

How do I point "Save My Settings" to a file, not the web?
I've run the Save My Settings wizard, but it seems to want me to save my settings online only, and I'm not given the chance to save them to a file on my backup drive, which is where I want it. How do I do this? This feature has changed in recent versions of Outlook. Read this article: http://support.microsoft.com/default.aspx?kbid=816040 >-----Original Message----- >I've run the Save My Settings wizard, but it seems to want me to save my >settings online only, and I'm not given the chance to save them to a file on >my backup drive, which is where I want i...

owa "service no longer available"
OWA inbox: "service no longer available". I get this message when trying to connect to OWA, yet it happens only on some clients, not all. Any thoughts? Exchange Server 2003 Thanks. -- DWB Tech. Director ...

Bizarre XSD File Format Changes with Web Developer?
I have a bizarre problem when I try to validate XML documents and their schemas once they have been opened and transfered to a Visual Web Developer 2005 Express project. I receive validation errors for XML/XSDs that worked fine when first created in another environment (XMLSpy trial). I have a source XML document and an XSD file created wtih XMLSpy and stored in a separate folder. When I run a very simple VBScript to validate the XML with the XSD (in the process of a bulkload to SQL Server with SQLXMLBulkload.4.0), there are no validation errors, and the load to the DB works perfectly....

how do i up load from my pictures to advertising web site
how do i up load from my pictures to an advertising web site On Wed, 25 Nov 2009 15:58:01 -0800, pictures <pictures@discussions.microsoft.com> wrote: >how do i up load from my pictures to an advertising web site Ask the administrator of the website. The technique will differ from site to site. In any case, this question does not appear to have anything to do with Visual Basic for Applications modules in Microsoft Access, which is the subject of this forum. -- John W. Vinson [MVP] ...

Create link in publisher to folder stored on same web site
I created my web page in Publisher and succesfully published it. I draged and dropped a folder on my ftp site. I tried, without success, to place a hyperlink from my web page to open the folder. Please advise if it is possible to create the link and of so how it can be done. Thanks. Bob. On your webpage use a name or image, i.e., The cars folder is available here. Using the mouse highlite the word here and select Insert, Hyperlink. The hyperlink would read /cars Note the cars folder and the link to it are case sensitive. That's it. don Vancouver, USA "Bob W" <Bo...

set rowheight property
I need the syntax to set the active rowheight to 3 With Worksheets("Sheet1").Rows(1) .RowHeight = .3 End With "Ron5440" <Ron5440@discussions.microsoft.com> wrote in message news:959D6ED5-9CF2-49EB-A9E6-1C3FE4143823@microsoft.com... >I need the syntax to set the active rowheight to 3 If you mean you want to set the RowHeight for the row that the ActiveCell is in... ActiveCell.EntireRow.RowHeight = 3 -- Rick (MVP - Excel) "Ron5440" <Ron5440@discussions.microsoft.com> wrote in message news:959D6ED5-9CF2-49EB-A9...

Limit web crawlers impact on IIS site
Hi Is it possible and how to limit web crawlers (Google) impact to web site running on IIS 6/7 ? Dealing with Google's webmaster tools - site config - custom crawl rate doesn't give us less impacts, so I'm wondering if there is any way to limit bandwidth available to all crawlers (identified by bot in User-Agent header) using bandwidth limiting on IIS. I know that it is possible on Apache, but cannot find this how to set on MS IIS. Any help or ideas would be appriciated. Regards, Miha Use robots.txt for this. Either just ban the search crawlers that don'...

Why can't I format background for web page?
when I try to format a background for a web page it isn't working. Help! 1) How are you trying to format a background? 2) Define "isn't working". 3) Version of FrontPage. Not enough info. -- Tom [Pepper] Willett Microsoft MVP - FrontPage Since 1997 --------------------------- "village rose" <village rose@discussions.microsoft.com> wrote in message news:020E1997-4A88-4012-9960-C79CCED3B16F@microsoft.com... : when I try to format a background for a web page it isn't working. Help! ...

Complimentary migration kit for MS Office 2010 web apps
Hi everyone, If you=92ve been following the news on the new launch of Microsoft Office 2010, you may have noticed something missing. The new Office Web Apps that are causing quite a Google v. Microsoft stir are not MS Access-friendly. Read more about it in the latest blog post from Caspio, =93Access 2010 Snubs Web Developers =85 Now What?=94 at http://blog.caspio.com/commentary/ms-access-2010-snubs-web-developers/ and please share your comments. An excerpt of the post is included below. And while you=92re there, you should check out our complimentary Access Migration Kit (http://...

Sound "times out" on web cam after 5 minutes or so...
I have decent picture and sound quality on webcam but after about 5 minutes it seems to "time out" and the sound goes away. The person I'm talking to can still hear me but I can't hear them. I restart the video call and it works again... for about 5 minutes. Has anyone else had this problem or does anyone know how to fix it? It only started the last 2 times I have spoken with my dad on webcam. I have Windows Vista and the newest 2009 version of messenger. Please help! -- Thanks~ Ali Greetings Ali, Just out of curiosity, if you just do an audio call...

Setting custom header widths
When creating a custom header, is there any way to set the width of the custom header to other than the default width? Specifically, I would like to make it wider, and not 'let' it wrap to the next line. Thanks...Pam Hi use the center header box to use the complete paper width. There's no setting to change this width (AFAIK) -- Regards Frank Kabel Frankfurt, Germany setter-lover wrote: > When creating a custom header, is there any way to set the > width of the custom header to other than the default > width? Specifically, I would like to make it wider, and > not...

Cannot create C# proxy for Axis SOAP service?
I've goggled a few posts about this but haven't found a definitive answer. I have an Apache Axis SOAP web service that I ned to write a C# client for. When I point VS.Net Studio 2003 at my Axis WSDL, I get the following error message from VS.net: - Report from 'WSDL Document' is 'There is an error in XML document (46, 16).'. - Namespace prefix 'impl:urn' is not defined. - Report from 'DISCO Document' is 'Discovery document at the URL http://10.3.158.101:8080/DDServer/services/urn:DDSoapService?wsdl could not be found.'. - The document fo...

"Link to web Page" parameters?
Hi I would like to create a new report that show a custom build report (an ..aspx page). But I can't figure out how to pass parameters til the report. I've created a report inside CRM of type "Link to web page" and have typed in "http://microsoft.com" in the location. When I run the report from the report list everything looks fine, but when I run the report from eg. an account it fails big time. How do I pass the parameters? I've tried things like "http://microsoft.com?id={0}" with no success... -- Best regards Casper Jensen CRM Extens...

what should be my pop3 and SMTP when setting up new account
what should be my pop3 and SMTP when setting up new account Ask your ISP. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. All unsolicited mail sent to my personal account will be deleted without reading. After furious head scratching, Rogan asked: | what should be my pop3 and SMTP when setting up new account On Sat, 24 Sep 2005 21:44:09 -0700, "Rogan" <Rogan@discussions.microsoft.com> wrote: >what should be my pop3 and SMTP when setting up new account We have no way of knowing what that info is for your account....

Windows Service
Hi all, I have SQL Server Agent and under it I've some jobs that runs with a definde schedule (they can run at the same time). SQL Server Agente doesn't belongs to SQL Server Express edition, so I'm lookig for a way to build a such schema with a .net windows service. Let's say I need 10 jobs: 1) it is better to have 10 windows services? 2) it is better to have 1 windows services with 10 threads? in the first case, I need to have 10 different project that installs 10 different services with 10 different name (it is correct?) in the secound case, how can I tell...

Using Windows Service and CRM
Happy Holidays, All! This isn't covered in the SDK, that I can see, but we have a service running that needs to query the CRM database (using the SDK) - but it is running on an application server out side of CRM. We can do this with impersonation, using an existing user in CRM - but the password needs to be hardcoded that way - making it necessary to revisit the applicatin every 90 days... Any other thoughts on how to run a windows service against CRM? Thanks! Kristina Kristina, Ideally (and technically, legally), the service sould have it's own ID. What we've done though i...

Set Association
When I receive an e-mail with an attachment I get the message 'Set Association' in the control panel. I have searched and cannot find this. Is it maybe because I have Vista and the attachment is in Word? -- Kind regards Anna and Peter La Passiflore B&B 0033 475 931276 This newsgroup is for discussions about Microsoft Access, a relational database program. It sounds as if this question is related either to Vista or to your e-mail program. In any case another newsgroup would be a better source of information. By the way, when posting to any public newsgroup it is best to...

Publishing to Web
We have just upgraded from Publisher 2000 to 2003. Now when we publish to the web each of the images creates their own page with a link back to their original location; and the file which has 38 pages when open in the computer has over 600 pages when viewed from the internet. What has happened? How can we fix this? ...

Special Combo box
Access 2007, programming in 2003 mode. I have a table "tbl_tasks" which is the main table of my application. Several of its fields are lookups into other tables such as tbl_persons and tbl_urgencies. On one or more of my forms, I want to be able to filter list boxes via queries tied into the combo boxes. As an example, tbl_urgences consists of urgencyID urgencyText 1 High 2 Standard 3 Low I want to enable the user to filter what shows up in list boxes based on a combo box which would take its values from tables like t...

Phone Call Parameter
Hi I have one simple Question. Is it possibel to genrate Links that fill my Phone Call Form. For example something like this http://crm/activities/phone/edit.aspx?Subject="Test"&PhoneNumber="123456789" My Problem ist I need Form that contains certain Information, but the user not always create this activities. So my Application has to check if, the user change something. When he change nothing i had to remove the activity, else i think i get a huge amount of activities that nobody need. Thank you for help ...

Installation on Terminal Services
Hi, Can the Outlook plugin be installed on a Win2K box running Terminal Services. I run Outlook out of this box and the CRM won't let me install the plugin for all users. Any ideas? The install on terminal services only works for the first user that it was installed under. the only way to use crm under terminal services is useing the web client "Michelm" <mmartineau44@hotmail.com> wrote in message news:ONg4uFLfDHA.164@tk2msftngp13.phx.gbl... > Hi, > > Can the Outlook plugin be installed on a Win2K box running Terminal > Services. I run Outlook out of th...

Reg hiding such parameters in the properties of the mail #2
hi , I am using the outlook 2003 client for sending the email. when it reaches the destination end, the destined user is easily identifying the parameters like, from where the mail is coming like, public ip, machine name, and local ip address of the system which the mail is originated.. so i do not want to publisize such parameters to the outside world.. so how would i adjust the oulook such a way it should not take such parameters while sending the emails. i shal be thankfull if u help me on this! thanks in advance rizwan <rizwan_mk@hotmail.com> wrote in message news:#8ikqBqv...

Using RW scripts and Parameters
How do I go about passing an input parameter in a RW script? Much appreciated! Theo :) RW functions are accessed as user defined functions from calculated fields in the report writer layout mode. Information about RW functions can be accessed from the SDK on CD2 of the install CDs. The Report Writer (RW) Programmer's Interface is available under Procedures and Functions for the RW functions I got added to V7.0. All other RW function parameters can be obtained from the Parameter lists under the Parameters node of the SDK tree. David Musgrave [MSFT] Senior Development Consultant MB...

Requesting data from frontend exchange server
I have 1 front-end server in the DMZ for OWA and 1 back-end server with all mailboxes. When some internal ol2k2 users are creating or updating a meeting and Outlook is checking the free/busy information, they get the "Requesting data..." message. This message references the Netbios name of the front-end server which will fail due to firewall settings. I don't want the Outlook client to use this front-end server, how do I direct it to use only the back-end server? ...