English 中文(简体)
通过作为参数的习俗目标,进入一个网络方法,即网上服务
原标题:passing custom object as parameter to a webmethod of asp.net web service

我的习俗类别如下:

<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

在我任职期间。 中文编码

  Public Function ConvertTo(ByVal info As NumInfo) As String        
      Return mbc(info)<br> mbc is another function defined in my service.asmx "service" class
  End Function

www.un.org/Depts/DGACM/index_spanish.htm 问题在于,当我开始着手对其进行测试时,我所看到的网页没有包含任何领域,在这些方面,我可以输入南英帝国公共领域的价值观。 我如何开始这一类? 也没有“Invoke”纽州。 详见下文:

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 /Converter/BC.asmx
HTTP/1.1
Host: localhost
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://Services/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://Services/">
<info>
<n>string</n>
<f>int&lt/f>
<fc>
<char>char</char>
<char>char>/char>
</fc>
..etc..



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. Help!

最佳回答

如电文所述,“试验表仅可用于具有原始类型(参数)的参数、 b、 in等。

我认为,建立一个测试页非常简单,我可以确定我的标语,并将其传递给网络方法,以便进行分解。

问题回答

暂无回答




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签