Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / September 2006

Tip: Looking for answers? Try searching our database.

Soap header with prefix

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
wakeup - 06 Sep 2006 16:53 GMT
Hi,

I have to use Java (axis) webservice that will be called with my .net
client. Now they gave me the specification on what their common soap header
will look like, listed below:

<sec:autentication>

<sec:username>user</sec:username>

<sec:password>pass</sec:password>

</sec:autentication>



I have modified the .net generated proxy clases (references.cs) for send
soap header, but I send this:

<autentication>

<username>user</username>

<password>pass</password>

</autentication>

How can I set the "sec" prefix in tags when send from my .net client?

Thanks in advance
John Saunders - 06 Sep 2006 17:49 GMT
> Hi,
>
[quoted text clipped - 23 lines]
>
> How can I set the "sec" prefix in tags when send from my .net client?

The prefixes are irrelevant. You need to get the correct namespace.

What happens if you don't modify the proxy class?

John
wakeup - 06 Sep 2006 18:59 GMT
If I no modify de proxy class it throws exception

> > Hi,
> >
[quoted text clipped - 29 lines]
>
> John
John Saunders - 06 Sep 2006 21:17 GMT
Can you please include details of exactly which exception it throws?

> If I no modify de proxy class it throws exception
>
[quoted text clipped - 32 lines]
>>
>> John
wakeup - 07 Sep 2006 08:53 GMT
Failed to retrieve the SOAP Header or it's details properly.

> Can you please include details of exactly which exception it throws?
>
[quoted text clipped - 34 lines]
> >>
> >> John
John Saunders - 07 Sep 2006 13:29 GMT
> Failed to retrieve the SOAP Header or it's details properly.

I'm sorry, I can't tell if you're joking or not. That's not an exception.
System.NullReferenceException is an exception. "Object reference is not set
to an instance of an object" is an exception message. Sometimes, one even
includes a stack trace when discussing an exception.

When you're trying to get help, it's better to provide more information,
rather than less.

John

>> Can you please include details of exactly which exception it throws?
>>
[quoted text clipped - 36 lines]
>> >>
>> >> John
Peter Ritchie [C# MVP] - 08 Sep 2006 02:32 GMT
I'm curious.  Have you added the web service as a web reference to your
application?  If so, you get this error when you invoke one of the web
services methods?

If it's a header extension, there should be an extra property for each
header element in your web serivce class.  If the element is
"authentication", you should have an "authentication" property on the
generated web service class.

As I mentioned on forums.microsoft.com/msdn, it doesn't matter what the
namespace prefix is; but if the web service has marked the authentication
element as mandatory (minOccurs="1") and you're doing nothing with an
"authentication" property in your code, that might be why you're getting that
error.

Signature

Browse http://connect.microsoft.com/VisualStudio/feedback/ and vote.
http://www.peterRitchie.com/blog/
Microsoft MVP, Visual Developer - Visual C#

> Hi,
>
[quoted text clipped - 26 lines]
>
> Thanks in advance

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.