Cообщество разработчиков на платформе Microsoft > Форумы > ASMX Web Services and XML Serialization > Unable to generate temporary classes (with biztalk2006 published webservices)
Задайте вопросЗадайте вопрос
 

ОтвеченоUnable to generate temporary classes (with biztalk2006 published webservices)

  • 6 ноября 2006 г. 21:24Sri_2009 Медали пользователяМедали пользователяМедали пользователяМедали пользователяМедали пользователя
     

    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 ---

Ответы

  • 16 ноября 2006 г. 0:00Elena KharitidiМодераторМедали пользователяМедали пользователяМедали пользователяМедали пользователяМедали пользователя
     Отвечено

    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

     

Все ответы