Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7851657
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T19:13:58+00:00 2026-06-02T19:13:58+00:00

I have webservices at the following link: http://abc.com/asmx I have made the request to

  • 0

I have webservices at the following link:
http://abc.com/asmx

I have made the request to webservice getcustomers using following code:

<%
DIM PostData, strStatus, strRetVal, postUrl

PostData = _
"<?xml version=""1.0"" encoding=""utf-8""?>" &_
"<soap:Envelope xmlns:env=""http://www.w3.org/2001/XMLSchema-instance"" &_
"xmlns:xsd='http://www.w3.org/2001/XMLSchema'" &_
"xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"">" &_
  "<soap:Body>" &_
  " <getCustomer xmlns=""http://3dcart.com/"">" &_
  "<storeUrl>www.abc.stores.com/</storeUrl>" &_
  "<userKey>sdfsf</userKey>" &_
  "<batchSize>1</batchSize>" &_
  "<startNum>1</startNum>" &_
   "<customersFilter>firstname=John</customersFilter>"&_ 
    "<callBackURL></callBackURL>"&_ 
    "</getCustomer>"&_
     "</soap:Body>" &_
"</soap:Envelope>"

response.write("req=" & Server.HTMLEncode(PostData) & "<br/>len=" & len(PostData))
postUrl = "http://abc.com/cart.asmx?op=getCustomer"
Set xmlHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP")
xmlHTTP.open "POST", postUrl, false
xmlHTTP.setRequestHeader "Content-Type", "text/xml; charset=utf-8" 
'xmlHTTP.setRequestHeader "SOAPAction", "http://AvailReceive/AvailRq"
xmlHTTP.send PostData
strStatus = xmlHTTP.Status
strRetval = xmlHTTP.responseText
set xmlHTTP = nothing
response.write("<br/>") 
response.write("status=" & strStatus & "<br/>resp=" & strRetval)
%>

But i am getting error:
resp=soap:ReceiverServer was unable to process request. —> ‘http’ is an unexpected token. Expecting white space. Line 1, position 163.

can you please advise why am i getting this error what is the solution to it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T19:14:01+00:00Added an answer on June 2, 2026 at 7:14 pm

    yes:

    the reason you are getting the 500 error (“expecting white space”) is that your message is malformed. You have several xmlns declarations in the xml message, and because of a bug in your vbscript, there is no space between them. The result is invalid XML, and the server is returning the error because of it.

    Also:

    • You do not actually need the namespace declarations for the prefixes env and xsd in your message. They are never used.
    • you do not need the soap prefix either. You can just set the default XML namespace.
    • you can use single-quotes for the xmlns declarations. This can make the code more readable.
    • you can insert newlines and whitespace in the xml message. This can also make the code more readable, specifically the code for the outbound message.

    Using those suggested changes, Here is some code that works properly:

    Dim msg, strStatus, strRetVal, postUrl
    
    msg = "<?xml version='1.0' encoding='utf-8'?>" &_
             "<Envelope xmlns='http://schemas.xmlsoap.org/soap/envelope/'>" & VbCrLf &_
             "  <Body>" & VbCrLf &_
             "    <getCustomer xmlns='http://abc.com/'>" & VbCrLf &_
             "      <storeUrl>www.abc.com/</storeUrl>" & VbCrLf &_
             "      <userKey>345</userKey>" & VbCrLf &_
             "      <batchSize>1</batchSize>" & VbCrLf &_
             "      <startNum>1</startNum>" & VbCrLf &_
             "      <customersFilter>firstname=John</customersFilter>"& VbCrLf &_
             "      <callBackURL></callBackURL>"& VbCrLf &_
             "    </getCustomer>" & VbCrLf &_
             "  </Body>" & VbCrLf &_
             "</Envelope>"
    
    Response.write("req=" & Server.HTMLEncode(msg) & "<br/>len=" & len(msg))
    
    postUrl = "http://abc.com/cart.asmx?op=getCustomer"
    
    Set xmlHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP")
    xmlHTTP.open "POST", postUrl, false
    xmlHTTP.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
    'xmlHTTP.setRequestHeader "SOAPAction", "http://AvailReceive/AvailRq"
    xmlHTTP.send msg
    
    strStatus = xmlHTTP.Status
    strRetval = xmlHTTP.responseText
    set xmlHTTP = nothing
    Response.write("<br/>")
    Response.write("status=" & strStatus & "<br/>resp=" & strRetval)
    

    But …this code uncovers a runtime error in the .ASMX script.

    resp=Error trying to get data from the store. Technical description: The remote name could not be resolved: ‘www.abc.com’

    If I modify the outgoing message to specify the hostname as abc.com instead of www.abc.com, then I get a reasonable-looking response.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have come up with the following code to call a webservice using client/server
I have been learning RESTful webservices following this tutorial http://www.vogella.de/articles/REST/article.html . As I understand,
I am following a tutorial to consume WSDL in a C# aplication: http://my.execpc.com/~gopalan/dotnet/webservices/webservice_csharp_client.html At
I have out of memory issues with following environment: Tomcat 5.1.23 Using XFire WebServices
I have the following web service that allows me uploading files: [WebService(Namespace = http://tempuri.org/)]
I have to work with webservices in Actionscript. I found the following code that
I want to call the following webservice as mentioend on this link http://dev.joget.org/community/display/KB/JSON+API#JSONAPI-web%2Fjson%2Fworkflow%2Fprocess%2Flist So
I have following webservice: [webmethod] public string MakeReservation(?? PassengersInfo)//what data type use for PassengerInfo
I have the following Webservice and SQL-Query: public class DIENSTLEISTUNG { public string DienstleistungName
Having a deadlock in webservice + hibernate... No idea why. I have the following

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.