473,765 Members | 2,035 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to Add an new SOAP header envelop to a SOAP header?

Hi

I have a problem in VB.net 2.0

We are using a third party webservice.
I have loaded the wsdl file and can access the functions the service
has.

Now this party wants that we add a SOAP header element named 'Vendor'
so that they can distinguis which vendor called the webservice.

How do i do that in VB?

I now just use the functions as they are exposed by the wsdl file
(added as a web reference).

The vendor only added some JAVA code as an example.

// Construct the header
QName headerName = new QName("
http://ech.client.nl/vendor", "Vendor");
SOAPHeaderEleme nt headerElement = new
SOAPHeaderEleme nt(headerName);
headerElement.s etValue("ECH Gui");
headerElement.s etMustUnderstan d(true);

try {
Message message = arg0.getCurrent Message();

message.getSOAP Header().addChi ldElement(heade rElement);
} catch (SOAPException se) {
logger.error("C an Not Add SOAP header
'Vendor'", se);
}

But how do i do this is VB so i can add the this to the SOAP messages
when calling tghe webservice?

Peter
Jul 17 '06 #1
1 2111
Hi Peter,

This article describes how to add custom SOAP headers to a web service. (It
is the same thing if you want to add them only in the web service proxy).

http://authors.aspalliance.com/nothi...mn_123&aid=123

Regards,
Pablo Cibraro
http://weblogs.asp.net/cibrax
[MVP - Connected Systems Developer]

<Peter van der veenwrote in message
news:td******** *************** *********@4ax.c om...
Hi

I have a problem in VB.net 2.0

We are using a third party webservice.
I have loaded the wsdl file and can access the functions the service
has.

Now this party wants that we add a SOAP header element named 'Vendor'
so that they can distinguis which vendor called the webservice.

How do i do that in VB?

I now just use the functions as they are exposed by the wsdl file
(added as a web reference).

The vendor only added some JAVA code as an example.

// Construct the header
QName headerName = new QName("
http://ech.client.nl/vendor", "Vendor");
SOAPHeaderEleme nt headerElement = new
SOAPHeaderEleme nt(headerName);
headerElement.s etValue("ECH Gui");
headerElement.s etMustUnderstan d(true);

try {
Message message = arg0.getCurrent Message();

message.getSOAP Header().addChi ldElement(heade rElement);
} catch (SOAPException se) {
logger.error("C an Not Add SOAP header
'Vendor'", se);
}

But how do i do this is VB so i can add the this to the SOAP messages
when calling tghe webservice?

Peter

Jul 17 '06 #2

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

Similar topics

2
3429
by: c | last post by:
We have an API that has an XML interface. We have a client who has a .NET application and wants to use our API. Why will SOAP make life easier for our client? It seems to me that .NET to XML should be easy enough, but they're saying they want SOAP interface. thanks. c
0
1636
by: chr | last post by:
Hi, I'm trying to integrate a webservice into a c#-program, creating proxy classes from a wsdl-file with wsdl.exe. All works fine, except if containers are returned. Although I can see in the returned xml that there are entries in the containers the proxy-classes say it is empty. Has anybody an idea why this is so an how to solve this problem -- the returned xml-data looks like this <?xml version="1.0"...
1
1219
by: Champika Nirosh | last post by:
Hi all, I am just comparing webservice performance.. What really have in SOAP envelop?? Is it taking lots of space.. get me some data regarding this soap envelop
0
1239
by: tshad | last post by:
I am trying to create a proxy and soap from a sample file and it won't create multiple dimensional arrays for some reason. I am getting the same results if "Line" is not a Multidimensional array. Why is "Line" not there? I have the following Class that I compile and put into my Bin directory as: vbc /t:library NewsItem.vb copy NewsItem.dll bin *************************************
0
955
by: Peter van der veen | last post by:
Hi I have a problem in VB.net 2.0 We are using a third party webservice. I have loaded the wsdl file and can access the functions the service has. Now this party wants that we add a SOAP header element named 'Vendor' so that they can distinguis which vendor called the webservice.
0
965
by: neerajdeswal | last post by:
Testing Soap envelop (as Text File) in RPC Method Hi, I have created a web service based on a interface contract given by client. Now client wants to test it based on a given soap envelop as text file. But I am not able to execute this soap envelop.
0
1181
by: lallous | last post by:
Hello, I am new to webservice internals and I used the web service wizard to generate the webservice class and appropriate objects. After issueing a request, I noticed that the SOAP message goes like the following format (example): <?xml version="1.0" encoding="utf-8" ?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
0
3696
by: Nithi Gurusamy | last post by:
I have generated a Web-Service-Proxy (Add Web Reference) within VS. This proxy class is based on WebServicesClientProtocol of WSE 3.0. I want to add some custom HTTP Headers to the envelop before calling a Web Method using this proxy class. I could add the SOAP security header using Assertion Policy. But adding HTTP headers looks like a challenge. Basically I am trying to resolve the soap fault "The request failed with HTTP status 404:...
0
1841
by: fragmonster | last post by:
Hi, I have a .NET Web Service. I must write a client in PHP5. I've got a problem with the formatting of my SoapHeader. In fact, the prefix of the namespace does not apply to the entire header node and child nodes: Here is my PHP Soap message : =========================== <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"
0
9568
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10163
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10007
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8832
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7379
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5276
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3924
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3532
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.