View previous topic :: View next topic |
Author |
Message |
Paul123 -
Joined: 31 Jan 2009 Posts: 13
|
Posted: Tue Sep 10, 2013 4:18 pm Post subject: ASP.NET Web Service with XMLretruning TEXT not XML |
|
|
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 |
|
|
Paul123 -
Joined: 31 Jan 2009 Posts: 13
|
Posted: Wed Sep 11, 2013 4:36 pm Post subject: |
|
|
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 |
|
|
aprelium-support -
Joined: 20 Feb 2009 Posts: 356
|
Posted: Thu Sep 12, 2013 10:24 pm Post subject: |
|
|
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 |
|
|
Paul123 -
Joined: 31 Jan 2009 Posts: 13
|
Posted: Wed Nov 13, 2013 1:09 pm Post subject: |
|
|
Hi aprelium-support,
many thanks I have resolved this. |
|
Back to top |
|
|
aprelium-support -
Joined: 20 Feb 2009 Posts: 356
|
Posted: Sat Nov 16, 2013 9:29 am Post subject: |
|
|
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 |
|
|
|