Click here to Skip to main content
15,902,276 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: simple Pin
_AK_24-Aug-06 21:02
_AK_24-Aug-06 21:02 
AnswerRe: simple Pin
Guffa24-Aug-06 22:37
Guffa24-Aug-06 22:37 
QuestionJavascript DateAdd function Pin
Nitin198124-Aug-06 18:59
Nitin198124-Aug-06 18:59 
AnswerRe: Javascript DateAdd function Pin
_AK_24-Aug-06 21:07
_AK_24-Aug-06 21:07 
AnswerRe: Javascript DateAdd function Pin
Guffa24-Aug-06 22:40
Guffa24-Aug-06 22:40 
GeneralRe: Javascript DateAdd function Pin
Nitin198125-Aug-06 0:00
Nitin198125-Aug-06 0:00 
AnswerRe: Javascript DateAdd function Pin
Guffa25-Aug-06 2:33
Guffa25-Aug-06 2:33 
QuestionASP.NET 1.1 WebService works fine when called from JavaScript -- but when a simple parameter is passed from JavaScript using a SOAP Envelope, it is not received in the WebService - what gives ? Pin
Fine Foot24-Aug-06 10:04
Fine Foot24-Aug-06 10:04 
I am able to access and consume my ASP.NET 1.1 WebService from JavaScript (and in fact from a Windows App). No problem.
When I pass a simple string parameter into the WebMethod it is accepted and processed successfully when called from a Windows App.
When I pass the same simple string parameter thru the SOAP Envelope from JavaScript, the WebMethod does NOT receive the param properly.
I am not sure what is missing. The same SOAP syntax works for me in other WebService calls. Why not in this simple case ?
Do I need to dig deeper into my setRequestHeader for some missing header ? Could this be a security related problem ?
I have tried many permutations and reduced the test to a very simplified case shown below:

C# WebService code --
[WebService(Namespace="FinfootSystemsGroupWebServicesNameSpace")]
public class WangoTango : System.Web.Services.WebService
{
public WangoTango()
{
InitializeComponent();
}

[WebMethod]
public string NudgeNudgeWinkWink(string foo)
{
return "|" + foo + "|";
}
}

In JavaScript I set up the following HEADER:

var strContentType = "text/xml"
var strMethodName = "NudgeNudgeWinkWink"
var strNameSpace = "FinfootSystemsGroupWebServicesNameSpace"
var strServiceUrl = "http://localhost/FinfootSystemsGroupWebServiceTest001/WangoTango.asmx"

objXmlHttp.open("POST", strServiceUrl, true);
objXmlHttp.setRequestHeader("MessageType", "CALL")
objXmlHttp.setRequestHeader("Content-Type", strContentType)
objXmlHttp.setRequestHeader("SOAPAction", strNameSpace + '/' + strMethodName);

objXmlHttp.onreadystatechange = getWebServiceResultsAfterLoad

objXmlHttp.send(strEnvelope);

Here is the actual SOAP envelope passed:

<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<ns1:NudgeNudgeWinkWink xmlns:ns1="urn:FinfootSystemsGroupWebServicesNameSpace" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<foo xsi:type="string">TestString</foo>
</ns1:NudgeNudgeWinkWink>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Here is the *empty* xmlhttp responsetext returned:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<NudgeNudgeWinkWinkResponse xmlns="FinfootSystemsGroupWebServicesNameSpace">
<NudgeNudgeWinkWinkResult>||</NudgeNudgeWinkWinkResult>
</NudgeNudgeWinkWinkResponse>
</soap:Body>
</soap:Envelope>

The result is missing the incoming parameter value. What happened to the parameter "TestString" that was passed into the WebService.

Any ideas or suggested directions would be greatly appreciated.
AnswerRe: ASP.NET 1.1 WebService works fine when called from JavaScript -- but when a simple parameter is passed from JavaScript using a SOAP Envelope, it is not received in the WebService - what gives ? Pin
Fine Foot24-Aug-06 11:17
Fine Foot24-Aug-06 11:17 
QuestionAnything like codebehind for .asp? [modified] Pin
veekay824-Aug-06 9:44
veekay824-Aug-06 9:44 
AnswerRe: Anything like codebehind for .asp? Pin
Guffa24-Aug-06 10:56
Guffa24-Aug-06 10:56 
QuestionPage Performance Pin
Amit Kumar G24-Aug-06 7:40
Amit Kumar G24-Aug-06 7:40 
AnswerRe: Page Performance Pin
Guffa24-Aug-06 11:24
Guffa24-Aug-06 11:24 
GeneralRe: Page Performance Pin
Amit Kumar G24-Aug-06 12:49
Amit Kumar G24-Aug-06 12:49 
AnswerRe: Page Performance Pin
Guffa24-Aug-06 19:01
Guffa24-Aug-06 19:01 
Questionjavascript include Pin
peterzorbas24-Aug-06 7:17
peterzorbas24-Aug-06 7:17 
AnswerRe: javascript include Pin
Nitin198124-Aug-06 19:05
Nitin198124-Aug-06 19:05 
QuestionWeb Site Installation - Port issue Pin
alexfromto24-Aug-06 4:59
alexfromto24-Aug-06 4:59 
Questionpassing controlid in javascript Pin
TintinV3ck24-Aug-06 4:06
TintinV3ck24-Aug-06 4:06 
AnswerRe: passing controlid in javascript Pin
TintinV3ck24-Aug-06 4:16
TintinV3ck24-Aug-06 4:16 
QuestionHelp! Download file dialog box has garbage words in ASP! Pin
Lane Yu24-Aug-06 0:27
Lane Yu24-Aug-06 0:27 
QuestionAutosave using Ajax in every 10 sec. with .Net Pin
Amit Agarrwal23-Aug-06 20:33
Amit Agarrwal23-Aug-06 20:33 
AnswerRe: Autosave using Ajax in every 10 sec. with .Net Pin
JimmyRopes1-Sep-06 20:21
professionalJimmyRopes1-Sep-06 20:21 
GeneralRe: Autosave using Ajax in every 10 sec. with .Net Pin
Amit Agarrwal1-Sep-06 21:06
Amit Agarrwal1-Sep-06 21:06 
GeneralRe: Autosave using Ajax in every 10 sec. with .Net Pin
JimmyRopes3-Sep-06 4:39
professionalJimmyRopes3-Sep-06 4:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.