473,386 Members | 1,673 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

calling axis webserivce with credentials in header

Hi,

I'm trying to access a webservice on an axis server from my .net client
(c#). First I have to call a login service that returns a session ID. This
session id should then be added to the header of the actual webserivce call
together with a userid and version number. The header should look like this:

<soapenv:Header>
<ns1:UserID soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next"
soapenv:mustUnderstand="0" xsi:type="soapenc:string" xmlns:ns1="AuthHeader"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">user1</ns1:UserID>
<ns2:SessionID soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next"
soapenv:mustUnderstand="0" xsi:type="soapenc:string" xmlns:ns2="AuthHeader"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">5656640673802095969</ns2:SessionID>
<ns3:Version soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next"
soapenv:mustUnderstand="0" xsi:type="soapenc:string" xmlns:ns3="AuthHeader"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">9.1</ns3:Version>
</soapenv:Header>

The problem is that the wsdl doesn't have any information about the header.
So the proxy generated by the wsdl tool has no way of including these
elements in the header. I've tried to create a class that overrides soap
header and added these values. The result looks like this:

<soap:Header><types:AuthHeader id="h_id1"><UserId
xsi:type="xsd:string">user1</UserId><SessionId
xsi:type="xsd:long">5656640673802095969</SessionId><Version
xsi:type="xsd:string">9.1</Version></types:AuthHeader ></soap:Header>

I have googled a bit and can see that there are some interop. issues with
..net and axis but haven't found a solution to this yet. I've also tried to
modify the wsdl to include the header but with litle success. Does anyone
know how to solve this ? I realy don't want to create the soap message with
a string builder...
Jan 3 '08 #1
0 1561

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Daniel Albisser | last post by:
Hi @ll, We need further information about the sender of the soap-request in the http header that is used for the loadbalancing. In our case we need the mobile-number of the user that is unique....
0
by: CS | last post by:
Hi I need to connect to an AXIS server using SSL. I've registered their certificate in trusted roots, added the web reference and tried both this: Dim oService As New <webservice>...
1
by: Lakshmi | last post by:
Hi All, I am having performance issues with the .NET client calling the Java Webservice running on axis. Have detailed the problem below. Please help. I wrote a webservice in Java. Lets name...
4
by: leslie_tighe | last post by:
Hello, I have a webservice running on a J2EE server created with Axis 1.2.. I have a client that I am building in .net that needs to consume this webserivce and am having a bit of trouble. I have...
5
by: Nate | last post by:
We are attempting to make a request to a web service (we will refer to it as XXXServices) hosted on a Web Logic server from a C# SOAP client. The server responds with a 401 Unauthorized error...
4
by: Lucvdv | last post by:
I have to connect to a server set up by the government, where they used Apache Axis to create a webservice. The code I use to interface to the webservice is generated by wsdl.exe, based on a...
5
by: vthakur | last post by:
Hello: I have a Axis Web Service that sets the sessionid in the SOAP header for persisting the session. The client is a .Net client that processes the header as an Unknown Header. It sets the...
1
by: Raymond | last post by:
Hi All, Can any one point me how I can use classic ASP to connect to a dot net SOAP webserice? The other company has set up dot net webserivce with web address like this: ...
1
by: ashishr | last post by:
The web service call I am making from my WS client produces error because of actor in the axis header element. I create the header in my code but, removing the actor using removeActor() produces a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.