Click here to Skip to main content
15,888,527 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionMVC Role users error instance Pin
DPaul19948-Jul-15 8:39
DPaul19948-Jul-15 8:39 
AnswerRe: MVC Role users error instance Pin
Herman<T>.Instance13-Jul-15 0:18
Herman<T>.Instance13-Jul-15 0:18 
QuestionConnection to vpn using .bat file Pin
vineet13047-Jul-15 7:58
vineet13047-Jul-15 7:58 
AnswerRe: Connection to vpn using .bat file Pin
ZurdoDev7-Jul-15 8:02
professionalZurdoDev7-Jul-15 8:02 
QuestionUsing Entity Framework on a Web Forms Website Pin
jkirkerx6-Jul-15 6:23
professionaljkirkerx6-Jul-15 6:23 
QuestionSingle Page Application based on .NET Pin
Ishwor Khanal3-Jul-15 17:05
Ishwor Khanal3-Jul-15 17:05 
AnswerRe: Single Page Application based on .NET Pin
Abhinav S7-Jul-15 16:46
Abhinav S7-Jul-15 16:46 
QuestionXmlTextWriter.Create(MemoryStream, xmlSettings) Pin
jkirkerx3-Jul-15 9:32
professionaljkirkerx3-Jul-15 9:32 
So this is related to my VB post on FirstData V19 SOAP, but is the final piece of the puzzle.
I finally figured out why I can't match the Transmission of the SOAP Body to the copy of the the SOAP Body.
My Soap Body Contains and empty element for Address 2. And the transmitted SOAP Body just closes the empty element. So the 2 don't match, and I get the wrong content digest.

If there amy way using XMLWriter that I can close empty elements? Or will I have to do further manipulation?

SOAP Examples
'Copy of SOAP Body
<Address1 xsi:type="xsd:string">1234 Main Street</Address1><Address2 xsi:type="xsd:string"></Address2>
'Actual SOAP Body Transmitted.
<Address1 xsi:type="xsd:string">1234 Main Street</Address1><Address2 xsi:type="xsd:string"/>

My Code
Dim buffer As MessageBuffer = request.CreateBufferedCopy(Int32.MaxValue)
request = buffer.CreateMessage

Dim msg As Message = buffer.CreateMessage
Dim encoder As UTF8Encoding = New UTF8Encoding

Dim txn As MemoryStream = New MemoryStream
Dim xmlSettings As New XmlWriterSettings
With xmlSettings
    .OmitXmlDeclaration = True
End With

Using xmlWriter As XmlWriter = xmlWriter.Create(txn, xmlSettings)
    Using writer As XmlDictionaryWriter = XmlDictionaryWriter.CreateDictionaryWriter(xmlWriter)

        msg.WriteStartEnvelope(writer)
        msg.WriteStartBody(writer)
        msg.WriteBodyContents(writer)
        xmlWriter.WriteEndElement()
        xmlWriter.WriteEndElement()
        writer.Flush()

    End Using
End Using

'Convert the MemoryStream to a Byte Array
Dim txn_string As String = encoder.GetString(txn.ToArray()).Replace(" />", "/>")
Dim xml_bytes() As Byte = encoder.GetBytes(txn_string)

QuestionThe message could not be sent to the SMTP server. The transport error code was 0x80040217. The server response was not available Pin
Kushal Gupta2-Jul-15 22:12
Kushal Gupta2-Jul-15 22:12 
AnswerRe: The message could not be sent to the SMTP server. The transport error code was 0x80040217. The server response was not available Pin
Abhinav S2-Jul-15 22:54
Abhinav S2-Jul-15 22:54 
Questiondisplay day name of selected date Pin
Praveen Kandari2-Jul-15 21:36
Praveen Kandari2-Jul-15 21:36 
AnswerRe: display day name of selected date Pin
Abhinav S2-Jul-15 22:52
Abhinav S2-Jul-15 22:52 
GeneralRe: display day name of selected date Pin
Praveen Kandari2-Jul-15 23:39
Praveen Kandari2-Jul-15 23:39 
QuestionASP.NET MVC4 / WebAPI OAuth - DotNetOpenAuth Pin
Jammer30-Jun-15 4:11
Jammer30-Jun-15 4:11 
QuestionCan any one help me to post content on linked in asp.net? Pin
Raghavendra.Kodimala29-Jun-15 21:19
professionalRaghavendra.Kodimala29-Jun-15 21:19 
AnswerRe: Can any one help me to post content on linked in asp.net? Pin
deepankarbhatnagar6-Jul-15 1:10
professionaldeepankarbhatnagar6-Jul-15 1:10 
QuestionCode or a network stack control to change the network gateway inside my app Pin
Michael Clinton29-Jun-15 12:14
Michael Clinton29-Jun-15 12:14 
QuestionFormat Excel Row Height Pin
Hellfire123128-Jun-15 17:54
Hellfire123128-Jun-15 17:54 
AnswerRe: Format Excel Row Height Pin
Herman<T>.Instance13-Jul-15 0:23
Herman<T>.Instance13-Jul-15 0:23 
Question.Net Pin
PRAKAS PANDEY28-Jun-15 1:14
PRAKAS PANDEY28-Jun-15 1:14 
AnswerRe: .Net Pin
Sascha Lefèvre28-Jun-15 1:22
professionalSascha Lefèvre28-Jun-15 1:22 
AnswerRe: .Net Pin
Seema Saraswat29-Jun-15 23:32
professionalSeema Saraswat29-Jun-15 23:32 
AnswerRe: .Net Pin
User 418025410-Jul-15 11:02
User 418025410-Jul-15 11:02 
QuestionApp development ASP.NET with SQL Server Pin
Member 1178537426-Jun-15 23:14
Member 1178537426-Jun-15 23:14 
AnswerRe: App development ASP.NET with SQL Server Pin
Seema Saraswat29-Jun-15 23:34
professionalSeema Saraswat29-Jun-15 23:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.