Click here to Skip to main content
15,904,351 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Standard VB 2013 progress bar animation weirdness Pin
Richard MacCutchan5-Oct-15 3:50
mveRichard MacCutchan5-Oct-15 3:50 
AnswerRe: Standard VB 2013 progress bar animation weirdness Pin
Richard Andrew x645-Oct-15 12:10
professionalRichard Andrew x645-Oct-15 12:10 
GeneralRe: Standard VB 2013 progress bar animation weirdness Pin
Member 15839635-Oct-15 21:33
professionalMember 15839635-Oct-15 21:33 
Questionopen file location thru windows explorer Pin
Mendel Margallo Adona3-Oct-15 20:34
Mendel Margallo Adona3-Oct-15 20:34 
AnswerRe: open file location thru windows explorer Pin
Richard Andrew x644-Oct-15 13:27
professionalRichard Andrew x644-Oct-15 13:27 
GeneralRe: open file location thru windows explorer Pin
Mendel Margallo Adona5-Oct-15 18:10
Mendel Margallo Adona5-Oct-15 18:10 
GeneralRe: open file location thru windows explorer Pin
Mendel Margallo Adona6-Oct-15 0:34
Mendel Margallo Adona6-Oct-15 0:34 
AnswerRe: open file location thru windows explorer Pin
Mendel Margallo Adona6-Oct-15 4:02
Mendel Margallo Adona6-Oct-15 4:02 
QuestionVb6 resource file and ms access database Pin
Otekpo Emmanuel3-Oct-15 2:29
Otekpo Emmanuel3-Oct-15 2:29 
AnswerRe: Vb6 resource file and ms access database Pin
Dave Kreskowiak3-Oct-15 4:58
mveDave Kreskowiak3-Oct-15 4:58 
GeneralRe: Vb6 resource file and ms access database Pin
Otekpo Emmanuel5-Oct-15 6:35
Otekpo Emmanuel5-Oct-15 6:35 
QuestionExcel Macros - copy & paste from one workbook to another Pin
MikeK3229-Sep-15 6:17
MikeK3229-Sep-15 6:17 
AnswerRe: Excel Macros - copy & paste from one workbook to another Pin
CHill6030-Sep-15 0:21
mveCHill6030-Sep-15 0:21 
GeneralRe: Excel Macros - copy & paste from one workbook to another Pin
MikeK3230-Sep-15 9:14
MikeK3230-Sep-15 9:14 
GeneralRe: Excel Macros - copy & paste from one workbook to another Pin
CHill6030-Sep-15 10:27
mveCHill6030-Sep-15 10:27 
QuestionPenny for Pay question Pin
BrianStrong28-Sep-15 14:10
BrianStrong28-Sep-15 14:10 
AnswerRe: Penny for Pay question Pin
Richard MacCutchan28-Sep-15 21:43
mveRichard MacCutchan28-Sep-15 21:43 
AnswerRe: Penny for Pay question Pin
Chris Quinn29-Sep-15 0:53
Chris Quinn29-Sep-15 0:53 
AnswerRe: Penny for Pay question Pin
Matt T Heffron29-Sep-15 10:35
professionalMatt T Heffron29-Sep-15 10:35 
QuestionPlease explain this. Pin
Member 1201796828-Sep-15 11:40
Member 1201796828-Sep-15 11:40 
AnswerRe: Please explain this. Pin
Dave Kreskowiak28-Sep-15 12:22
mveDave Kreskowiak28-Sep-15 12:22 
QuestionImport data from photon Pin
Member 1051522527-Sep-15 19:10
professionalMember 1051522527-Sep-15 19:10 
Questionconverting a embedded xml file resource to a xml object Pin
jkirkerx23-Sep-15 9:51
professionaljkirkerx23-Sep-15 9:51 
I'm working on a API, in which you can't get a fake answer back from the test server, so you have to use the production server. On top of that, if you use the same tracking number too many times, it's shuts you off.

So I thought I'd just create a XML file as an embedded resource in my DLL, and just load it and parse it. So I'm loading this XML file, and I want to turn it into a SOAP response, so I can finish writing the code to parse it. I had a problem with getting rid of the BOM marker, so I converted it to a string, so I can rewrite it as an object.

Now I get a error in XML, Line 2,2
Maybe this is more trouble than it's worth. Maybe I misssed something here, like serializer.
Public Shared Function BloomingtonCA() As trackService.TrackReply

        Dim serializer As XmlSerializer = Nothing
        serializer = New XmlSerializer(GetType(trackService.TrackReply))
        AddHandler serializer.UnknownNode, AddressOf serializer_UnknownNode
        AddHandler serializer.UnknownAttribute, AddressOf serializer_UnknownAttribute

        Dim fileStream As Stream = Assembly.GetExecutingAssembly.GetManifestResourceStream("FedExCorp.bloomingtonCA.xml")
        Dim bytes As Byte() = New Byte(fileStream.Length) {}
        fileStream.Position = 0
        fileStream.Read(bytes, 0, fileStream.Length)
        Dim rxn_string As String = Encoding.UTF8.GetString(bytes).Replace("???", "")

        Dim rxnStream As New IO.MemoryStream
        Dim utf8 As Encoding = New UTF8Encoding()
        Dim writer = New XmlTextWriter(rxnStream, utf8)
        writer.WriteRaw(rxn_string)
        writer.Flush()
        rxnStream.Position = 0

        Dim reader = New StreamReader(rxnStream)
        Dim rateReply As New trackService.TrackReply()
        rateReply = CType(serializer.Deserialize(reader), trackService.TrackReply) 'XML Error here
        If Not (reader Is Nothing) Then reader.Close()

        Return rateReply

    End Function
<?xml version="1.0" encoding="utf-8" ?>
<TrackReply xmlns="http://fedex.com/ws/track/v10" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <HighestSeverity>SUCCESS</HighestSeverity>
  <Notifications>
    <Severity>SUCCESS</Severity>
    <Source>trck</Source>
    <Code>0</Code>
    <Message>Request was successfully processed.</Message>
    <LocalizedMessage>Request was successfully processed.</LocalizedMessage>
  </Notifications>

Answer[Cancel That] Pin
jkirkerx23-Sep-15 11:36
professionaljkirkerx23-Sep-15 11:36 
QuestionEmbedded Windows Media Player stream playing query Pin
Magrat23-Sep-15 8:26
Magrat23-Sep-15 8:26 

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.