473,756 Members | 9,334 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XML Post / Reply

I need to make a web service call using an HTTPS POST. XML data is returned
in the body of the
HTTPS reply. What is the best way to do this with asp.net web services?

I am very comfortable in the world of asp.net and C# but have done nothing
with web services or XML. My first incling is to stream an XML document to
an HTTP Request object and then stream the response back to an XML document
but guessing there is a better way?

Thanks,
Sample data:

<Request StoreID="myStor eID" StoreKey="mySto reKey"
ApplicationID=" My Application Name Ver 1.0">
<CreditCardAuth orize>
<ReferenceNumbe r>1234</ReferenceNumber >
<TransactionAmo unt>1.00</TransactionAmou nt>
<AccountNumber> 411111111111111 1</AccountNumber>
<ExpirationMont h>12</ExpirationMonth >
<ExpirationYear >99</ExpirationYear>
</CreditCardAutho rize>
</Request>

Reply:

<Reply>
<TransactionRep ly>
<ResponseCode>0 </ResponseCode>
<ResultCode>0 0</ResultCode>
<ResultMessage> APPROVED</ResultMessage>
<TransactionID> 100000182165</TransactionID>
<AVSResponseCod e />
<CVVResponseCod e />
<ApprovalNumber >123456</ApprovalNumber>
<AuthorizationN umber>123456</AuthorizationNu mber>
<TransactionDat e>021112</TransactionDate >
<TransactionTim e>110544</TransactionTime >
<ReferenceNumbe r>1234</ReferenceNumber >
<AccountNumber> XXXXXXXXXXXX111 1</AccountNumber>
<TransactionAmo unt>1.00</TransactionAmou nt>
</TransactionRepl y>
</Reply>
Oct 4 '06 #1
2 4066


Andrew Robinson wrote:
I need to make a web service call using an HTTPS POST. XML data is returned
in the body of the
HTTPS reply. What is the best way to do this with asp.net web services?

I am very comfortable in the world of asp.net and C# but have done nothing
with web services or XML. My first incling is to stream an XML document to
an HTTP Request object and then stream the response back to an XML document
but guessing there is a better way?
HTTP request/response handling in the .NET framework is done with
HttpWebRequest/HttpWebResponse . Those expose streams (input or output
stream) and if you want to write or read XML then all XML APIs .NET have
overloads taking a stream (e.g. XmlWriter over a stream to post the XML
as part of a HTTP request body, XmlReader or XPathDocument or
XmlDocument over a stream to parse the XML in a HTTP response body).

If you web service follows standards like SOAP and WSDL then there are
additional tools to simply generate .NET proxy class code and make calls
to the web service by calling methods of a proxy object.

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Oct 4 '06 #2
Our vendor has a SOAP / WSDL interface but the raw XML using POST is their
preferred interface (and they offer some additional functionality with it.).

Sounds like I was heading down the correct path based on your posting.
Thanks,
"Martin Honnen" <ma*******@yaho o.dewrote in message
news:ue******** ******@TK2MSFTN GP03.phx.gbl...
>

Andrew Robinson wrote:
>I need to make a web service call using an HTTPS POST. XML data is
returned in the body of the
HTTPS reply. What is the best way to do this with asp.net web services?

I am very comfortable in the world of asp.net and C# but have done
nothing with web services or XML. My first incling is to stream an XML
document to an HTTP Request object and then stream the response back to
an XML document but guessing there is a better way?

HTTP request/response handling in the .NET framework is done with
HttpWebRequest/HttpWebResponse . Those expose streams (input or output
stream) and if you want to write or read XML then all XML APIs .NET have
overloads taking a stream (e.g. XmlWriter over a stream to post the XML as
part of a HTTP request body, XmlReader or XPathDocument or XmlDocument
over a stream to parse the XML in a HTTP response body).

If you web service follows standards like SOAP and WSDL then there are
additional tools to simply generate .NET proxy class code and make calls
to the web service by calling methods of a proxy object.

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/

Oct 4 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1851
by: Alec | last post by:
Hi All, I have recently built a site using PHP and MySQL, and started to implement a basic forum into it. However, the form to post messages doesnt do what I want it to. If there is no user logged in (ie no session) then it posts the message fine. But if there is a user logged in, it loads my login.php page instead of my post.php page??? Code for both pages below: >>>>>>>>>READ.PHP>>>>>>>>>
15
3130
by: Thomas Scheiderich | last post by:
I am trying to understand Session variables and ran into a question on how they work with data that is passed. I have an HTM file that calls an ASP file and sends the name either by GET or POST. When I find is that if I send the value by the GET method, response.write("From QueryString: " & Request.QueryString("usernamefromform") & "<br><br>")
1
3838
by: Taggy | last post by:
hi, Can someone help me with this. I am having this codes: WebRequest myRequest = WebRequest.Create( myurl ); -line1 WebResponse myResponse = myRequest.GetResponse(); -line2 ...... to get a reply from a webserver. The reply is actually a form with a textbox and a button. Can i simulate filling up the textbox and submit the form to get another
10
3439
by: glenn | last post by:
I am use to programming in php and the way session and post vars are past from fields on one page through to the post page automatically where I can get to their values easily to write to a database or continue to process on to the next page. I am now trying to learn ASP to see if we can replace some of our applications that were written in php with an ASP alternative. However, after doing many searches on google and reading a couple...
7
4263
by: | last post by:
Hello, I would like to do the following from a asp.net button click: <form method="POST" action="https://www.1234.com/trans_center/gateway/direct.cgi"> <input type="hidden" name="Merchant" value="Merchant Name"> <input type="hidden" name="OrderID" value="Unique OrderID value"> <input type="hidden" name="email" value="Customers email address (OPTIONAL)">
2
1664
by: Leon | last post by:
Hi, Basically I've written a NNTP-client which is able to post new messages, but inable to post replies to messages. I've tried posting a reference string into the header of the new article containing only the message-Id I reply to : results in a new post I've tried posting a (concat) reference string into the header of the new article containing all message-id's (message-tree) of the message I reply
48
1755
by: Ravishankar S | last post by:
hello, would any kind soul explain what is top posting, since i dont have www access. to reply to a post, i open it in the outlook express and click reply group and that's all. what the top posting all about..? Kind Regards, Ravishankar
7
2934
by: php_mysql_beginer911 | last post by:
Hi .. hope someone will help i am trying to figure it out why i cannot post string "union select" every time i try to post data which content union and select .. the page doesn't get posted and it shows error page not found on this server i googled and found some people use union and select to hack sites (mysql injection) i guess the server i am using has some kind of filter and if a post string content "union select" ... it simply...
0
9117
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9894
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9679
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9676
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9541
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8542
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
3651
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3141
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2508
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.