Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8753357
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:24:34+00:00 2026-06-13T13:24:34+00:00

We have a webserice that rerceives a SOAP message with a soap header as

  • 0

We have a webserice that rerceives a SOAP message with a soap header as shown below…

The following SOAP message is being sent to the webservice. However, the webservice failes to serialise the header into the MyMessageID object

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"       
xmlns:xsd="http://www.w3.org/2001/XMLSchema"  
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">  
<soap:Header xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing">  
<wsa:To>https://www.xxx.co.uk/webservices/xxxxDEV/Service.asmx?  
op=TradesmanAllNBAt</wsa:To>  
<wsa:From>  
<Address>FromAddress</Address>  
</wsa:From>  
<wsa:ReplyTo>  
<Address>ReplyToAddress</Address>  
</wsa:ReplyTo>  
<wsa:Action>https://www.xxxx.co.uk/webservices/xxxxxDEV/TradesmanAllNBAt</wsa:Action>  
<wsa:MessageId>uuid:c6555fee-8b51-4664-88c8-74345b04dda5</wsa:MessageId>  
</soap:Header>  

The web service is code is as defined below

    Imports System.Web.Services  
    Imports System.Web.Services.Protocols  
    Imports System.ComponentModel  
    Imports System.Xml  
    Imports Microsoft.Web.Services3  
    <System.Xml.Serialization.XmlRootAttribute(ElementName:="MessageId",  
    Namespace:="wsa", datatype:="string")> _  

    Public Class MessageId : Inherits SoapHeader  
        <System.Xml.Serialization.XmlTextAttribute()> _  
        Public TextValue As String  
    End Class  


    <System.Web.Services.WebService(Namespace:="https://www.xxxx.co.uk/webservices/xxxxDEV/")>   _    
    <ToolboxItem(False)> _  
    Public Class Service1  

        Inherits System.Web.Services.WebService  
        Public myMessageID As New MessageId  
        Public myRelatesTo As New RelatesTo  
        <WebMethod(), _  
            SoapHeader("myMessageID", Direction:=SoapHeaderDirection.InOut)>  
        Public Function TradesmanAllNBAt(ByVal objDocument As XmlDocument) As XmlDocument  

            Try  
                  myRelatesTo.TextValue = myMessageID.TextValue  


                Return (Nothing)  
            Catch ex As Exception  
                logError(ex.ToString)  
                Return Nothing  
            End Try  

        End Function  
    End Class  


The myMessageID object does not exists we accessing myMessageID.textvalue 

However, if I change the soap header and remove the name space as shown below

<soap:Header>

It works??  The third party insists on sending the name space in the soap header tag and I do not know how to resolve this issue.

Come on you SOAP gurus I really need help on this.

Many thanks in advance
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T13:24:35+00:00Added an answer on June 13, 2026 at 1:24 pm

    The issue was to do with the serialisation and the name space changing the MessageID Class serialisation to System.Xml.Serialization.XmlRoot and adding the correct namespace

    <System.Xml.Serialization.XmlRoot(ElementName:="MessageId", Namespace:="http://schemas.xmlsoap.org/ws/2004/03/addressing", datatype:="string")> _
    Public Class MessageId : Inherits SoapHeader
        <System.Xml.Serialization.XmlTextAttribute()> _
        Public TextValue As String
    End Class
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a WebService that returns XML in a SOAP response: <?xml version=1.0 encoding=utf-8
I have a webservice that I want to query for updates immediately after a
I have a WebService that when I use the instance of this webservice, occurs
I have a webservice that returns a list of Clinics near a certain lat/long.
I have a webservice that produce XML result. I have been working on this
I have a restfull webservice that requires loading trained model files and to create
I have a webservice method that reads a photo and returns its byte data.
I have a REST webservice that I need to consume in C#. I need
I have an application in which I have a webservice call that returns data
I have read a lot about jquery and i have a simple webservice that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.