473,320 Members | 2,041 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,320 software developers and data experts.

Q: Empty SoapHeader Visual Studio 2003 C++?

I am trying to build a consumer to a webservice which use soapheader. I am
using Visual Studio 2003. Please see the wsdl-file below. Why is it that the
SOAPHEADER is empty when I use it int the header instead of as part of the
input message? Is there a limitation of VS2003?

Please any ideas are appreciated?!

TIA
Fred

The binding looks like this:
----------------------------------
<binding name="UnameCodeLoginSoapBinding" type="tns1:UnameCodeLoginPort">
<wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="UnameCodeLogin">
<wsdlsoap:operation soapAction=""/>
<input name="unamecodeloginreq">
<wsdlsoap:header namespace="http://sa.edb.com/authent"
message="tns1:UnameCodeLoginReq" part="SoapHeader" use="literal"/>
<wsdlsoap:body namespace="http://sa.edb.com/authent"
parts="UnameCodeLoginIn" use="literal"/>
</input>
<output name="unamecodeloginres">
<wsdlsoap:body namespace="http://sa.edb.com/authent" use="literal"/>
</output>
</operation>
</binding>
The thing is that when I make the call:
HRESULT res = srv.UnameCodeLogin( req, soapHeader, &rsp);

All my soapheader is empty (see below, all AutHeader is nil):
----------------------------------
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<soap:Header xmlns="http://sa.edb.com/authent">
<snp:AutHeader xmlns:snp="http://sa.edb.com/authent"
xmlns="http://sa.edb.com/authent">
<SourceApplication xsi:nil="1"/>
<DestinationApplication xsi:nil="1"/>
<Function xsi:nil="1"/>
<ClientContext>
<userid xsi:nil="1"/>
<credentials xsi:nil="1"/>
<channel xsi:nil="1"/>
<orgid xsi:nil="1"/>
<orgunit xsi:nil="1"/>
<customerid xsi:nil="1"/>
<locale xsi:nil="1"/>
<ip xsi:nil="1"/>
<item></item>
</ClientContext>
</snp:AutHeader>
</soap:Header>
<soap:Body>
<UnameCodeLogin xmlns="http://sa.edb.com/authent">
<Ident>111999600030010</Ident>
<Channel>NBA</Channel>
<Institution>46009020</Institution>
<UserAlias>QUICKB</UserAlias>
<UserId></UserId>
<Pwd>111111</Pwd>
<DeviceType></DeviceType>
<Netcentric></Netcentric>
<NumericalID>46009020</NumericalID>
</UnameCodeLogin>
</soap:Body></soap:Envelope>

If I put the AutHeader as an ordinary message input instead of a soapheader
I do get the header filled out:
----------------------------------
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<soap:Body>
<UnameCodeLogin mlns="http://sa.edb.com/authent">
<Ident>111999600030010</Ident>
<Channel>NBA</Channel>
<Institution>46009020</Institution>
<UserAlias>QUICKB</UserAlias>
<UserId></UserId>
<Pwd>111111</Pwd>
<DeviceType></DeviceType>
<Netcentric></Netcentric>
<NumericalID>46009020</NumericalID>
</UnameCodeLogin>
<AutHeader xmlns="http://sa.edb.com/authent">
<SourceApplication>LFTEST_TFB</SourceApplication>
<DestinationApplication>SA</DestinationApplication>
<Function>UnameCodeLogin</Function>
<ClientContext>
<userid>QUICKB</userid>
<credentials>111111</credentials>
<channel>NBA</channel>
<orgid>46009020</orgid>
<orgunit>46009020</orgunit>
<customerid>0123456789</customerid>
<locale></locale>
<ip></ip>
<item></item>
</ClientContext>
</AutHeader>
</soap:Body></soap:Envelope>
WSDL:
----------------------------------
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<soap:Body>
<UnameCodeLogin mlns="http://sa.edb.com/authent">
<Ident>111999600030010</Ident>
<Channel>NBA</Channel>
<Institution>46009020</Institution>
<UserAlias>QUICKB</UserAlias>
<UserId></UserId>
<Pwd>111111</Pwd>
<DeviceType></DeviceType>
<Netcentric></Netcentric>
<NumericalID>46009020</NumericalID>
</UnameCodeLogin>
<AutHeader xmlns="http://sa.edb.com/authent">
<SourceApplication>LFTEST_TFB</SourceApplication>
<DestinationApplication>SA</DestinationApplication>
<Function>UnameCodeLogin</Function>
<ClientContext>
<userid>QUICKB</userid>
<credentials>111111</credentials>
<channel>NBA</channel>
<orgid>46009020</orgid>
<orgunit>46009020</orgunit><customerid>0123456789</customerid>
<locale></locale>
<ip></ip>
<item></item>
</ClientContext>
</AutHeader>
</soap:Body></soap:Envelope>

