Access Webservice Developed Using C# Using Java Client Without Crossdomain.xml File
Nov 27, 2010Can we access a c# webservice using java client , even if there is no crossdomain.xml file present on for eg, IIS?
View 1 RepliesCan we access a c# webservice using java client , even if there is no crossdomain.xml file present on for eg, IIS?
View 1 RepliesI am using this clientaccesspolicy.xml file
<?xml version="1.0" encoding="utf-8"?> <access-policy>
<cross-domain-access> <policy> <allow-from http-request-headers="SOAPAction">
<domain uri="*"/> </allow-from> <grant-to>
<resource path="/" include-subpaths="true"/>
</grant-to> </policy> </cross-domain-access> </access-policy>
And trying to access webservice using javascript in my subdomain, but its not working in FF, working fine in IE. I have also tried using crossdomain.xml file which too works fine in IE, but not in FF.
How do I protect a webservice if it is called from ajax ?
Update: I realize that my question didn't reflect what I intended to ask. I don't want user to be able to do the request by pointing to it with its webbrowser but only in the context of my app.
Here's my problem: I have an asp.net app that invokes a java/axis based webservice through a wsdl file provided by my customer. But, as i had no access to this webservice at the dev time, i've created a fake .net based webservice, with the same methods, returning some valid data, so i'd be able to test the integration interface. The problem is, when i add the service reference on my app, pointing to my fake webservice (.net), it's class has a certain name, and when i point it to my customer's wsdl file, it's class has a different name. Generated class name when i add the service reference by:
- .NET fake webservice = "TransferenciaEndpointSoapClient"
- wsdl file of the java/axis webservice = "TransferenciaEndpointClient"
I want the class i've created in my fake webservice to keep the same name of the wsdl, when i add the service reference on my app. I tried to add a "web reference" instead of a "service reference", but it did not work. I also tried to change the name of the class on the "Reference.cs" file, it works on my environment, but it doesn't when i put the generated bin on my customer's environment. I'd like to solve this without having to create a java/axis based fake webservice.
I need to call a Java webservice from my ASP.Net application. The webservice uses Java Key Store (JKS) certificate. Could some one help me with how I could do this? As a side note, when I try to add Web Reference or Service Reference to my Visual Studio project by providing the WSDL, Visual Studio always crashes.
View 1 RepliesI am using Asp.Net application for calling an existing Java webservice. Recently the web service is configured with Security certificates. Now I need to call the webservice using "https:URL .." and by passing the credentials i.e. UserId and Password.
When I call the webservice using [URL] I get the below error. Is the change in my code is causing this error?
Error:Client found response content type of 'text/html; charset=iso-8859-1', but expected 'text/xml'. The request failed with the error message: --
500 Internal Server Error
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request. contact the server administrator, you@your.address and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log.
IBM_HTTP_Server Server at ............ Port 443
i have a discussion going on in the organisation where i am employed as a consultant. The discussion revolves around the replacement of a application built using VB6(MDI) thick client. This application has around 100 screen + 40 reports. Used by approx 400 users the reports and the data are pulled using inline queries while the db structure is pretty normalized . the rest of the code is pretty bad. While discussing replenishment strategies we are throwing around a few ideas.
J2EE Web application running on Web sphere using Crystal reports for Reports. ASP.NET web forms web application using crystal reports for reports. Windows Client application (WPF/Win-forms) with reporting services for the reports.
While i don't want to start a flame war(Dot net vs Java or WEb vs Desktop) it would be nice to know the community thoughts on the matter. Just to be upfront i feel that option 3 maybe the best version. ut i would like to know the opinions of others.
How to invoking java web service(WSDL) with c# client (web application).Java web service methods is proxy.object will be created in client C#.Then how to call that proxy method in c# client? how to test that java web service in c# client side?
View 1 RepliesI'm currently trying to READ XML file from the client machine where the user can open from any location (there is no specific location). However, i browse to the folder and select the xml file and when it execute this line (below) it throw an error complaining about access to the path is denied any idea how should i approach?
error: System.UnauthorizedAccessException: Access to the path is Denied
Dim reader As New XmlTextReader(System.IO.Path.GetFullPath(File1.PostedFile.FileName))
Dim m_xmlr As XmlTextReader
'Create the XML Reader
m_xmlr = New XmlTextReader(System.IO.Path.GetFullPath(File1.PostedFile.FileName.ToString()))
'Disable whitespace so that you don't have to read over whitespaces
m_xmlr.WhitespaceHandling = WhitespaceHandling.None
'read the xml declaration and advance to family tag
m_xmlr.Read() **<<<<<ERROR**
'read the family tag
m_xmlr.Read()
'Load the Loop
While Not m_xmlr.EOF
...........................
I am consuming the java web service in .net client, when i sent a request to that web service, i am getting one exception in response object.It says "Client found response content type of 'text/plain', but expected 'text/xml'", along with this message i am getting the response in that exception.
View 2 RepliesI've spent a week trying to use [URL] methods on client side. How to do that?
View 4 RepliesI was wondering if anything special is required to add a .NET web services to the "Services" tab in NetBeans to allow my java app to consume a .NET web service. I go and add my WSDL (simple method, 1 operation, takes a string), and I continuously get a NullReferenceError as below:
java.lang.NullPointerException
at org.netbeans.modules.websvc.saas.model.wsdl.impl.WsdlModel.getServices(WsdlModel.java:65)
at org.netbeans.modules.websvc.saas.wsdl.websvcmgr.WebServiceManager.addWebService(WebServiceManager.java:142)
at org.netbeans.modules.websvc.saas.wsdl.websvcmgr.WsdlDataManagerImpl$1.run(WsdlDataManagerImpl.java:79)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1957)
Is this something common? I'm using Netbeans 6.9.1 and yes, the webservice is a stub that takes a string and displays a static message right now.
I have devloped a WCF service which is consumed by a Java client app. WCF service is hosted using IIS and Java client is hosted on Tomcat server on same server.
what kind of security i can implement in my service?
My application creates some images at client machine using client side scripting VBScript. I want to store those images in database, so I need some way to bring those images to server without any interaction with users (means I can not use the file upload control).Along with this, application would also like to use the printer attached to client's machine (it could be her network printer), without showing printer dialog.
Basically I need to create some client piece, dll which will handle the scanning, printing and uploading images from client pc to server and web application will interact with this dll.How could I achieve this? I explored a lot on internet. many articles suggest that use activex control, but how in c#?
I am not asking any spoonfeeding. Please show me correct article or small working sample or example, I would figure out the rest.
As per requirement I disabled all validation controls in page on PageLoad event in server side.
On clicking submit button I want to activate them and validate the page and if the page is ok submit other wise not.
I am able to enable all validaters but one thing that I am unable to understand is that they do not validate the page. I set alerts and check they are being enabled but they do not validate the page and let the page submit.
Below is my script:
[code]....
i have set autopostback property for text box . will it fire when java script desable at client side
<asp:TextBox ID="Slider1" runat="server" OnTextChanged="Slider1_TextChanged" AutoPostBack="True" >
I have this c# user control class:
public partial class UserControls_JsTop : System.Web.UI.UserControl
{
public static string sidebarBannerUrl = getSideBarBannerImgUrl();
[code]....
I try to acces the static var in a js script:
load it here:
<script type="text/javascript">
var categoryParam = '<%# CQueryStringParameters.CATEGORY %>';
var subcategory1Param = '<%# CQueryStringParameters.SUBCATEGORY1_ID %>';[code]....
I do not understand why it is empty. there is a record in DB with that condition.I think there is some js problem when loading the var...
is it possible to automatically populate a file upload control's file for automated testing and server stress. I have one upload control (that simply brings up the browse and selects the file) and a button that uploads the selected fileupload control's file. Is it possible to give the file upload control a file pather "C:myImage.jpg" and submit the file by pressing the upload butto:
document.getElementById("fileUpload").value = "C:myImage.jpg";
document.getElementById("btnUpload").click();
I am relatively new in Java technologies. I want to know the best frameworks and which to consider when I am making a similar web application just like in the ASP.NET Data Access Tutorials. My backend is MySQL. And my criteria from being 'similar' is ease of use and application extensibility and maintainability.
View 2 RepliesI am a beginner at webservices.
I created a webservice solution using VS2010. I can browse to http://localhost:1259/ResultsWebServices/FG_Results.asmx and click on my webservice which is Get_FG_Results, enter my case num and get the XML back. Works fine as expected. FG
For trial purpose, I added another project in the same solution which is supposed to be this webservice client. I added a web refrence to Get_FG_Results. On the default page I added a GridView to display the resuls fetched by the webservice.
I have a method BindDataToGrid being called at the page load. How do I call my webservice from this method to populate the GridView?
What else do I need to do so that this webservice is available to other applications?
I want to access drop down menu's variable in java script on change event, here is my code
<asp:DropDownList ID="DropDownList1" runat="server" onchange="document.location.href = url_Lookbook;" >
<asp:ListItem Value="0">hello</asp:ListItem>
<asp:ListItem Value="1">world</asp:ListItem>
</asp:DropDownList>
here is the script coding:
<script type="text/javascript">
var url_Lookbook = "http://microsoft.com";
</script>
My question is how do I pass down value=0 or value = 1 to different page
I want to write a webservice, and in one of its methods, I want user to pass one my object's instance as parameter. It will greatly reduces number of parameters, and help user call this method more effectively. I create some class, but when distributing them to client, only class name remains, all properties and methods are gone, just like this
public class CameraPackages
{
private readonly List<CameraPackage> _packages;
public CameraPackages()
{
_packages = new List<CameraPackage>();
}
public void AddNewCamera(CameraPackage package)
{
_packages.Add(package);
}
public void RemoveCamera(CameraPackage package)
{
if(_packages.Contains(package))
_packages.Remove(package);
else
throw new ArgumentException();
}
}
into this: (in Reference.cs)
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "2.0.50727.3082")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://tempuri.org/")]
public partial class CameraPackages {
}
How can I do to allow user use my object?
I have web service on server! This service is calling from the clients applications!
Now how i can get user name and computer name of clients that using this service, for example if application from Clint1 calling this service i want to get computer name and user name of Clint1?
I am getting patient detail and stored that details in the form of XML (.xml) file.
As soon as XML file is created then I need to transfer that file to Java application automatically. (From one server it need to Transfer to another)
Note : I am using ASP.NET (.Net FW 3.5)
How to do it?
I want to build a webservice that has to get some data as parameter from the client application. the data from the client side are records from there database. my websercie has to send then these data to a soap server through 'HttpWebRequest'. Can i get the data as Datatable? and then send as stream to the soap server? Or maybe there is a better easier ways?
View 2 Replies