• Upgrade your Internet Experience
  • Sign in
  • Microsoft.com
  • United States (English)
    Brasil (Português)Česká republika (Čeština)Deutschland (Deutsch)España (Español)France (Français)Italia (Italiano)Россия (Русский)대한민국 (한국어)中华人民共和国 (中文)台灣 (中文)日本 (日本語)香港特别行政區 (中文)
 
 
.NET Framework Developer Center
 
 
Home
 
 
Library
 
 
Learn
 
 
Downloads
 
 
Support
 
 
Community
 
 
Forums
 
 
 
.NET Framework Developer Center > .NET Development Forums > ASMX Web Services and XML Serialization > Unable to generate temporary classes (with biztalk2006 published webservices)
Ask a questionAsk a question
Search Forums:
  • Search ASMX Web Services and XML Serialization Forum Search ASMX Web Services and XML Serialization Forum
  • Search All .NET Development Forums Search All .NET Development Forums
  • Search All MSDN Forums Search All MSDN Forums
 

AnswerUnable to generate temporary classes (with biztalk2006 published webservices)

  • Monday, November 06, 2006 9:24 PMSri_2009 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Vote As Helpful
    0

    HI

     

       I have an orchestration and schemas in biztalk 2006 which i published as an webservices. i ma able to use the orchestration  webservice in my ASP.Net code. wheni try to pass required object to that webservice method and when i try to invoke it ,i am getting  following  exception.(Scheams are Peoplesoft generated schemas from biztalk )

    System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.InvalidOperationException: Unable to generate a temporary class (result=1).

    error CS0030: Cannot convert type 'ChangeOfAddress.XsdTypesBody.properties_RD_P_NID_CI_VW_sequence_RD_P_NID_CI_VW[]' to 'ChangeOfAddress.XsdTypesBody.properties_RD_P_NID_CI_VW_sequence_RD_P_NID_CI_VW'

    error CS0030: Cannot convert type 'ChangeOfAddress.XsdTypesBody.properties_BO_CI_VW_sequence_BO_CI_VW[]' to 'ChangeOfAddress.XsdTypesBody.properties_BO_CI_VW_sequence_BO_CI_VW'

    error CS0030: Cannot convert type 'ChangeOfAddress.XsdTypesBody.properties_BO_NAME_CI_VW_sequence_BO_NAME_CI_VW[]' to 'ChangeOfAddress.XsdTypesBody.properties_BO_NAME_CI_VW_sequence_BO_NAME_CI_VW'

    error CS0030: Cannot convert type 'ChangeOfAddress.XsdTypesBody.properties_BO_ROLE_CI_VW_sequence_BO_ROLE_CI_VW[]' to 'ChangeOfAddress.XsdTypesBody.properties_BO_ROLE_CI_VW_sequence_BO_ROLE_CI_VW'

    error CS0030: Cannot convert type 'ChangeOfAddress.XsdTypesBody.properties_BO_REL_CI_VW_sequence_BO_REL_CI_VW[]' to 'ChangeOfAddress.XsdTypesBody.properties_BO_REL_CI_VW_sequence_BO_REL_CI_VW'

    error CS0030: Cannot convert type 'ChangeOfAddress.XsdTypesBody.properties_BC_CI_VW_sequence_BC_CI_VW[]' to 'ChangeOfAddress.XsdTypesBody.properties_BC_CI_VW_sequence_BC_CI_VW'

    error CS0030: Cannot convert type 'ChangeOfAddress.XsdTypesBody.properties_BC_SOLDTO_CI_VW_sequence_BC_SOLDTO_CI_VW[]' to 'ChangeOfAddress.XsdTypesBody.properties_BC_SOLDTO_CI_VW_sequence_BC_SOLDTO_CI_VW'

    error CS0030: Cannot convert type 'ChangeOfAddress.XsdTypesBody.properties_BC_BILLTO_CI_VW_sequence_BC_BILLTO_CI_VW[]' to 'ChangeOfAddress.XsdTypesBody.properties_BC_BILLTO_CI_VW_sequence_BC_BILLTO_CI_VW'

    error CS0030: Cannot convert type 'ChangeOfAddress.XsdTypesBody.properties_BC_SHIPTO_CI_VW_sequence_BC_SHIPTO_CI_VW[]' to 'ChangeOfAddress.XsdTypesBody.properties_BC_SHIPTO_CI_VW_sequence_BC_SHIPTO_CI_VW'

    error CS0030: Cannot convert type 'ChangeOfAddress.XsdTypesBody.properties_BC_NOTE_CI_VW_sequence_BC_NOTE_CI_VW[]' to 'ChangeOfAddress.XsdTypesBody.properties_BC_NOTE_CI_VW_sequence_BC_NOTE_CI_VW'

    error CS0030: Cannot convert type 'ChangeOfAddress.XsdTypesBody.properties_BO_CI_ADDR_VW_sequence_BO_CI_ADDR_VW[]' to 'ChangeOfAddress.XsdTypesBody.properties_BO_CI_ADDR_VW_sequence_BO_CI_ADDR_VW'

    error CS0030: Cannot convert type 'ChangeOfAddress.XsdTypesBody.properties_BO_CI_PHONE_VW_sequence_BO_CI_PHONE_VW[]' to 'ChangeOfAddress.XsdTypesBody.properties_BO_CI_PHONE_VW_sequence_BO_CI_PHONE_VW'

    error CS0030: Cannot convert type 'ChangeOfAddress.XsdTypesBody.properties_BO_CI_PAGER_VW_sequence_BO_CI_PAGER_VW[]' to 'ChangeOfAddress.XsdTypesBody.properties_BO_CI_PAGER_VW_sequence_BO_CI_PAGER_VW'

    error CS0030: Cannot convert type 'ChangeOfAddress.XsdTypesBody.properties_BO_CI_EMAIL_VW_sequence_BO_CI_EMAIL_VW[]' to 'ChangeOfAddress.XsdTypesBody.properties_BO_CI_EMAIL_VW_sequence_BO_CI_EMAIL_VW'

    error CS0030: Cannot convert type 'ChangeOfAddress.XsdTypesBody.properties_BO_CM_USE_CI_VW_sequence_BO_CM_USE_CI_VW[]' to 'ChangeOfAddress.XsdTypesBody.properties_BO_CM_USE_CI_VW_sequence_BO_CM_USE_CI_VW'

    error CS0030: Cannot convert type 'ChangeOfAddress.XsdTypesBody.properties_RB_CREDIT_CD_VW_sequence_RB_CREDIT_CD_VW[]' to 'ChangeOfAddress.XsdTypesBody.properties_RB_CREDIT_CD_VW_sequence_RB_CREDIT_CD_VW'

    error CS0030: Cannot convert type 'ChangeOfAddress.XsdTypesBody.properties_BO_EMPLOY_CI_VW_sequence_BO_EMPLOY_CI_VW[]' to 'ChangeOfAddress.XsdTypesBody.properties_BO_EMPLOY_CI_VW_sequence_BO_EMPLOY_CI_VW'

     

       at System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, CompilerParameters parameters, Evidence evidence)

       at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, CompilerParameters parameters, Assembly assembly, Hashtable assemblies)

       at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence)

       at System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[] mappings, Evidence evidence)

       at System.Web.Services.Protocols.SoapServerType..ctor(Type type, WebServiceProtocols protocolsSupported)

       at System.Web.Services.Protocols.SoapServerProtocol.Initialize()

       at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)

       --- End of inner exception stack trace ---

    • ReplyReply
    • QuoteQuote
     

