WCF / ASMX :: How To Pass Object To Web Service

Nov 4, 2010

I'd like to pass an object (Digital Persona featureset) to a web service. Can't seem to find a good way to serialize it.

View 4 Replies


Similar Messages:

WCF / ASMX :: Can Pass Object In Rest Service Uri

Jan 18, 2011

can Pass object in Rest Service Uri

View 1 Replies

Unable To Pass User Credentials From WCF Web Service To ASMX Web Service

May 25, 2010

My WCF Client calls my WCF Service which then calls ASMX Web Service. The problem is i have configured my wcf client and wcf service to windows credentials type but when wcf service calls asmx service the user credentials (default windowsidentity) is not passed to asmx service.

In WCF Service i am able to get user identity by using : Thread.CurrentPrincipal.Identity.Name;
WCF Service - i have disabled anonymous access and enabled windows authentication. ASMX Web Service - i have disabled anonymous access and enabled windows authentication.
WCF Service Config
[Code]....

View 1 Replies

WCF / ASMX :: Web Service Error: Object Reference Not Set To An Instance Of An Object

Jan 15, 2010

I could really use some help on this one. I've been fighting it now for several days and we are supposed to start testing early next week.I am subscribing to 4 web services all hosted by the same company. The integration with 1, 2 and 3 all went fine, but on the fourth I keep getting the very unhelpful error:

System.Web.Services.Protocols.SoapException = {"Server was unable to process request. ---> Object reference not set to an instance of an object."}
[code]...

View 9 Replies

WCF / ASMX :: How To Pass Credential To Web Service

Dec 22, 2010

May I know how to pass credential to SOAP web service? I tried to assign via Proxy.ClientCredentials but seem it is read only property.

View 4 Replies

WCF / ASMX ::pass Xml Document To A Method In WCF Service By Client?

Aug 2, 2010

I would like to pass xml document to a method in WCF service by client that server will get xmldocument,parse it and send back the xml response.What are best practice for thi?The xml document is conform to XSD so i would like to create managed type that represent the schema and then expose thatIf anybody has done it before or know any example please point it out so i can see it.

View 1 Replies

ASMX Service Call With Username Pass Argument

Nov 24, 2015

Cannot find a simple example that will call POST a service with username pass argument.

So, how to get the length of the service.

Code:
Dim encoder As ASCIIEncoding = New ASCIIEncoding
Dim data() As Byte = encoder.GetBytes(rawresp)
Dim request1 As HttpWebRequest = CType(WebRequest.Create("http://www.sas.gr/MobileService/MobileService.asmx?wsdl&op=getCinemaMoviesProgram"), HttpWebRequest)
request1.Method = "POST"

[Code] ...

Complains about wrong bytes. I can make it work with GET but i only get the schema.

Code:
Dim request = DirectCast(WebRequest.Create("http://www.sas.gr/MobileService/MobileService.asmx?wsdl&op=getCinemaMoviesProgram"), HttpWebRequest)
request.Method = "Get"
' request.ContentLength = 0
request.Credentials = New System.Net.NetworkCredential("WSl", "WSs")
Dim response1 = DirectCast(request.GetResponse, HttpWebResponse)
Dim reader = New StreamReader(response1.GetResponseStream())
Dim rawresp As String
rawresp = reader.ReadToEnd()

This will only give the schema back, no data. Also if i reference the service there is no getCinemaMoviesProgram function to call, so I suppose it only works with post.

View 3 Replies

WCF / ASMX :: Access/pass Parameters To A Web Service WITHOUT A (general) Form?

May 15, 2010

