Error adding web reference WSDL to BizTalk

Home Page Forums BizTalk 2004 – BizTalk 2010 Error adding web reference WSDL to BizTalk

Viewing 1 reply thread
  • Author
    Posts
    • #16037

      I'm receiving an error when adding a web reference to a BizTalk 2006 project.  It works perfectly well in a standard C# project.

      "Could not generate BizTalk files. blah blah: error CS0120: An object reference is required for the nonstatic field, method, or property 'blah.blah.System'"

      The offending line in the WSDL is:

      <element name="System" minOccurs="0" type="xsd:string"/>

       I believe the problem to be due to the element name being "System", as if I change this to anything else (including lower case 'system'), it works fine.  Alas I'm not able to change the WSDL of the actual web service I'm calling.

      Does anybody know of a method of getting around this issue?

      Thanks in advance,

      Alastair. 

    • #16086

      *bump*

      • #16111

        Sorry, I don’t know a way around it assuming it’s really the system that’s causing a problem.  It would make sense since I think it’s a reserved word in BizTalk. 

         

        What if you renamed it in the WSDL for import?  Then edited the generated class manually inside BizTalk to change it back?  I think there is an actually class name and then an Element name that you can change to have the serialized value still be System.

         

        Just a thought.

        • #16143

          I think it's being caused by a multidimensional array element now.  e.g. Class[][]

          • #16275

            I’m afraid if anybody else has this problem I can’t offer a good answer. The Class[][] element was an error in the application that created the webservice, and when that was fixed they also changed System to system. So it may or may not have been this.

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.