15,868,016 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by sairanga (Top 4 by date)
sairanga
11-Sep-12 6:19am
View
Deleted
How to create json web services using java platform?
sairanga
11-Sep-12 1:06am
View
Hey this was my code i am getting no response it was showing white screen.......
sairanga
11-Sep-12 1:03am
View
//This is my server side code in java web services
public class Demoapp {
//web method getname
public String getname(){
String s="HI this is First";
return s;
}
}
//This was my client side code using javascript
var settings = {requestType:"soap1.1",
error:function(XMLHttpRequest, textStatus, errorThrown){
throw XMLHttpRequest.responseText;
}};
var oBuffer = new Array();
settings.requestType = "soap1.1";
settings.methodType = "POST";
settings.contentType = "text/xml";
settings.url = "http://192.168.1.5:8080/Demoweb/services/Demoapp?wsdl";
settings.dataType = "text/xml";
settings.nameSpace = "http://Demoweb/";
settings.methodName = "getname";
oBuffer.push('<soap:envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">');
oBuffer.push("<soap:body>");
oBuffer.push('<getname xmlns="http://Demoweb/">');
oBuffer.push('<vc>getname');
oBuffer.push("");
oBuffer.push("");
oBuffer.push("");
settings.requestData = oBuffer.join("");
alert("requestData:" + settings.requestData);
$.ajax({
type: settings.methodType,
cache: false,
url: settings.url,
data: settings.requestData,
contentType: settings.contentType,
dataType: settings.dataType,
error: function(status){ alert("An error occurred in processing your request");},
success: function(data, testStatus){
alert('data = ' + data);
$('#testp').html(data);
},
beforeSend: function(XMLHttpRequest){
if (settings.requestType == "soap1.1" || settings.requestType== "soap1.2")
XMLHttpRequest.setRequestHeader("SOAPAction",settings.nameSpace + settings.methodName);
XMLHttpRequest.setRequestHeader("Content-Length",settings.requestData.length);
XMLHttpRequest.setRequestHeader("Connection", "close"); } });
sairanga
10-Sep-12 14:02pm
View
Sir,
Thank you for reply,
I have already tried these examples.But i didn't get any response from client side even it was not hitting the server. I am using java web services on server side and i am trying to call those methods and url from client side using either java script(or)Jquery.Here the example contains asp.net web services.
Is it work for me.I am new to this platform please suggest me how to do this..