XML WebSvc Proxy Code Syntax Questions

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • rJ

    #1

    XML WebSvc Proxy Code Syntax Questions

    I performed wsdl on SQL2000 reporting service and have a question regarding
    the following proxy class. Right before render procedure declaration you
    have code that looks like html or xml. What is this, how does compiler and
    application interpret at run time, and how do I read it and understand what
    I should specify if I were to write something similar.

    Also, the public function declaration has a return value of
    As <System.Xml.Ser ialization.XmlE lementAttribute ("Result",
    DataType:="base 64Binary")> Byte().
    What does this mean? Thank you.


    <BEGIN SNIPPET>
    ..
    ..
    ..
    <System.Web.Ser vices.Protocols .SoapHeaderAttr ibute("SessionH eaderValue",
    Direction:=Syst em.Web.Services .Protocols.Soap HeaderDirection .InOut),
    _System.Web.Ser vices.Protocols .SoapHeaderAttr ibute("ServerIn foHeaderValue",
    Direction:=Syst em.Web.Services .Protocols.Soap HeaderDirection .Out),
    _System.Web.Ser vices.Protocols .SoapDocumentMe thodAttribute(" http://schemas.microso ft.com/sqlserver/2003/12/reporting/reportingservic es/Render"
    & _"",
    RequestNamespac e:="http://schemas.microso ft.com/sqlserver/2003/12/reporting/reportingservic es",
    ResponseNamespa ce:="http://schemas.microso ft.com/sqlserver/2003/12/reporting/reportingservic es",
    Use:=System.Web .Services.Descr iption.SoapBind ingUse.Literal,
    ParameterStyle: =System.Web.Ser vices.Protocols .SoapParameterS tyle.Wrapped)> _
    Public Function Render(ByVal Report As String, ByVal Format As String, ByVal
    HistoryID As String, ByVal DeviceInfo As String, ByVal Parameters() As
    ParameterValue, ByVal Credentials() As DataSourceCrede ntials, ByVal
    ShowHideToggle As String, ByRef Encoding As String, ByRef MimeType As
    String, ByRef ParametersUsed( ) As ParameterValue, ByRef Warnings() As
    Warning, ByRef StreamIds() As String) As
    <System.Xml.Ser ialization.XmlE lementAttribute ("Result",
    DataType:="base 64Binary")> Byte()

    Dim results() As Object = Me.Invoke("Rend er", New Object() {Report,
    Format, HistoryID, DeviceInfo, Parameters, Credentials, ShowHideToggle} )
    Encoding = CType(results(1 ), String)
    MimeType = CType(results(2 ), String)
    ParametersUsed = CType(results(3 ), ParameterValue( ))
    Warnings = CType(results(4 ), Warning())
    StreamIds = CType(results(5 ), String())
    Return CType(results(0 ), Byte())
    End Function.
    ..
    ..
    ..


  • Kevin Yu [MSFT]

    #2
    RE: XML WebSvc Proxy Code Syntax Questions

    Hi RJ,

    We have reviewed this issue and are currently researching on it. We will
    update you ASAP. Thanks for your patience!

    Kevin Yu
    =======
    "This posting is provided "AS IS" with no warranties, and confers no
    rights."

    Comment

    • Kevin Yu [MSFT]

      #3
      RE: XML WebSvc Proxy Code Syntax Questions

      Hi RJ,

      These are the attributes in the <>. They defines how your objects are
      serialized to SOAP. You can try to search in MSDN for each attribute name,
      like SoapHeaderAttri bute, to see what it stands for.

      For example, XmlElementAttri bute indicates that a public field or property
      represents an XML element when the XmlSerializer serializes or deserializes
      the object that contains it.

      XmlElementAttri bute("Result", DataType:="base 64Binary")> means the property
      will be serialized to an xml element. The name for the element is "Result",
      and its value is serialized to a base64Binary string.

      Kevin Yu
      Microsoft Online Community Support

      =============== =============== =============== =============== =============== =
      =============== ===========
      When responding to posts, please "Reply to Group" via your newsreader so
      that others may learn and benefit from your issue.
      =============== =============== =============== =============== =============== =
      =============== ===========

      (This posting is provided "AS IS", with no warranties, and confers no
      rights.)

      Comment

      Working...