|
I need a sample application with .net as a client and soap web services written in java. Authentication has to be done by passing the username and password in soap headers.
This soap headers has to be sent by .net, validated by java web services. upon the validation the actual functions has to be resulted out.
Please help me.
|
|
|
|
|
|
Hi everyone! In my SMS application, I need to send a list of phone numbers to a script on a web sever to be sent to the recipients
Recipients will be selected from a database on the client machine. The number of recipients is over 5000. Additionally, this can rise to over 10,000 some time to come.
Being a newbie in web programming, I would like to know how I can send all these phone numbers to the server. I read that GET method can send small amount of data with the POST method capable of sending large data. However, I do not know the limit to the POST method. Please help. Thanks in advance.
|
|
|
|
|
Looks like it is 8Mb max size for the POST method.
Refer: GET vs POST[^]
|
|
|
|
|
I'm a bit confused.
Do I understand that the client machine will be sending up to 5,000 phone numbers to a web server which will process messages to those recipients?
This is not a web page is it?
How about developing a webservice and send the data to the server using that? I don't of any limits on the size of a webservice data payload. You could also batch the phone numbers into chunks of 500 and call the webservice multiple times.
I just don't understand your problem. It's early monday morning and I'm just having my first cup of coffee.
|
|
|
|
|
It's not a web application David. It's a database application programmed in C# WinForm that does not usually require web access.
The only time web access is required is when a message needs to be sent to members enrolled on the system. Then I will need to send the phone numbers to a php script on a website that will send the message.
My problem now is how I can send all the phone numbers to the script at once. In this case the script will be called only once without calling it multiple times. That's the whole problem David. Any suggestion? Thanks.
|
|
|
|
|
If the list of phone numbers contains only the phone numbers (no delimiters, no other fancy characters) and is a simple newline-delimited text file, then it should be no problem sending it to the server, even with a range of phone numbers much, much larger than what you're talking about (I've actually created a text file with 50,000 numbers, in the format: +40 123 456 789. It took 840kb).
I also think you can set the maximum post size in the server's php.ini configuration file, if of course, you have access to it
EDIT: Yep, found it (in php.ini file), it's this:
post_max_size = 8M
Set this to whatever you need to (even though cases when you'd have to go beyond 8MB are quite rare)
Full-fledged Java/.NET lover, full-fledged PHP hater.
Full-fledged Google/Microsoft lover, full-fledged Apple hater.
Full-fledged Skype lover, full-fledged YM hater.
|
|
|
|
|
Thank you for the clarification. I understand the problem now.
Based on the replies you have received, it appears that you should be able to post the data to the web server without any problems.
I'm getting the feeling that you don't have control over the website which processes the phone numbers and messages.
So, is the problem that you don't know how to create a POST request for the website?
Sorry if I'm not more helpful. Still trying to wrap my head around it.
|
|
|
|
|
I think you should worry about the post size last.
Sounds like there is already a mechanism for submitting phone numbers to the web server, if so, you should get the API for it, and write code that packages your numbers and transmits it as per the API indicates.
If there is not a mechanism, then you need to write one first, and make sure some one like me can't use the mechanism to capture your phone numbers, and then turn around and blast a phoney message to your subscribers.
Your post size is the least of your worries.
|
|
|
|
|
I folks:
I know that CGI is jurassic and before all of you call me lunatic, I must say that this question is only for EDUCATIONAL PURPOSES (in real cases I use JSP).
I'm trying to code a "Hello World" CGI in Java, and I'm unsucessful.
So I try the same job in C#. Both programs (C# and Java) are totally equal (line by line). The C# works and the Java don't.
Here's the code in C#:
namespace CGI_CSharp
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Content-Type: text/html\n"); // the extra "\n" is needed
Console.WriteLine("<html>");
Console.WriteLine("<head>");
Console.WriteLine("<title>CGI - C#</title>");
Console.WriteLine("</head>");
Console.WriteLine("<body>");
Console.WriteLine("<h1>Hello World !</h1>");
Console.WriteLine("</body>");
Console.WriteLine("<html>");
}
}
}
In the browser URL I wrote: http://localhost/CGI_CSharp.exe and BINGO! The C# code WORKS !
Now the same code in Java:
public class CGI_Java
{
public static void main(String[] args)
{
System.out.println ("Content-Type: text/html\n");
System.out.println ("<html>");
System.out.println ("<head>");
System.out.println ("<title>CGI - Java</title>");
System.out.println ("</head>");
System.out.println ("<body>");
System.out.println ("<h1>Hello World !</h1>");
System.out.println ("</body>");
System.out.println ("</html>");
}
}
Now I've tried the URL:
http://localhost/java.exe%20CGI_Java
(as you know, the %20 is the space => (http://localhost/java.exe CGI_Java)
I get:
HTTP 404.0 - Not Found
So, I try again, now with a batch file (CGI_Java.bat) with a single line of text:
java.exe CGI_Java (content of the CGI_Java.bat)
And now, I try the URL:
http://localhost&/CGI_Java.bat
Now the browser shows:
C:\inetpub\wwwroot>java.exe CGI_Java
This is the prompt followed by the command I wrote in the batch file.
Can someone help me?
Thanks in advance.
|
|
|
|
|
With the batch file maybe redirecting the output?
http://www.robvanderwoude.com/battech_redirection.php[^]
Interesting topic, I imagine you are getting the 404 because you are expecting the CGI_Java to be passed as a command line argument. I don't think the browser works that way. Have never tried anything like this but wonder if any querystring variables would be passed as command args like...
http://localhost/java.exe?CGI_Java
???
|
|
|
|
|
Its needs to take the info the customer gives and send it to the company e-mail. there is an issue doing so and i dont know y so if anyone can help a.s.a.p. thank you.
Website in this code i typed as an example. its not the site im working on.
<center>
<TABLE BORDER="0" cellpadding="0" cellspacing="0" width="80%"><TR><TD>
<form method="POST" action="http://www.rs0226.com/php/fm.php" target="_top">
<input type="HIDDEN" name="recipient" value="support@Srs0226.com">
<INPUT TYPE="HIDDEN" NAME="subject" VALUE="Website Comment or Question">
<INPUT TYPE="HIDDEN" NAME="redirect" VALUE="http://www.rs0226.com/thanks.htm">
<INPUT TYPE="HIDDEN" NAME="required" VALUE="email,email_confirm,your_name">
<INPUT TYPE="HIDDEN" name="sort" value="through,your_name,phone,company_name,email,email_confirm,comments">
<TABLE BORDER="0" cellpadding="1" cellspacing="0" width="100%">
<TR><TD>
Name:<br>
</TD></TR><TR><TD>
<INPUT TYPE="TEXT" NAME="your_name" SIZE="30" class="shadeform"><br>
</TD></TR><TR><TD>
Company:<br>
</TD></TR><TR><TD>
<INPUT TYPE="TEXT" NAME="company_name" SIZE="30" class="shadeform"><br>
</TD></TR><TR><TD>
Phone:<br>
</TD></TR><TR><TD>
<INPUT TYPE="TEXT" NAME="phone" SIZE="30" class="shadeform"><br>
</TD></TR><TR><TD>
Email:<br>
</TD></TR><TR><TD>
<INPUT TYPE="TEXT" NAME="email" SIZE="30" class="shadeform"><br>
</TD></TR><TR>
<TD>
Please confirm your email:<br></TD></TR><TR><TD>
<INPUT TYPE="TEXT" NAME="email_confirm" SIZE="30" class="shadeform"><br>
</TD></TR><TR><TD>
How did you find our website?<br>
</TD></TR><TR><TD>
<select name="through" class="dropdown">
<option selected value="None selected">Please Select One ----></option>
<option value="AOLFind">AOL</option>
<option value="Ask_Jeeves">Ask Jeeves</option>
<option value="Google">Google</option>
<option value="Hotbot">Hotbot</option>
<option value="Lycos">Lycos</option>
<option value="MSN">MSN</option>
<option value="yahoo">Yahoo</option>
<option value="Friend">Friend</option>
<option value="Website">Another Website</option>
<option value="News_Group">News Group</option>
<option value="Magazine Newspaper">Magazine/Newspaper</option>
<option value="Radio">Radio</option>
<option value="Other">Other</option>
</select><br>
<br>
</TD></TR><TR>
<TD>
Comments or questions:<br></TD></TR><TR><TD>
<TEXTAREA NAME="comments" ROWS="9" COLS="35" class="textarea"></TEXTAREA>
<br><br>
<input type="submit" value="Send Info" class="button" onMouseOver="this.className='buttonon'" onMouseOut="this.className='button'">
<input type="reset" value="Clear Form" class="button" onMouseOver="this.className='buttonon'" onMouseOut="this.className='button'">
<br>
</td></tr></table>
</FORM>
If anyone knows of any banner making sites that make banners for FREE then please let me know.
|
|
|
|
|
You mean like this: CoolText[^]
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
yes thank you that is an awesome banner site. much thanks and ill be using that site alot.
|
|
|
|
|
Still need Help with the HTML and/or CSS "Contact Me" page (Prefer HTML but if not then ill give CSS a try...) its <b>not</b> letting me recive information from the costermers . would be VERY greatful if i could recive this much needed help . I need to Turn this Project in A.S.A.P. ...
|
|
|
|
|
System.InvalidOperationException: There was an error reflecting 'string'. ---> System.InvalidOperationException: There was an error reflecting type
'WebApplication1.Javawebservice.string'. ---> System.InvalidOperationException: Types 'WebApplication1.Javawebservice.string' and
'WebApplication1.Javawebservice.string1' both use the XML type name, 'string', from namespace 'http://www.w3.org/2001/XMLSchema'.
Use XML attributes to specify a unique XML name and/or namespace for the type.
at System.Xml.Serialization.XmlReflectionImporter.GetTypeMapping(String typeName, String ns, TypeDesc typeDesc, NameTable typeLib, Type type)
at System.Xml.Serialization.XmlReflectionImporter.ImportStructLikeMapping(StructModel model, String ns, Boolean openModel, XmlAttributes a, RecursionLimiter limiter)
at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel, RecursionLimiter limiter)
--- End of inner exception stack trace ---
at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel, RecursionLimiter limiter)
at System.Xml.Serialization.XmlReflectionImporter.ImportAccessorMapping(MemberMapping accessor, FieldModel model, XmlAttributes a, String ns, Type choiceIdentifierType, Boolean rpc, Boolean openModel, RecursionLimiter limiter)
at System.Xml.Serialization.XmlReflectionImporter.ImportMemberMapping(XmlReflectionMember xmlReflectionMember, String ns, XmlReflectionMember[] xmlReflectionMembers, Boolean rpc, Boolean openModel, RecursionLimiter limiter)
at System.Xml.Serialization.XmlReflectionImporter.ImportMembersMapping(XmlReflectionMember[] xmlReflectionMembers, String ns, Boolean hasWrapperElement, Boolean rpc, Boolean openModel, RecursionLimiter limiter)
--- End of inner exception stack trace ---
at System.Xml.Serialization.XmlReflectionImporter.ImportMembersMapping(XmlReflectionMember[] xmlReflectionMembers, String ns, Boolean hasWrapperElement, Boolean rpc, Boolean openModel, RecursionLimiter limiter)
at System.Xml.Serialization.XmlReflectionImporter.ImportMembersMapping(String elementName, String ns, XmlReflectionMember[] members, Boolean hasWrapperElement, Boolean rpc, Boolean openModel, XmlMappingAccess access)
at System.Web.Services.Protocols.SoapReflector.ImportMembersMapping(XmlReflectionImporter xmlImporter, SoapReflectionImporter soapImporter, Boolean serviceDefaultIsEncoded, Boolean rpc, SoapBindingUse use, SoapParameterStyle paramStyle, String elementName, String elementNamespace, Boolean nsIsDefault, XmlReflectionMember[] members, Boolean validate, Boolean openModel, String key, Boolean writeAccess)
at System.Web.Services.Protocols.SoapReflector.ReflectMethod(LogicalMethodInfo methodInfo, Boolean client, XmlReflectionImporter xmlImporter, SoapReflectionImporter soapImporter, String defaultNs)
|
|
|
|
|
Though you have not shared much on what were you trying to do and what the XML looks like, based on the stack trace it looks like there is duplicate nodes name.
Here:
Anuradhaanu wrote: Types 'WebApplication1.Javawebservice.string' and 'WebApplication1.Javawebservice.string1' both use the XML type name, 'string'
Read all about it here: MSDN: Deserialization Problems Caused by Duplicate Node Names[^]
Find the duplicate class and remove it. Similar thing happened[^] with him and he too removed the duplicate.
|
|
|
|
|
Good Day Guys
This is an MVC , JQuery, KNockout.js Question.
i have a Controller Action that is being Defined like this
[HttpGet]
public JsonResult SearchCars(string searchString)
{
string[] searchTerms = (searchString).ToUpper().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
string[] searchTermSounds = new string[searchTerms.Length];
var list = (from r in Cache.CarSearchItems
select new Lightstone.UI.Web.LaceWebUI.Models.CarItem(r, searchTerms, searchTermSounds)).ToList();
var list1 = list.Distinct()
.Take(5)
.OrderByDescending(l => l.Hits).ToList();
return Json(list1, JsonRequestBehavior.AllowGet);
}
and i have a Jquery function that gets fired onkey up event is fired in a textbox like this
$(function () {
$("#txtSearchString").keyup(function () {
$("#txtSearchString").queue(function
() {
var _this = $(this);
_this.addClass("newcolor");
_this.dequeue();
});
if ($("#txtSearchString").val().length >= 3) {
var data = {}
data.searchString = $("#txtSearchString").val();
alert("Retrieving Data");
$.getJSON("/Cars/SearchCars", data, function (result) {
var viewModel = null;
viewModel =
{
SearchOptions: ko.observableArray(result)
}
alert("Done Retrieving Data");
if (viewModel == null || viewModel == undefined) {
alert("The ViewModel is null or Undefined");
alert("Done with the View Model");
}
else {
ko.applyBindings(viewModel);
alert("THe View Model is no Null");
}
});
}
})
});
dont mind my alerts i use them to check the code reaches the place that i want it to reach. I can get the Jason the first time and this is the order of my alerts
alert("Retrieving Data");
alert("Done Retrieving Data");
alert("THe View Model is no Null");
and then i bind the data to my HTML view as depicted below
<table id="tblsearchresults" data-bind="foreach:SearchOptions" class="auto-style1">
<tr>
<td rowspan="5">
<img data-bind="attr: {src: Url}" class="" />
</td>
<td>Make:</td>
<td>
<div data-bind="text: Make">
</div>
</td>
<td> </td>
</tr>
<tr>
<td>Model:</td>
<td>
<div data-bind="text: Model">
</div>
</td>
<td> </td>
</tr>
<tr>
<td>Year:</td>
<td>
<div data-bind="text: Year">
</div>
</td>
<td> <a data-bind="attr: { href: UrlRedirect }">
View Report</a>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
and i see the data when i search for the first time and the images appears nicely and then the Problem start when i change my search string lets say i now type "FORD"
<input id="txtSearchString" name="txtSearchString" class="searchText" />
and it does not return results, when i look at the F12 debugging tool in chrome it point to my JavaScript in the following line
ko.applyBindings(viewModel);
and in my
Uncaught Error: NOT_FOUND_ERR: DOM Exception 8 knockout-2.1.0.js:46
a.e.Fa knockout-2.1.0.js:46
a.a.Oa knockout-2.1.0.js:81
a.Fb.a.h.disposeWhenNodeIsRemoved knockout-2.1.0.js:75
e knockout-2.1.0.js:34
a.h knockout-2.1.0.js:36
a.Fb knockout-2.1.0.js:75
a.c.template.update knockout-2.1.0.js:76
a.c.foreach.update knockout-2.1.0.js:66
a.h.disposeWhenNodeIsRemoved knockout-2.1.0.js:51
e knockout-2.1.0.js:34
a.h knockout-2.1.0.js:36
d knockout-2.1.0.js:49
c knockout-2.1.0.js:49
b knockout-2.1.0.js:49
c knockout-2.1.0.js:49
b knockout-2.1.0.js:49
c knockout-2.1.0.js:49
b knockout-2.1.0.js:49
c knockout-2.1.0.js:49
b knockout-2.1.0.js:49
c knockout-2.1.0.js:49
b knockout-2.1.0.js:49
c knockout-2.1.0.js:49
a.xa knockout-2.1.0.js:52
(anonymous function) AutoCompleteResults.js:33
jQuery.Callbacks.fire jquery-1.7.2.js:1075
jQuery.Callbacks.self.fireWith jquery-1.7.2.js:1193
done jquery-1.7.2.js:7538
jQuery.ajaxTransport.send.callback jquery-1.7.2.js:8324
So everytime i do my search for the first time it works but for the second time it does not.
One other solution that i need is to delay the call of the keypress for 250 milliseconds.
Thanks
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa[at]dotnetfunda.com
http://www.Dotnetfunda.com
|
|
|
|
|
The Problem happens when Knockout tries to Bind the ViewModel to the same node multiple times. seting the viewmodel to null will not work , so to resolve this i explicidly binded the tablelement, and after that i clear the node before i bind a Viewmodel
ko.cleanNode(document.getElementById("tblsearchresults"));
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa[at]dotnetfunda.com
http://www.Dotnetfunda.com
|
|
|
|
|
java method
@WebMethod(operationName="security", action="WsAuthentication")
// @WebResult(name="answer")
public String security(@WebParam(header=true, mode=Mode.IN, name="user" ) String user, @WebParam(header=true, mode=Mode.IN, name="password") String password) {
WsAuthentication secure = new WsAuthentication(user, password);
if (user.equals("IDS")&& password.equals("YES"))
{
return "true";
}
else
{
return "false";
}
}
By adding the reference to .net client
Iam not able able to instantiate the service
Method WsAuthentication.security can not be reflected. Exception is raising , how to access the function or use the other functions in the web service. please help me.
|
|
|
|
|
Need help in writing a java soap web service with soap header.
.net client should pass the user name and password in soap header to java web service.
on authentication the function should be accessible to .net client.
How can I achieve this please help me.
|
|
|
|
|
Please do not post the same question in multiple forums. I have already responded this in the Java forum.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
i want to know how to use tracing and when to use it , i want to know why it is found in visual studio ?
|
|
|
|
|
As mentioned in MSDN, Tracing: These are statements that are intended to help track the flow of control and state of the program as it’s executing.
Imagine running a debugger, stepping along through code and checking the values of key variables in the Watch window. Tracing statements are intended to replicate that experience in cases where you can’t attach a debugger. They should ideally provide enough context that you can see which path is taken at each control point in the application and sort of follow along in the code from reading the trace statements. Tracing is enabled when the TRACE preprocessor symbol is defined at compile time, and can be in both release and debug builds. (By default, Visual Studio defines TRACE in both debug and release builds, but you can of course change this.)
About how to use it, follow these: MSDN: Configuring Tracing[^]
Actually, all you want to know about tracing: MSDN: Tracing[^]
Also go through this MSDN Support article: MSDN Support: How to trace and debug in Visual C#[^]
|
|
|
|
|
Think Sandeep addressed the "how to" pretty well... as to why... well, because it works very well, I've found it particularly useful when troubleshooting bugs in multi-threaded applications. Subtle bugs are sometimes almost impossible to find with other methods (such as breakpoints), so tracing gives you the ability to add debug code that will be printed and can be analyzed after the fact (similar to a log file).
|
|
|
|
|