473,216 Members | 1,292 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,216 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 1856

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...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...

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.