473,387 Members | 3,787 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,387 software developers and data experts.

SOAP Headers with C#: how to support different XML fields in Request and Reply

I have a SOAP Header that has different XML fields in the request and response.

I instantiate one Header class for the Request and Response SOAP Header and using XmlIgnoreAttribute and bool fields to activate/de-activate the XML tags that are included or absent in each Instance.

My problem is how to declare the SOAP Header in the Web Reference file to support unique classes for the inbound and outbound SOAP Headers. When the wsdl was consumed by Visual Studio, it just setup one Header that is declared:

[System.Web.Services.Protocols.SoapHeaderAttribute( "Header", Direction=System.Web.Services.Protocols.SoapHeader Direction.InOut)]

This does not seem to work with a Header that has unique Header for the Request and Response, the Response comes back with the Header unchanged.

Thanks
Ken Newman
May 26 '07 #1
2 3198
dorinbogdan
839 Expert 512MB
Hi,

Did you find the answer to your question?
If not, please let me know.
If yes, feel free to share it.

Thanks,
Dorin.
May 29 '07 #2
Hi,

Did you find the answer to your question?
If not, please let me know.
If yes, feel free to share it.

Thanks,
Dorin.

I think I have a better understanding of the issue and new question to pose:

I need to serialize my SOAP Header with a specific namepsace prefix. the server I am talking to sends back the SOAP Header in the response with this namespace prefix and I belive that the de-serializer wont work if I have not specified my SOAP Header with the namespace and the prefix.

Its odd that the server accepts my request as long as the namespace url is correct but will send back the soap header with the namespace and prefix. My program does not report an error for an unknown namespace prefix unless its a soap fault that returns, then I get an error that the namespace prefix is not recognized.

Any ideas as to how to have my outbound and inbound soiap header to have a unqique namespace prefix ?

thanks
Ken Newman
May 30 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: ramas | last post by:
Hi, I am new to PHP scripting and i am trying to connect to a soap server (as mentioned below) using the SOAP extension comesup with PHP. Now my requirement is to add my HTTP header fields along...
5
by: jb | last post by:
*Please* help --- I'm tearing my hair out. I want to use sessionstate in a webservice, accessed from a client, written in script (JScript, InfoPath). I have written my webservice (C# .NET). I...
6
by: john deviney | last post by:
I have a C#/.Net 1.1 client talking to a Java based web service. I need to insert a soap header on the client side which is expected on the server side. Currently, the Java ws provider, Axis, does...
3
by: techieTex | last post by:
I have a simple SOAP Extension which does nothing but to log the SOAP message to a file. This works fine when I use the webservice by adding a webreference and using the class. However my...
6
by: A.M-SG | last post by:
Hi, We are developing a SmartClient application and we are planning to expose business objects layer to SmartClient application by using ASP.NET SOAP web services.
5
by: A.M-SG | last post by:
Hi, I am developing a SOAP extender and I need to store some session information at BeforeSerialize ProcessMessage event, so at the AfterDeserialize ProcessMessage event I know which call I...
3
by: Sydney | last post by:
Hi, I am trying to construct a WSE 2.0 security SOAP request in VBScript on an HTML page to send off to a webservice. I think I've almost got it but I'm having an issue generating the nonce...
1
by: Stu | last post by:
Hi, Im using vis studio 2003 and I think wse is out of the question as clients could be using java which doesnt support it. So I managed to find some code which allows you to develop a custom...
5
by: =?Utf-8?B?SmltbWVy?= | last post by:
Hello, I've been trying to create a WCF SOAP Router Service that can forward not just the message body but also any security headers set by the originator of the message. The destination service...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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.