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 / December 2005

Tip: Looking for answers? Try searching our database.

SOAPHeader element - not a complex type ???

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Emul - 30 Nov 2005 21:02 GMT
I have to send a SOAP request from my .NET/C# client to a server
(Apache/Java/Axis) that expects a SessionKey to appear in the
SOAPHeader.  Their WSDL does not describe the header (I spoke with them
and they are not able to provide WSDL with it) so I handcrafted the
WSDL and ran WSDL.EXE on it.  This takes me 99% of the way there, but
the last 1% seems insurmountable!  The problem is that the server
expects the SOAPHeader to contain the value as a simple type (string),
not a complex type.  Here is what is expected...
 <soapenv:Header...>
   <ns:SessionKey...> XXXXXX </ns:SessionKey>
 </soapenv:Header>
Here is what I get from .NET...
 <soapenv:Header...>
  <ns:MyHeader...>
   <SessionKey...> XXXXXX </SessionKey>
  </ns:MyHeader>
 </soapenv:Header>
I want to get rid of the MyHeader - to simply change it from a
complexType to an element.  If I try to change it from a complexType to
an element, I get the error that use="encoded" values must be
complexTypes.  .NET seems to allow this for use="literal" types, but
the body is use="encoded", and if the body is encoded, the header must
be as well - or I get a VS TOOL error. (from WSDL.EXE)
Q: Is there a way in .NET to create a simple one-element SOAPHeader,
not an embedded/nested complex type?
Thank you so very much. - Emul
peter.bernhardt@gmail.com - 01 Dec 2005 16:55 GMT
I think this will help:

http://www.sharpsense.com/blog/PermaLink,guid,f6af6dba-46c8-4d43-af21-7ee4715fdf
60.aspx


> I have to send a SOAP request from my .NET/C# client to a server
> (Apache/Java/Axis) that expects a SessionKey to appear in the
[quoted text clipped - 22 lines]
> not an embedded/nested complex type?
> Thank you so very much. - Emul

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



©2009 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.