Link to home
Start Free TrialLog in
Avatar of richardhaeger
richardhaeger

asked on

Problem when pass the symbol '+' as a parameter from classic asp to a web service

Hi everybody,

I'm working with MSXML2.ServerXMLHTTP to use a web service from classic asp. I pass several parameters and everything is working good except when i try to pass a value with the symbol '+'. For example: a value like 'abc+def' is converted to 'abc def' and then it fails because of the validation.

This is my code:

    Set httpReq = New MSXML2.ServerXMLHTTP
    BookID = "1"
    Category = "cf+so"
   webServiceUrl = "http://localhost:1131/WS/MyWebService.asmx/Search?BookID=" & BookID
    webServiceUrl = webServiceUrl & "&Category=" & Category

    httpReq.Open "GET", webServiceUrl, False
    httpReq.send

    Set myXmlDoc = New MSXML2.DOMDocument
    If myXmlDoc.Load(httpReq.responseBody) Then
    .....

When i debug it..this is what the web service receive:    
BookID = "1", Category = "cf so"
As you can see the web service receive a blank space ' ' instead of '+' but i need the '+' to be passed.

Somebody know why is this happening? Any idea?

Regards.


ASKER CERTIFIED SOLUTION
Avatar of LordOfPorts
LordOfPorts
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of richardhaeger
richardhaeger

ASKER

It worked...
Thank you very much!