Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP XML Using ASP 3 and XML. See also the XML category for more XML discussions not relating to ASP. NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP 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
  #1 (permalink)  
Old July 11th, 2008, 10:32 AM
Registered User
 
Join Date: Jul 2008
Location: Dallas, TX, USA.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default still trying to get webservice to work

I have found that when the xml message inside the soap:body has the xml declaration that it throws this error
Code:
HTTP/ASMX Message Receive Failure: System.Xml.XmlException: Unexpected XML declaration. The XML declaration must be the first node in the document, and no white space characters are allowed to appear before it. Line 1, position 951.
However, If i remove the xml declaration inside the soap:body this is what is returned
Code:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
 <wsa:Action>http://schemas.xmlsoap.org/ws/2004/03/addressing/fault</wsa:Action>
 <wsa:MessageID>uuid:ae568a6b-172f-4379-b62f-c48cc72dac9e</wsa:MessageID>
 <wsa:RelatesTo>uuid:e39ef88e-5256-4080-bec0-4271cb443606</wsa:RelatesTo>
 <wsa:To>http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous</wsa:To>
 <wsse:Security>
  <wsu:Timestamp wsu:Id="Timestamp-73fa896a-2ed9-472d-9e97-476076d1174a">
   <wsu:Created>2008-07-11T14:53:45Z</wsu:Created>
   <wsu:Expires>2008-07-11T14:58:45Z</wsu:Expires>
  </wsu:Timestamp>
 </wsse:Security>
</soap:Header>
<soap:Body>
 <soap:Fault>
  <faultcode>soap:Client</faultcode>
  <faultstring>The message is not a valid XML message</faultstring>
  <faultactor>https://ws.fastraxonline.com/FastraxRequest/FastraxNetwork.asmx</faultactor>
 </soap:Fault>
</soap:Body>
</soap:Envelope>
I have tried enclosing the entire xmlmessage node inside the soap:body in CDATA, as well as the just the xmlmessage node's xml declaration and that did not work.

Does anyone know what I have to do to get this to work? The webservice I am trying to consume is written in C# and unfortunately the server that this site is on does not have asp.net enabled on it so I can not use C# to consume the webservice and need to find a way to consume the webservice.



Similar Threads
Thread Thread Starter Forum Replies Last Post
to know Webservice vingo_mail ASP.NET 2.0 Basics 1 March 3rd, 2008 01:16 PM
Webservice listener dcrooks .NET Web Services 0 February 18th, 2005 05:33 PM
Help me about WebService hueduongit .NET Web Services 2 June 3rd, 2004 09:51 PM
webservice hanuyedluri .NET Web Services 1 March 21st, 2004 05:16 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.