My WSDL-file:
-----------------------------------

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://sa.edb.com/authent"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"

xmlns:tns1="http://sa.edb.com/authent"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance"
xmlns:edb="http://edb.com/ws/WSCommon_v10">
<types>
<schema targetNamespace="http://sa.edb.com/authent"
xmlns="http://www.w3.org/2001/XMLSchema">

<xsd:complexType name="UnameCodeLoginType">
<xsd:sequence>
<xsd:element name="Ident" type="xsd:string" minOccurs="1"/>
<xsd:element name="Channel" type="xsd:string" minOccurs="1"/>
<xsd:element name="Institution" type="xsd:string" minOccurs="1"/>
<xsd:element name="UserAlias" type="xsd:string" minOccurs="1"/>
<xsd:element name="UserId" type="xsd:string"/>
<xsd:element name="Pwd" type="xsd:string" minOccurs="1"/>
<xsd:element name="DeviceType" type="xsd:string"/>
<xsd:element name="Netcentric" type="xsd:string"/>
<xsd:element name="NumericalID" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>

<xsd:complexType name="UnameCodeLoginResponseType">
<xsd:sequence>
<xsd:element name="UserId" type="xsd:string"/>
<xsd:element name="DeviceType" type="xsd:string"/>
<xsd:element name="Netcentric" type="xsd:string"/>
<xsd:element name="CodeNum" type="xsd:int"/>
<xsd:element name="NumericalID" type="xsd:string"/>
<xsd:element name="SaRet" type="xsd:int"/>
<xsd:element name="CryptoRet" type="xsd:string"/>
<xsd:element name="TextRet" type="xsd:string"/>
<xsd:element name="LastOkLogin" type="xsd:string"/>
<xsd:element name="LastBadLogin" type="xsd:string"/>
<xsd:element name="BadLogins" type="xsd:string"/>
<xsd:element name="NextStep" type="xsd:string"/>
<xsd:element name="SerialNum" type="xsd:string"/>
<xsd:element name="Version" type="xsd:string"/>
<xsd:element name="HostCode" type="xsd:string"/>
<xsd:element name="So" type="xsd:string"/>
<xsd:element name="ReturnState" type="tns1:ResponseStateType"/>
</xsd:sequence>
</xsd:complexType>

<xsd:complexType name="ResponseStateType">
<xsd:sequence>
<xsd:element name="ErrorStatus" type="xsd:boolean"/>
<xsd:element name="ErrorCode" type="xsd:int"/>
<xsd:element name="Message" type="xsd:string"/>
<xsd:element name="NativeError" type="xsd:string"/>
<xsd:element name="LogSequence" type="xsd:long"/>
<xsd:element name="errorItem" type="tns1:errorItemType"
minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>

<xsd:complexType name="errorItemType">
<xsd:attribute name="key" type="xsd:string" use="required"/>
<xsd:attribute name="value" type="xsd:string" use="required"/>
</xsd:complexType>
<xsd:complexType name="ClientContextType">
<xsd:sequence>
<xsd:element name="userid" type="xsd:string" minOccurs="0"/>
<xsd:element name="credentials" type="xsd:string" minOccurs="0"/>
<xsd:element name="channel" type="xsd:string" minOccurs="0"/>
<xsd:element name="orgid" type="xsd:string" minOccurs="0"/>
<xsd:element name="orgunit" type="xsd:string" minOccurs="0"/>
<xsd:element name="customerid" type="xsd:string" minOccurs="0"/>
<xsd:element name="locale" type="xsd:string" minOccurs="0"/>
<xsd:element name="ip" type="xsd:string" minOccurs="0"/>
<xsd:element name="item" type="tns1:itemType" minOccurs="0"
maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="itemType">
<xsd:attribute name="key" type="xsd:string" use="required"/>
<xsd:attribute name="value" type="xsd:string" use="required"/>
</xsd:complexType>
<xsd:complexType name="EDBHeaderType">
<xsd:sequence>
<xsd:element name="SourceApplication" type="xsd:string"/>
<xsd:element name="DestinationApplication" type="xsd:string"/>
<xsd:element name="Function" type="xsd:string"/>
<xsd:element name="ClientContext" type="tns1:ClientContextType"/>
</xsd:sequence>
</xsd:complexType>

