Can somebody help me please =(

Jul 19 2007 12:33 AM

I created a webservice that communicates with angel.com. basically angel.com is expecting an xml format as a response from my webservice. my web service can generate an xml formated as to what angel.com understands. it is called ANGELXML and this is the format:

<ANGELXML>
   <VARIABLES>
      <VAR name="ZIPCODE" value= "00501"/>");
   </VARIABLES>
</ANGELXML>

but after angel.com recieves the xml it returns an error:

Transaction Page Test Results    
Test Failed
You requested to interpret the HTTP response as an XML File. The following errors were encountered while generating the transaction page:
XML error:
Document root element "string", must match DOCTYPE root "ANGELXML".
Element type "string" must be declared.
.
Response Time
1.328 seconds
Server Response
<?xml version="1.0" encoding="utf-8"?>
<string xmlns="http://tempuri.org/">&lt;!DOCTYPE ANGELXML [&lt;!ELEMENT ANGELXML (VARIABLES)&gt;&lt;!ELEMENT VARIABLES (VAR*)&gt;&lt;!ELEMENT VAR EMPTY&gt;]&gt;&lt;ANGELXML&gt;&lt;MESSAGE&gt;&lt;PLAY&gt;&lt;PROMPT type="text"&gt;The following AngelXML sets 1 variable acct_num and vendor_id, and then proceeds to Voice Page #100.&lt;/PROMPT&gt;&lt;/PLAY&gt;&lt;/MESSAGE&gt;&lt;VARIABLES&gt;&lt;VAR name="TLCZIPCODE" value= "19019"/&gt;&lt;/VARIABLES&gt;&lt;/ANGELXML&gt;</string>
Server back-end stack trace:

com.mstr.vpage.dynamic.DynamicXMLException: Document root element "string", must match DOCTYPE root "ANGELXML".
Element type "string" must be declared.
	at com.mstr.vpage.dynamic.ResponseParser.generateVPageFromXML(ResponseParser.java:127)
	at com.mstr.vpage.dynamic.ResponseParser.parse(ResponseParser.java:58)
	at com.mstr.vpage.dynamic.ResponseSubmittor.generateDynamicContent(ResponseSubmittor.java:58)
	at com.mstr.vpage.dynamic.ResponseSubmittor.generateDynamicContent(ResponseSubmittor.java:35)
	at com.mstr.servlet.ResponseTestServlet.testDynamicPageExec(ResponseTestServlet.java:59)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at com.mstr.servlet.BaseServlet.executeCommand(BaseServlet.java:433)
	at com.mstr.servlet.WebAuthenticationServlet.authorizedService(WebAuthenticationServlet.java:438)
	at com.mstr.servlet.WebAuthenticationServlet.authenticatedService(WebAuthenticationServlet.java:259)
	at com.mstr.servlet.AuthenticationServlet.myService(AuthenticationServlet.java:71)
	at com.mstr.servlet.BaseServlet.service(BaseServlet.java:90)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
	at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
	at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
	at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
	at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
	at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
	at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
	at java.lang.Thread.run(Thread.java:595)


THIS IS MY CODE INSIDE MY WEBSERVICE








StringBuilder angelxml = new StringBuilder();

try

{

_sqlconn = new SqlConnection(ConfigurationManager.AppSettings["sqlConnString"]);

_sqlconn.Open();

_sqlcmd = new SqlCommand("NEARESTLOCATION", _sqlconn);

_sqlcmd.CommandType = CommandType.StoredProcedure;

_sqlcmd.Parameters.Add("@ZIPCODE", SqlDbType.NVarChar).Value = ZipCode;

_sqladapter = new SqlDataAdapter(_sqlcmd);

_sqladapter.Fill(_ds);

strNearestZip = _ds.Tables[0].Rows[0]["ZipCode"].ToString();

angelxml.Append("<ANGELXML>");

angelxml.Append("<VARIABLES>");

angelxml.Append("<VAR name=\"TLCZIPCODE\" value= \"" + strNearestZip + "\"/>");

angelxml.Append("</VARIABLES>");

angelxml.Append("</ANGELXML>");

}

catch (Exception ex)

{

}

finally

{

_sqlconn.Close();

_sqlconn.Dispose();

_sqlcmd.Dispose();

_sqladapter.Dispose();

}

return "<!DOCTYPE ANGELXML [<!ELEMENT ANGELXML (VARIABLES)><!ELEMENT VARIABLES (VAR*)><!ELEMENT VAR EMPTY>]>" + angelxml.ToString();



Answers (1)