Objectmix
Tags Register Mark Forums Read

How to compensate for missing header information in WSDL? : DOTNET

This is a discussion on How to compensate for missing header information in WSDL? within the DOTNET forums in Framework and Interface Programming category; The application that I want to use requires the header to contain a username/password. Example: <soap:Header> <wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/04/secext"> <wsse:UsernameToken> <wsse:Username>fluffy</wsse:Username> <wsse:Password Type="wsse:PasswordText">bunny</wsse:Password> </wsse:UsernameToken> </wsse:Security> </soap:Header> The problem is that the WSDL of the webservice does not contain any information reagarding this header information (shouldn't it?). So when I add a web reference in my client application there is no class reference to allow me to set the Username and Password for the header. What (and how) do I need to modify for the class reference to appear? Reference.cs? The WSDL itself then reimport? I can get it to work by ...


Object Mix > Framework and Interface Programming > DOTNET > How to compensate for missing header information in WSDL?

DOTNET Discussion forums related to Microsoft Dot net technologies, CSharp and other related items

Reply

 

LinkBack Thread Tools
  #1  
Old 09-26-2006, 10:51 AM
Junior Member
 
Join Date: Nov 2009
Posts: 0
Application Development is on a distinguished road
Default How to compensate for missing header information in WSDL?

The application that I want to use requires the header to contain a
username/password.

Example:

<soap:Header>
<wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/04/secext">
<wsse:UsernameToken>
<wsse:Username>fluffy</wsse:Username>
<wsse:Password Type="wsse:PasswordText">bunny</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soap:Header>