<xsd:element name="AutHeader" type="tns1:EDBHeaderType"/>
<xsd:element name="UnameCodeLogin" type="tns1:UnameCodeLoginType"/>
<xsd:element name="UnameCodeLoginResponse"
type="tns1:UnameCodeLoginResponseType"/>

</schema>
</types>

<message name="UnameCodeLoginReq">
<part element="tns1:UnameCodeLogin" name="UnameCodeLoginIn"/>
<part element="tns1:AutHeader" name="SoapHeader"/>
</message>

<message name="UnameCodeLoginRes">
<part element="tns1:UnameCodeLoginResponse" name="UnameCodeLoginOut"/>
</message>

<portType name="UnameCodeLoginPort">
<operation name="UnameCodeLogin">
<input message="tns1:UnameCodeLoginReq" name="unamecodeloginreq"/>
<output message="tns1:UnameCodeLoginRes" name="unamecodeloginres"/>
</operation>
</portType>

<binding name="UnameCodeLoginSoapBinding" type="tns1:UnameCodeLoginPort">
<wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="UnameCodeLogin">
<wsdlsoap:operation soapAction=""/>
<input name="unamecodeloginreq">
<wsdlsoap:header namespace="http://sa.edb.com/authent"
message="tns1:UnameCodeLoginReq" part="SoapHeader" use="literal"/>
<wsdlsoap:body namespace="http://sa.edb.com/authent"
parts="UnameCodeLoginIn" use="literal"/>
</input>
<output name="unamecodeloginres">
<wsdlsoap:body namespace="http://sa.edb.com/authent" use="literal"/>
</output>
</operation>
</binding>

<service name="UnameCodeLoginService">
<port binding="tns1:UnameCodeLoginSoapBinding"
name="UnameCodeLoginService">
<wsdlsoap:address location="XXXXXX">
</port>
</service>

</wsdl:definitions>

Feb 12 '07 #1
0 1860

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

Similar topics

1
by: angelag | last post by:
I am currently taking a college course in Visual Basic.Net and I am a beginner. I bought Visual Studio.Net 2003 to do my homework at home. I built my first project and e-mailed it to myself at...
6
by: Martin Bless | last post by:
The good news: Along with Python-2.4 comes really good news to Windows users. Yes, you now CAN build extension modules yourself using the SAME C++ compiler and linker Python is built with...
0
by: Ricardo Dias Marques | last post by:
Hi, I have a development machine with Visual Studio .Net 2003 which, as far as I know, targets the 1.1 .Net Framework. Now I need to open some solutions that were created in another machine...
1
by: xman | last post by:
very hard is fix exactly group for this question.. but I am sure that some of people here have some experience with these compilers: Visual Studio NET Enterprise Architect 2002 and Visual Studio...
1
by: Daniel A. Thomas | last post by:
License required Maybe you don't have this but have one of the products that qualifies for the upgrade such as ... Visual Studio .NET 2003 Professional Visual Studio .NET 2003 Professional...
26
by: Bruno Jouhier [MVP] | last post by:
I'm currently experiencing a strange phenomenon: At my Office, Visual Studio takes a very long time to compile our solution (more than 1 minute for the first project). At home, Visual Studio...
0
by: cronman | last post by:
I am creating a small Windows application using Visual C# 2005 Express Edition (August CTP) for a small non-profit agency. My current issue is with updating related information in an Access...
12
by: Nathan Sokalski | last post by:
I recently upgraded to from Visual Studio .NET 2003 to Visual Studio .NET 2005. In Visual Studio .NET 2003 when I would select 'Build' it would add a *.dll with the name of the Project to a /bin/...
10
by: Andy Kendall | last post by:
I have a problem accessing my custom SoapHeader from a SoapExtension. My extension has no compile time reference to the class derived from SoapHeader, so how can cast it into a SoapHeader of the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.