Answers

  • Thursday, November 16, 2006 12:00 AMElena KharitidiModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Vote As Helpful
    0

    You are running into a known problem in XmlSerializer Code Generation component: it cannot handle some cases of nested unbounded elements.  The Object Model it creates is not valid: user cannot use it to produce xml messages.

    Unfortunately to fix this you have to edit your schema to make sure that all array-like constructs will be handled properly.

     

    You would need to slightly modify all schema constructs that have the following:

    <xs:sequence maxOccurs="unbounded">

      <xs:element ../>

    <xs:sequence>

     or

    <xs:sequence>

      <xs:element maxOccurs="unbounded"/>

    <xs:sequence>

     

     

    Have to be changed to

     

    <xs:sequence maxOccurs="unbounded">

      <xs:element ../>

    <xs:sequence>

    <xs:attribute name="tmp" type="xs:string" />

    And

    <xs:sequence>

      <xs:element maxOccurs="unbounded"/>

    <xs:sequence>

    <xs:attribute name="tmp" type="xs:string" />

     

    Adding attribute will force XmlSerializer code generator using a class with array member and proper XmlSerialization attributes for the construct instead of an unwrapped array.

     

    Thanks,

    Elena

     

    • ReplyReply
    • QuoteQuote
     

All Replies

  • Friday, February 02, 2007 11:54 AMNarasimha1 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Vote As Helpful
    0
    I aslo got same problem. Solved with above solution. Great solution.
    • ReplyReply
    • QuoteQuote
     
  • Thursday, April 26, 2007 4:57 PMhattar Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Vote As Helpful
    0
    Worked great for me too. Thanks!
    • ReplyReply
    • QuoteQuote
     
  • Thursday, April 24, 2008 6:19 PMAlan1231797 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Vote As Helpful
    0
    solution worked perfectly. a real life saver

     

    • ReplyReply
    • QuoteQuote
     
  • Wednesday, July 09, 2008 10:36 PMAndy Blackman Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Vote As Helpful
    0
    Hi all,

    Has any further progress been made on this bug ? e.g. a bugfix in xsd.exe, or any cleaner workarounds ?
    I came to the same conclusion and added a "dummy" atttribute, and it all started working, but I don't want to see the dummy property in the generated code !!!!

    Any help would be most welcome...

    Thanks,

    Andy
    • ReplyReply
    • QuoteQuote
     
  • Wednesday, July 16, 2008 6:40 AMhawilysi Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Vote As Helpful
    0
    Hi,

    Have the same problem but I am in more deep ____, I use a standard - fi2 ( local std in sweden for building std information) so I have problems fideling with the elements. What I do now, will be gone in next release and I have to do it allover again and there are 450+schema elements  used.  Puh...

    Any plans for a new release of the XmlSerializer?

    Hilsen fra hans
    • ReplyReply
    • QuoteQuote
     
  • Wednesday, August 06, 2008 5:10 AMJohn SaundersMVP, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Vote As Helpful
    0
    Anyone who wants a bug fixed should file it at http://connect.microsoft.com. This forum is not a way to get bugs fixed.

    John Saunders | Use File->New Project to create Web Service Projects
    • ReplyReply
    • QuoteQuote
     
  • Thursday, January 29, 2009 5:59 PMTomWeiz Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Vote As Helpful
    0
     magician ; (biblical) sorcerer, soothsayer
    • ReplyReply
    • QuoteQuote
     
Need Help with Forums? (FAQ)
 
© 2009 Microsoft Corporation. All rights reserved.
Terms of Use
|
Trademarks
|
Privacy Statement