ASP.NET Web Service with XMLretruning TEXT not XML

 
Post new topic   Reply to topic    Aprelium Forum Index -> ASP.NET
View previous topic :: View next topic  
Author Message
Paul123
-


Joined: 31 Jan 2009
Posts: 13

PostPosted: Tue Sep 10, 2013 4:18 pm    Post subject: ASP.NET Web Service with XMLretruning TEXT not XML Reply with quote

Hi Reader,
I have created a WS which receives and returns XML. The WS works on my IIS6 Web server but not on my Abyss 2.8 X" Web server.

The WS comprises of:-

[WebMethod]
//<?xml version="1.0" encoding="UTF-8"?><traceabilityRequest><authenticationCode>xxxxxx</authenticationCode><vPlusCode>051301100013ECC</vPlusCode></traceabilityRequest>
public XmlDocument traceabilityRequest(string XMLtraceabilityRequest)
{
string[] arryTraceabilityRequest = new string[2];

XmlDocument docRequest = new XmlDocument();
docRequest.LoadXml(XMLtraceabilityRequest);

XmlNodeList nlTR = docRequest.SelectNodes("traceabilityRequest");
XmlNode root = nlTR[0];
int i = 0;
foreach (XmlNode node in root.ChildNodes)
{
string name = node.Name;
string value = node.InnerText;
arryTraceabilityRequest[i] = name + "|" + value;
i++;
}
string[] vPlusCode = arryTraceabilityRequest[1].Split(new Char[] { '|' });

clsSQL ClsSQL = new clsSQL();
return(ClsSQL.GetTraceabilityResponse(vPlusCode[1]));
}


and my dataset class consists of:-

public XmlDocument GetTraceabilityResponse(string vPlusCode)
{
OpenConn();
SqlCommand cmd = new SqlCommand("dbo.MyStyleTraceabilityResponse", SqlCon);
cmd.Parameters.AddWithValue("@MyStyleCode", vPlusCode);
cmd.CommandType = CommandType.StoredProcedure;

XmlDocument XMLDoc = new XmlDocument();
using (XmlReader XMLRdr = cmd.ExecuteXmlReader())
{
if (XMLRdr.Read())
{
string strXML = XMLRdr.ReadOuterXml();
XMLDoc.LoadXml(strXML);
}
}

return (XMLDoc);
}


SQL Server is generating the data with a "FOR XML" output. As I say works in IIS not Abyss. Any ideas?
Back to top View user's profile Send private message
Paul123
-


Joined: 31 Jan 2009
Posts: 13

PostPosted: Wed Sep 11, 2013 4:36 pm    Post subject: Reply with quote

Guys I have now resolved the issue. Seems the XML is restricted on an SSL connection! I can now get the returned XML as expected, HOWEVER, I wish for the service to be viewable via the WSDL but when I append ?WSDL to the address (i.e http://www.xxxxx.co.uk/traceability2/service.asmx/traceabilityRequest?wsdl) the server returns a HTTP 500 error - cannot display page!!

Is there any way to resolve this?

Thanks
Paul123
Back to top View user's profile Send private message
aprelium-support
-


Joined: 20 Feb 2009
Posts: 356

PostPosted: Thu Sep 12, 2013 10:24 pm    Post subject: Reply with quote

Paul123,

Error 500 usually means that there was an error even before the ASP.NET framework could process the page/handler. So it is probably interesting to track that issue first.

Please contact our technical support so that we can work with you on solving this issue and finding its cause.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Visit poster's website
Paul123
-


Joined: 31 Jan 2009
Posts: 13

PostPosted: Wed Nov 13, 2013 1:09 pm    Post subject: Reply with quote

Hi aprelium-support,
many thanks I have resolved this.
Back to top View user's profile Send private message
aprelium-support
-


Joined: 20 Feb 2009
Posts: 356

PostPosted: Sat Nov 16, 2013 9:29 am    Post subject: Reply with quote

Paul123 wrote:
Hi aprelium-support,
many thanks I have resolved this.


Out of curiosity, can you let us know what was the problem?
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> ASP.NET All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group