I am a newbie to ASP.NET (but not to C#)I have a project I am developing that may seem unconventional at this point but it is a project that I hope to eventually expand and provide a new type of service on the internet. Currently the project makes use of an Excel spreadsheet that is generated by another application I wrote. Basically the spreadsheet is an index to a specific type of file that exists on a host computer and the files are directly linked from within the excel document. When the link is clicked it opens the file using the operating system default program which then processes the file (this takes some time).

This is fine and dandy but when I click on another file, the default program immediately stops processing one file and opens the latest submission and thus interrupting the previous job. To prevent this I am now writing a queuing application. Here is where ASP.NET comes in. I do not want the link to open the queuing application with the file to add into the queue as a parameter because that pops one or more nnoying/scary "you are opening an executable" dialogs and because I want to be able to access the queuing service from a remote computer, and possibily in the future over the web. Instead I am trying to use an ASP.NET service application that will accept the name of a file as a parameter, access the external queue class (defined in an external dll of which only one universal instance is allowed), and add the request to the queue. Whether or not the table is an excel table or on a web page, using a form in this instance is tedious, not only for me but for a user. I want the user to be able to simply click on an html link and have the file be queued without anything except maybe a confirmation page pop up saying that the file has been queued and it will take x amount of time before the file is finished processing.

My problem is I cannot for the life of me find a way to do this. I have searched the interenet for over a week now looking for a way to call a "WebMethod" using a link and I am getting the impression that it cannot be done. Even when I use a form and try to have the form pass a string (representing the file name) as its "action" it comes up with an application error saying that I am missing the parameter I am trying to pass. Here are some examples of what I have tried:Here an example method I would try to access:

[Code]....

Here is an example of how I tried to access directly by way of a link (which results in an application error: InvalidOperationException)"

[Code]....

View 3 Replies

WCF / ASMX :: Keep Object Alive On Server In Service

Nov 19, 2010

I have to keep a datacontext alive in a WCF service. This object is created on every call to the service, by the way decreasing performance. How could I keep this object alive with WCF.

View 2 Replies

Can Pass An Object Between Separated Applications By Web Service

Dec 26, 2010

I have a web service Writed By VB.net Lang return a DataSet Contain many rows , I tried to Call this Web Service From Java applicationput Java Language cant Deal with dataSet , So I need to Convert the Dataset to an Object

<WebMethod()> _
Public Function GetLogBook(ByVal EmployeeNumber As String, _
ByVal EmployeeName As String) As DataSet
Dim ds As New DataSet
Dim conn As New
[code]...

View 3 Replies

WCF / ASMX :: VS 2008 - Consuming A Web Service As A Business Object

Jun 30, 2010

I'm fairly new to .NET development so I might be missing something very simple here. I'm trying to set up a web service as a data item so that I can bind it to a control on my page. I was reading some tutorials about doing this in an earlier version which seemed very simple. All you had to do was add the web reference, create a data source and use the object type, pick the web service and enter the name of the call that would retrieve the data.

In 2008 the object data source type doesn't seem to be available anymore when creating a new item unde app_data. I get options for SQL Server, XML and XML schema. I've tried adding an existing source and picking each of the files generated for my web service reference, with no success. I suspect that I have to use one of the XML options, though at this point my web service is a simple thing that only returns some strings for prototyping purposes (I'm not the one writing the web service, just the front ends. Our other developer hasn't come up with a stub service yet). I know there must be some way to set a web service up as a business object so that you can bind it to a control like a gridview.

View 2 Replies

WCF / ASMX :: Web Service - WebMethod Accepting Custom Object?

May 11, 2010

I have a custom class declared as follows (in vb.net)

<Serializable()> _
Public Class NumInfo
Public n As String
Public f As Integer
Public fc As char()
Public t As Integer
Public tc As char()
Private validFlag As Boolean = True
Public Sub New()
End Sub

I also have public properties(read/write) for all the public variables

End Class
In my service.asmx codebehind class I have a webmethod as follows:
<WebMethod> _
<XmlInclude(GetType(NumInfo))>
Public Function ConvertTo(ByVal info As NumInfo) As String
Return mbc(info)
'mbc is another function defined in my service.asmx "service" class
End Function

The problem is that when I start debugging it to test it, the page that I get does not contain any fields where I could input the values for the public fields of numInfo. How do I initialise the class? There is no "Invoke" button either. All I see are soap details as below:

ConvertTo
Test
The test form is only available for methods with primitive types as parameters. SOAP 1.1 The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.
POST /BaseConverter/BaseCon.asmx HTTP/1.1
Host: localhost
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://RohitServices.in/ConvertTo"
<?xml version="1.0" encoding="utf-8"?>
<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/">
<soap:Body>
<ConvertTo xmlns="http://RohitServices.in/">
<info>
<n>string</n>
<f>int</f>
<fc>
<char>char</char>
<char>char</char>
</fc>

What am I doing wrong? For the record I tried replacing char() with string to see if it was the array causing problems but that didn't help either. I'm fairly new to web services. I tried replacing the custom object parameter with a primitive parameter just to check how things worked and it rendered a page with an input field and invoke button. I just can't seem to get it working with custom object.

View 2 Replies

Security :: Calling Users NetworkCredential Object From The WCF Service And Pass It To The OCS Call?

Aug 27, 2010

I have the following scenario. An user uses the desktop application to call our WCF Service which has windows authentication. The WCF Service calls the Office Communication Server (OCS) in order to do some custom work.

When the WCF Service calls OCS we have to pass an instance of NetWorkCredential into the call. I want to pass in the original calling users NetworkCredential object into the OCS call rather than constructing it using a custom username and password. How do I get access to the calling users NetworkCredential object from the WCF service and pass it to the OCS call?

View 1 Replies

WCF / ASMX :: How To Pass Xml Document (huge Document) Through WCF RestFul Service

Aug 16, 2010

I have xml document and wanting to pass it through wcf restfull service, i am able to do that by using string format i mean i can pass the xml as string param in the restful service and it worked but now my xml document becomes huge so if i pass it as string then it gives URI long error. any way i can pass the huge xml document through the WCF RESTFul service.

View 1 Replies

WCF / ASMX :: Create Web Service - How To Web Page Call Sales_Services.asmx

May 5, 2010

if i have the web application with many pages like add order page, edit order page, and delete order page actually they also interact with the Sql Server 2008 and i also create web service page call Sales_Service.asmx. i know just i need to put something like query into Web Method in Sales_Service.asmx but i have a lot of queries, i don't know which query i should put into it and how the web page call the Sales_Services.asmx

View 2 Replies

WCF / ASMX :: IIS Memory Increasing For Each Client Request In Asmx Web Service?

Nov 8, 2010

A customer reported that our asmx web service is continually increasing in memory (mem usage as well as private bytes). We are able to reproduce the problem in our lab with Windows 2003 Server SP2 (fully patched) on some of the machines. The customer is using Windows 2008.

We created a Hello World web service targeting the 2.0 framework built under VS2005 SP1 and a test client that continues to call it. The memory increases steadily - approximately 40K per client request. If the test app is paused, the memory remains the same. When it is closed, the memory drops. Explicit calling of GC.Collect does not drop the memory.

We have run the memory profiler on the service and the leak is all native memory. We have uninstalled/re-installed the Framework on one of the machines but no difference. To our knowledge all of the security and IIS settings are not modified. We have compared app pool, default web site and virtual directory properties to machines that have no problem and they are identical.

View 11 Replies

WCF / ASMX :: How To Call Asmx Web Service In A .net App From Classic Asp App Js File

Mar 17, 2011

I have a .net app developed in .net 4.0 version. And I implemented an asmx web service in this. Now I want to call one of the webservice method in another classis ASP application java script function.

View 2 Replies

WCF / ASMX :: Server Was Unable To Process Request / Object Reference Not Set To An Instance Of An Object?

Apr 16, 2010

I have a webservice, it has few webmethods. when i create a client proxy and invoke the methods to check its response, i am getting this error. Can someone tell me what things can i check to know the cause of this? The error is not saying much hence blocked on this.

View 1 Replies

WCF / ASMX :: Running A Web Service User Service / Domain Account?

Mar 28, 2011

Is it possible to run a web service as a particular user/service account in the same way a Windows service can?I have a service account used for connecting to the DB and want to run the webservice under this account as the users using the webservice won't have DB access.The way I see to do it is to include the Impersonate option in the Web.config file, but is there any better way to do this?

View 1 Replies

WCF / ASMX :: Create An Instance Of Web Service Without Adding Web Service Reference?

Mar 17, 2011

How to create an instance of web service without adding web service reference? How to identify the server address/name where the web service is hosted from C# code?

View 1 Replies

WCF / ASMX :: How To Call Web Service Hosted In Window Service And Having End Point Over Tcp

Aug 4, 2010

i have created a normal web service and i want to host it outside IIS. one idea i got is to use window service as hosting environment. i have created a web service and hosted it window service and its window service is running now.would anybody please let me know that how can i call web service hosted in window service binded over soap.tcp. here is my sample code.

[Code]....
[Code]....

View 1 Replies

WCF / ASMX :: Develop A Web Service That Handle Another Web Service's Event (C#.Net 3.5 Framework)?

May 26, 2010

I want to develop a web service that handle another web service's event. (C#.Net 3.5 framework)

View 1 Replies

WCF / ASMX :: Create Simple Web Service In VS2010, NOT WCF Service?

Aug 30, 2010

How to create simple web service in VS2010 Professional (trial version). There is no template to do this. I am not trying to create WCF service here.

View 2 Replies

WCF / ASMX :: How To Convert Existing Web Service To Framework 3.5 Service

Sep 20, 2010

I have running existing web service in framework 2.0, but i want to convert all my service to framework 3.5 WCF Service..

View 1 Replies

WCF / ASMX :: Add Service As Service Reference To VB6 Winforms Application

Feb 7, 2011

How do I add the WCF service built using VS2010 as a service reference to a Winforms app which is written in VB6?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved