 |
| XML General XML discussions. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

May 26th, 2008, 04:48 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
|
|
As far as I can tell you don't have an asmx. You showed code that returned the XML and it had such things as:
Code:
lblWSResponse.Text = tsReturnWS.ErrorName + " " + tsReturnWS.ErrorDescription;
which is not possible in an asmx. If you are using a web service then can't you try the built in test harness and see if it's working?
--
Joe ( Microsoft MVP - XML)
|
|

May 26th, 2008, 04:53 AM
|
|
Authorized User
|
|
Join Date: May 2008
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Sorry for asking silly questions but do i have to use below code in ASP code only and it wil return me
Quote:
|
quote:lblWSResponse.Text = tsReturnWS.ErrorName + " " + tsReturnWS.ErrorDescription;
|
If so, then why line ends with ";" .. ?
Quote:
quote:ABCSite.InsertLeads tsRealTimeWS = new ABCSite.InsertLeads();
ABCSite.returnMessage tsReturnWS = new ABCSite.returnMessage();
tsReturnWS = tsRealTimeWS.InsertLead(
Request.Form["txtSupplierID"],Request.Form["txtSupplierPassword"], Request.Form["txtFirstName"], Request.Form["txtLastName"],
Request.Form["txtCoAppFirstName"], Request.Form["txtCoAppLastName"],
Request.Form["txtCity"], Request.Form["txtState"], Request.Form["txtPostalCode"], Request.Form["txtHomePhone"], Request.Form["txtWorkPhone"], Request.Form["txtWorkPhoneExt"], Request.Form["txtBestCallTime"], Request.Form["txtEmailAddress"], Request.Form["txtOriginalLeadDate"],Request.Form["txtExternalLeadID"], Request.Form["txtIPAddress"], Request.Form["txtExtraFields"]);
lblWSResponse.Text = tsReturnWS.ErrorName + " " + tsReturnWS.ErrorDescription;
|
|
|

May 26th, 2008, 07:43 AM
|
|
Authorized User
|
|
Join Date: May 2008
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Bump
|
|

May 26th, 2008, 09:23 AM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
|
|
Please don't bump posts - its considered rather rude, especially when you consider that you have 3 members of the forum all trying to help you out already.
The main problem appears to be that we don't understand what exactly the problem is. You have shown us a bizarre array of ASP (i.e. VBScript), C# code, and some XML with no idea of which does what and what role each part plays in this system of yours - remember, we don't know what you know, you have to explain things to us.
/- Sam Judson : Wrox Technical Editor -/
|
|

May 26th, 2008, 09:40 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
|
|
And especially as you haven't answered the previous questions such as testing the web service using the built in harness.
--
Joe ( Microsoft MVP - XML)
|
|

May 26th, 2008, 09:53 AM
|
|
Authorized User
|
|
Join Date: May 2008
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Sorry for the bump.
I have a form which submit data to a server and that server returns me the XML file.
Now, as my users who are layman doesnt understand XML, I want to display data in a proper formatted HTML.
I am trying to capture XML in the run time and trying to capture and parse data and display the same in HTML.
Quote:
|
quote: And especially as you haven't answered the previous questions such as testing the web service using the built in harness
|
: I didnt understand what you want me to try ...
|
|

May 26th, 2008, 10:06 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
|
|
Are you sure your asmx web service is working? You can test it if you have local access to the machine by entering the address in the browser and using the built in harness, provided you are only using simple types.
Can you explain where the code above
Code:
ABCSite.InsertLeads tsRealTimeWS = new ABCSite.InsertLeads();
ABCSite.returnMessage tsReturnWS = new ABCSite.returnMessage();
tsReturnWS = tsRealTimeWS.InsertLead(
Request.Form["txtSupplierID"],Request.Form["txtSupplierPassword"], Request.Form["txtFirstName"], Request.Form["txtLastName"],
Request.Form["txtCoAppFirstName"], Request.Form["txtCoAppLastName"],
Request.Form["txtCity"], Request.Form["txtState"], Request.Form["txtPostalCode"], Request.Form["txtHomePhone"], Request.Form["txtWorkPhone"], Request.Form["txtWorkPhoneExt"], Request.Form["txtBestCallTime"], Request.Form["txtEmailAddress"], Request.Form["txtOriginalLeadDate"],Request.Form["txtExternalLeadID"], Request.Form["txtIPAddress"], Request.Form["txtExtraFields"]);
lblWSResponse.Text = tsReturnWS.ErrorName + " " + tsReturnWS.ErrorDescription;
lives? It's using a web service but I don't understand where it sits in the grand scheme. And what about
Code:
Sub consumeWebService
is that in the same page, it seems to be an asp page?
--
Joe ( Microsoft MVP - XML)
|
|

May 26th, 2008, 10:42 AM
|
|
Authorized User
|
|
Join Date: May 2008
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
ASP code is the one which I wrote to Get the XML file in run time, parse it and get the node value and display the Node Value. But its giving me an Error.
Server administrator of Server which returns me the XML file sent me below code and asked me to use below code to get HTML instead of XML.:
Quote:
quote:
Using HTTP Post and the .NET Framework
This example assumes you have basic knowledge of how to use Visual Studio and the .NET Framework. In this example, the web reference to the ABCSite.com web service has already been added under a single folder called ABCSite. You would typically use this implementation when posting real time leads to our system via a form on one of your websites. This example is written in C#.
ABCSite.InsertLeads dpRealTimeWS = new ABCSite.InsertLeads();
ABCSite.returnMessage dpReturnWS = new ABCSite.returnMessage();
dpReturnWS = dpRealTimeWS.InsertLead(
Request.Form["txtSupplierID"],Request.Form["txtSupplierPassword"], Request.Form["txtFirstName"], Request.Form["txtLastName"],
Request.Form["txtCoAppFirstName"], Request.Form["txtCoAppLastName"],
Request.Form["txtCity"], Request.Form["txtState"], Request.Form["txtPostalCode"], Request.Form["txtHomePhone"], Request.Form["txtWorkPhone"], Request.Form["txtWorkPhoneExt"], Request.Form["txtBestCallTime"], Request.Form["txtEmailAddress"], Request.Form["txtOriginalLeadDate"],Request.Form["txtExternalLeadID"], Request.Form["txtIPAddress"], Request.Form["txtExtraFields"]);
lblWSResponse.Text = dpReturnWS.ErrorName + " " + dpReturnWS.ErrorDescription;
|
But I know ASP and not ASP.net or C# and thats why I was trying to use ASP to parse data.
|
|

May 26th, 2008, 10:50 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
|
|
Well your code assumes the web service allows GET requests. If this is the case then you should be able to put the url, with the querystring variables in place, into your browser and see the XML returned.
--
Joe ( Microsoft MVP - XML)
|
|

May 26th, 2008, 10:53 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
|
|
You also try to load the responseBody into a DomDocument, the responseBody is a byte array. You should be using the respon****ML or the responseText.
--
Joe ( Microsoft MVP - XML)
|
|
 |