Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Web Service Proxy class

Web Service Proxy class

Scheduled Pinned Locked Moved C#
questionc++data-structures
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Member 534357
    wrote on last edited by
    #1

    I created a Web Service that has a method that takes string arrays for ex: public void CalculateModel(string[] stringList1, string[] stringList2) { //code here } When I add this web service as a web reference to my C++ application it generates a proxy class, in the proxy class it displays the array parameters like this: BSTR* stringList1, int __stringList1_nSizeIs, BSTR* stringList2, int __stringList2_nSizeIs, Then it does the following: checks these pointers for NULL if ( stringList1 == NULL ) return E_POINTER; if ( stringList2 == NULL ) return E_POINTER; So my question is how do I prevent the proxy file from adding these checks for NULL? because I do allow the user to pass in an empty string array which is defaulted to NULL on the C++ side. Thanks

    A 1 Reply Last reply
    0
    • M Member 534357

      I created a Web Service that has a method that takes string arrays for ex: public void CalculateModel(string[] stringList1, string[] stringList2) { //code here } When I add this web service as a web reference to my C++ application it generates a proxy class, in the proxy class it displays the array parameters like this: BSTR* stringList1, int __stringList1_nSizeIs, BSTR* stringList2, int __stringList2_nSizeIs, Then it does the following: checks these pointers for NULL if ( stringList1 == NULL ) return E_POINTER; if ( stringList2 == NULL ) return E_POINTER; So my question is how do I prevent the proxy file from adding these checks for NULL? because I do allow the user to pass in an empty string array which is defaulted to NULL on the C++ side. Thanks

      A Offline
      A Offline
      Alex Korchemniy
      wrote on last edited by
      #2

      A check for NULL isn't going to hurt you, is it? It doesn't look like the wsdl.exe tool has an option like this. This posting is provided "AS IS" with no warranties, and confers no rights. Alex Korchemniy

      M 2 Replies Last reply
      0
      • A Alex Korchemniy

        A check for NULL isn't going to hurt you, is it? It doesn't look like the wsdl.exe tool has an option like this. This posting is provided "AS IS" with no warranties, and confers no rights. Alex Korchemniy

        M Offline
        M Offline
        Member 534357
        wrote on last edited by
        #3

        Yes, it does effect me the check for NULL because it returns if the array is NULL & does not continue processing the data.

        1 Reply Last reply
        0
        • A Alex Korchemniy

          A check for NULL isn't going to hurt you, is it? It doesn't look like the wsdl.exe tool has an option like this. This posting is provided "AS IS" with no warranties, and confers no rights. Alex Korchemniy

          M Offline
          M Offline
          Member 534357
          wrote on last edited by
          #4

          Yes, it does effect me the check for NULL, because it returns if the array is NULL & does not continue processing the data.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups