Solved

Invoke web servive With XML

Posted on 2010-09-19
1
479 Views
Last Modified: 2013-11-19
I am trying to this xml with given code to web service end point but it is now working giving 500 web internal error why this happens
Sub Main()
        SndXML("http://dgpys.teias.gov.tr:80/dgpys/services/EVDServis", "lgn.xml")
        Console.Read()
    End Sub
    Sub SndXML(ByVal URL As String, ByVal fn As String)
        Dim strURL As String = URL
        Dim xmlDoc As XmlDocument = New XmlDocument()
        xmlDoc.Load(fn)
        Dim request As HttpWebRequest = WebRequest.Create(strURL)
        request.Method = "POST"
        request.ContentType = "text/xml"
        request.Timeout = 30 * 1000
        Dim request_stream As Stream = request.GetRequestStream()
        xmlDoc.Save(request_stream)
        request_stream.Close()
        Dim response As HttpWebResponse = request.GetResponse()
        Dim r_stream As Stream = response.GetResponseStream()
        Dim response_stream As New StreamReader(r_stream, System.Text.Encoding.GetEncoding("utf-8"))
        Dim sOutput As String = response_stream.ReadToEnd()
        Console.Write(sOutput)
    End Sub

Open in new window

Lgn.xml
0
Comment
Question by:3XLcom
1 Comment
 
LVL 24

Accepted Solution

by:
alexey_gusev earned 500 total points
ID: 33714054
it looks like you have to add "SOAPAction" to the header of HttpWebRequest
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
start a process from a service 3 31
ASP/VB email question 4 46
Create animated movies for web page 18 84
Generate Numbers in JQuery file 11 66
Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logiā€¦
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question