The problem is that the WSDL of the webservice does not contain any
information reagarding this header information (shouldn't it?).

So when I add a web reference in my client application there is no class
reference to allow me to set the Username and Password for the header.

What (and how) do I need to modify for the class reference to appear?
Reference.cs? The WSDL itself then reimport? I can get it to work by
building the XML then just HTTP Post it to the URL, but I would rather let
the program do it for me.

thanks,

lee



  #2  
Old 09-26-2006, 03:14 PM
Junior Member
 
Join Date: Nov 2009
Posts: 0
Application Development is on a distinguished road
Default Re: How to compensate for missing header information in WSDL?

What webservices system are you using? ASMX? WSE? WCF?

You need WSE or WCF to do that... ASMX doesn't really support anything
but the most basic of webservices. They don't account for any of the
stronger specs.

Lee Franke wrote:
> The application that I want to use requires the header to contain a
> username/password.
>
> Example:
>
> <soap:Header>
> <wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/04/secext">
> <wsse:UsernameToken>
> <wsse:Username>fluffy</wsse:Username>
> <wsse:Password Type="wsse:PasswordText">bunny</wsse:Password>
> </wsse:UsernameToken>
> </wsse:Security>
> </soap:Header>
>
> The problem is that the WSDL of the webservice does not contain any
> information reagarding this header information (shouldn't it?).
>
> So when I add a web reference in my client application there is no class
> reference to allow me to set the Username and Password for the header.
>
> What (and how) do I need to modify for the class reference to appear?
> Reference.cs? The WSDL itself then reimport? I can get it to work by
> building the XML then just HTTP Post it to the URL, but I would rather let
> the program do it for me.
>
> thanks,
>
> lee


  #3  
Old 09-26-2006, 03:27 PM
Junior Member
 
Join Date: Nov 2009
Posts: 0
Application Development is on a distinguished road
Default Re: How to compensate for missing header information in WSDL?

I am using a asmx page (framework 1.1).

I would think that as long as it is defined in the WSDL that the classes
would be generated.

Is that not correct?

Also what is WSE and WCF? DotNet technologies.

(bit of a newbie to the webservices).

thanks,
lee
"q" <agapeton> wrote in message
news:1159301627.817272.242400@h48g2000cwc.googlegroups.com...
> What webservices system are you using? ASMX? WSE? WCF?
>
> You need WSE or WCF to do that... ASMX doesn't really support anything
> but the most basic of webservices. They don't account for any of the
> stronger specs.
>
> Lee Franke wrote:
>> The application that I want to use requires the header to contain a
>> username/password.
>>
>> Example:
>>
>> <soap:Header>
>> <wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/04/secext">
>> <wsse:UsernameToken>
>> <wsse:Username>fluffy</wsse:Username>
>> <wsse:Password Type="wsse:PasswordText">bunny</wsse:Password>
>> </wsse:UsernameToken>
>> </wsse:Security>
>> </soap:Header>
>>
>> The problem is that the WSDL of the webservice does not contain any
>> information reagarding this header information (shouldn't it?).
>>
>> So when I add a web reference in my client application there is no class
>> reference to allow me to set the Username and Password for the header.
>>
>> What (and how) do I need to modify for the class reference to appear?
>> Reference.cs? The WSDL itself then reimport? I can get it to work by
>> building the XML then just HTTP Post it to the URL, but I would rather
>> let
>> the program do it for me.
>>
>> thanks,
>>
>> lee

>



  #4  
Old 09-26-2006, 11:03 PM
Junior Member
 
Join Date: Nov 2009
Posts: 0
Application Development is on a distinguished road
Default Re: How to compensate for missing header information in WSDL?

Web service security follows the WS-Security specification... ASMX has
no idea what that is. You need to get WSE3 from Microsoft. Google for
"wse3 dowload". Then read forever until you are sick of reading. WSE3
isn't that intuitive... fortunately WCF (a part of .NET 3.0) is almost
out.

Also, you need .NET 2.0. You will never get this working in .NET 1.1.
Almost nothing advanced will work in .NET 1.1. I hated that thing...

Lee Franke wrote:
> I am using a asmx page (framework 1.1).
>
> I would think that as long as it is defined in the WSDL that the classes
> would be generated.
>
> Is that not correct?
>
> Also what is WSE and WCF? DotNet technologies.
>
> (bit of a newbie to the webservices).
>
> thanks,
> lee
> "q" <agapeton> wrote in message
> news:1159301627.817272.242400@h48g2000cwc.googlegroups.com...
> > What webservices system are you using? ASMX? WSE? WCF?
> >
> > You need WSE or WCF to do that... ASMX doesn't really support anything
> > but the most basic of webservices. They don't account for any of the
> > stronger specs.
> >
> > Lee Franke wrote:
> >> The application that I want to use requires the header to contain a
> >> username/password.
> >>
> >> Example:
> >>
> >> <soap:Header>
> >> <wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/04/secext">
> >> <wsse:UsernameToken>
> >> <wsse:Username>fluffy</wsse:Username>
> >> <wsse:Password Type="wsse:PasswordText">bunny</wsse:Password>
> >> </wsse:UsernameToken>
> >> </wsse:Security>
> >> </soap:Header>
> >>
> >> The problem is that the WSDL of the webservice does not contain any
> >> information reagarding this header information (shouldn't it?).
> >>
> >> So when I add a web reference in my client application there is no class
> >> reference to allow me to set the Username and Password for the header.
> >>
> >> What (and how) do I need to modify for the class reference to appear?
> >> Reference.cs? The WSDL itself then reimport? I can get it to work by
> >> building the XML then just HTTP Post it to the URL, but I would rather
> >> let
> >> the program do it for me.
> >>
> >> thanks,
> >>
> >> lee

> >


  #5  
Old 09-26-2006, 11:06 PM
Junior Member
 
Join Date: Nov 2009
Posts: 0
Application Development is on a distinguished road
Default Re: How to compensate for missing header information in WSDL?

Come to think of it... you could do what I do at times. Half the time
people are giving me these LAME "wsdl" files for "web services" that
are NOT wsdl files that do NOT go with web services. They are only
"services" because they do NOT follow the specifications... so I ended
up writing my own webservice framework to deal with stuff like this...
at the heart of it was simple HTTP calls. You can do that too. If you
don't need https communication this is fairly easy. Web services are
really nothing more than XML going back and forth, you can do it all
manually if you want. It's not really that difficult.

That said... you really need to get on .NET 2.0 with WSE3 or get .NET
3.0. Using .NET 1.1 now adays just won't cut it...

Lee Franke wrote:
> I am using a asmx page (framework 1.1).
>
> I would think that as long as it is defined in the WSDL that the classes
> would be generated.
>
> Is that not correct?
>
> Also what is WSE and WCF? DotNet technologies.
>
> (bit of a newbie to the webservices).
>
> thanks,
> lee
> "q" <agapeton> wrote in message
> news:1159301627.817272.242400@h48g2000cwc.googlegroups.com...
> > What webservices system are you using? ASMX? WSE? WCF?
> >
> > You need WSE or WCF to do that... ASMX doesn't really support anything
> > but the most basic of webservices. They don't account for any of the
> > stronger specs.
> >
> > Lee Franke wrote:
> >> The application that I want to use requires the header to contain a
> >> username/password.
> >>
> >> Example:
> >>
> >> <soap:Header>
> >> <wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/04/secext">
> >> <wsse:UsernameToken>
> >> <wsse:Username>fluffy</wsse:Username>
> >> <wsse:Password Type="wsse:PasswordText">bunny</wsse:Password>
> >> </wsse:UsernameToken>
> >> </wsse:Security>
> >> </soap:Header>
> >>
> >> The problem is that the WSDL of the webservice does not contain any
> >> information reagarding this header information (shouldn't it?).
> >>
> >> So when I add a web reference in my client application there is no class
> >> reference to allow me to set the Username and Password for the header.
> >>
> >> What (and how) do I need to modify for the class reference to appear?
> >> Reference.cs? The WSDL itself then reimport? I can get it to work by
> >> building the XML then just HTTP Post it to the URL, but I would rather
> >> let
> >> the program do it for me.
> >>
> >> thanks,
> >>
> >> lee

> >


Reply

Thread Tools


Similar Threads

Thread Thread Starter Forum Replies Last Post
Create Dynamic Client Class with Information Provided by WSDL usenet DOTNET 1 11-27-2006 09:50 AM
Header Information Question usenet Eudora 2 06-25-2006 03:34 PM
Reading JPEG header information usenet Graphics 11 12-18-2005 10:44 PM
Access to SMTP Header information usenet Microsoft Exchange 0 10-27-2005 08:21 PM
tiff and header information usenet DOTNET 0 10-17-2005 09:19 AM


All times are GMT -5. The time now is 08:29 AM.

Managed by Infnx Pvt Ltd.