locked
Problem Creating a Message Using Generated Class RRS feed

  • Question

  • Hello,

    I'm experiencing some problems when I try to create a message in BizTalk, using an auto-generated class in a c# code.

    The schemas of the message were created by the WCF-SAP adapter, and is posted below.

    I created the auto-generated class using the XSD.EXE, and is posted below.

    The scneario is simple. I created an method that returns an instance of the class SIESLA_SD_RFC_SIGNATURE_FILEResponse. When I try to assign this method response to an message of the type /SIE/SLA_SD_RFC_SIGNATURE_FILEResponse on BizTalk I got this error:

    cannot implicitly convert type 'SIESLA_SD_RFC_SIGNATURE_FILEResponse' to 'message Schemas.SLA_SD_RFC_SIGNATURE_FILE._x002F_SIE_x002F_SLA_SD_RFC_SIGNATURE_FILEResponse '

    What should I change on my auto-generated class to fix this problem?

    So many thanks in advance,

    Willians

    Friday, May 13, 2011 12:02 PM

Answers

  • Is this error at design-time/compile-time rather than run-time? If at compile-time, I would have the custom method return a .NET XmlDocument to get past the error the message Xml can still be the content from the class, just try using the XmlSerializer.

    Thanks,


    If this answers your question, please use the "Answer" button to say so | Ben Cline
    Monday, May 16, 2011 1:14 PM

All replies

  • SLA_SD_RFC_SIGNATURE_FILE.xsd

    <?xml version="1.0" encoding="utf-8"?>
    <xs:schema xmlns:ns3="http://Microsoft.LobServices.Sap/2007/03/Types/Rfc/" elementFormDefault="qualified" targetNamespace="http://Microsoft.LobServices.Sap/2007/03/Rfc/" version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
     <xs:import schemaLocation=".\SLA_SD_RFC_SIGNATURE_FILE_Types.xsd" namespace="http://Microsoft.LobServices.Sap/2007/03/Types/Rfc/" />
     <xs:annotation>
      <xs:appinfo>
       <fileNameHint xmlns="http://schemas.microsoft.com/servicemodel/adapters/metadata/xsd">Rfc</fileNameHint>
      </xs:appinfo>
     </xs:annotation>
     <xs:element name="_x002F_SIE_x002F_SLA_SD_RFC_SIGNATURE_FILE">
      <xs:annotation>
       <xs:documentation>
        <doc:action xmlns:doc="http://schemas.microsoft.com/servicemodel/adapters/metadata/documentation">http://Microsoft.LobServices.Sap/2007/03/Rfc/_x002F_SIE_x002F_SLA_SD_RFC_SIGNATURE_FILE</doc:action>
        <doc:description xmlns:doc="http://schemas.microsoft.com/servicemodel/adapters/metadata/documentation">The Metadata for this RFC was generated using the RFC SDK.</doc:description>
       </xs:documentation>
      </xs:annotation>
      <xs:complexType>
       <xs:sequence>
        <xs:element minOccurs="0" maxOccurs="1" name="ADDR_HSM" nillable="true">
         <xs:simpleType>
          <xs:restriction base="xs:string">
           <xs:maxLength value="50" />
          </xs:restriction>
         </xs:simpleType>
        </xs:element>
        <xs:element minOccurs="0" maxOccurs="1" name="ALIAS_CERT" nillable="true">
         <xs:simpleType>
          <xs:restriction base="xs:string">
           <xs:maxLength value="100" />
          </xs:restriction>
         </xs:simpleType>
        </xs:element>
        <xs:element minOccurs="0" maxOccurs="1" name="ALIAS_KEY" nillable="true">
         <xs:simpleType>
          <xs:restriction base="xs:string">
           <xs:maxLength value="11" />
          </xs:restriction>
         </xs:simpleType>
        </xs:element>
        <xs:element minOccurs="0" maxOccurs="1" name="NAMESPACE_ID" nillable="true" type="xs:string" />
        <xs:element minOccurs="0" maxOccurs="1" name="PORT_HSM" nillable="true">
         <xs:simpleType>
          <xs:restriction base="xs:string">
           <xs:maxLength value="4" />
          </xs:restriction>
         </xs:simpleType>
        </xs:element>
        <xs:element minOccurs="0" maxOccurs="1" name="PWD_HSM" nillable="true">
         <xs:simpleType>
          <xs:restriction base="xs:string">
           <xs:maxLength value="8" />
          </xs:restriction>
         </xs:simpleType>
        </xs:element>
        <xs:element minOccurs="0" maxOccurs="1" name="TAG_ID" nillable="true">
         <xs:simpleType>
          <xs:restriction base="xs:string">
           <xs:maxLength value="10" />
          </xs:restriction>
         </xs:simpleType>
        </xs:element>
        <xs:element minOccurs="0" maxOccurs="1" name="USER_HSM" nillable="true">
         <xs:simpleType>
          <xs:restriction base="xs:string">
           <xs:maxLength value="12" />
          </xs:restriction>
         </xs:simpleType>
        </xs:element>
        <xs:element minOccurs="0" maxOccurs="1" name="XPATH_DADOS" nillable="true" type="xs:string" />
        <xs:element minOccurs="0" maxOccurs="1" name="XPATH_ID" nillable="true" type="xs:string" />
        <xs:element minOccurs="0" maxOccurs="1" name="MENS_ERRO" nillable="true" type="ns3:ArrayOf_x002F_SIE_x002F_SLA_SD_DXML" />
        <xs:element minOccurs="0" maxOccurs="1" name="XML" nillable="true" type="ns3:ArrayOf_x002F_SIE_x002F_SLA_SD_DXML" />
       </xs:sequence>
      </xs:complexType>
     </xs:element>
     <xs:element name="_x002F_SIE_x002F_SLA_SD_RFC_SIGNATURE_FILEResponse">
      <xs:annotation>
       <xs:documentation>
        <doc:action xmlns:doc="http://schemas.microsoft.com/servicemodel/adapters/metadata/documentation">http://Microsoft.LobServices.Sap/2007/03/Rfc/_x002F_SIE_x002F_SLA_SD_RFC_SIGNATURE_FILE/response</doc:action>
        <doc:description xmlns:doc="http://schemas.microsoft.com/servicemodel/adapters/metadata/documentation">The Metadata for this RFC was generated using the RFC SDK.</doc:description>
       </xs:documentation>
      </xs:annotation>
      <xs:complexType>
       <xs:sequence>
        <xs:element minOccurs="0" maxOccurs="1" name="MENS_ERRO" nillable="true" type="ns3:ArrayOf_x002F_SIE_x002F_SLA_SD_DXML" />
        <xs:element minOccurs="0" maxOccurs="1" name="XML" nillable="true" type="ns3:ArrayOf_x002F_SIE_x002F_SLA_SD_DXML" />
       </xs:sequence>
      </xs:complexType>
     </xs:element>
    </xs:schema>
    
    Friday, May 13, 2011 12:03 PM
  • SLA_SD_RFC_SIGNATURE_FILE_Types.xsd

    <?xml version="1.0" encoding="utf-8"?>
    <xs:schema xmlns:ns3="http://Microsoft.LobServices.Sap/2007/03/Types/Rfc/" elementFormDefault="qualified" targetNamespace="http://Microsoft.LobServices.Sap/2007/03/Types/Rfc/" version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
     <xs:annotation>
      <xs:appinfo>
       <fileNameHint xmlns="http://schemas.microsoft.com/servicemodel/adapters/metadata/xsd">Types</fileNameHint>
      </xs:appinfo>
     </xs:annotation>
     <xs:complexType name="_x002F_SIE_x002F_SLA_SD_DXML">
      <xs:sequence>
       <xs:element minOccurs="0" maxOccurs="1" name="DATA" nillable="true">
        <xs:simpleType>
         <xs:restriction base="xs:string">
          <xs:maxLength value="256" />
         </xs:restriction>
        </xs:simpleType>
       </xs:element>
      </xs:sequence>
     </xs:complexType>
     <xs:element name="_x002F_SIE_x002F_SLA_SD_DXML" nillable="true" type="ns3:_x002F_SIE_x002F_SLA_SD_DXML" />
     <xs:complexType name="ArrayOf_x002F_SIE_x002F_SLA_SD_DXML">
      <xs:sequence>
       <xs:element minOccurs="0" maxOccurs="unbounded" name="_x002F_SIE_x002F_SLA_SD_DXML" type="ns3:_x002F_SIE_x002F_SLA_SD_DXML" />
      </xs:sequence>
     </xs:complexType>
     <xs:element name="ArrayOf_x002F_SIE_x002F_SLA_SD_DXML" nillable="true" type="ns3:ArrayOf_x002F_SIE_x002F_SLA_SD_DXML" />
    </xs:schema>
    
    Friday, May 13, 2011 12:06 PM
  • SLA_SD_RFC_SIGNATURE_FILE.cs

    //------------------------------------------------------------------------------
    // <auto-generated>
    //   This code was generated by a tool.
    //   Runtime Version:2.0.50727.3620
    //
    //   Changes to this file may cause incorrect behavior and will be lost if
    //   the code is regenerated.
    // </auto-generated>
    //------------------------------------------------------------------------------
    
    using System.Xml.Serialization;
    
    // 
    // This source code was auto-generated by xsd, Version=2.0.50727.42.
    // 
    
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.42")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(TypeName="/SIE/SLA_SD_DXML", Namespace="http://Microsoft.LobServices.Sap/2007/03/Types/Rfc/")]
    [System.Xml.Serialization.XmlRootAttribute("/SIE/SLA_SD_DXML", Namespace="http://Microsoft.LobServices.Sap/2007/03/Types/Rfc/", IsNullable=true)]
    public partial class SIESLA_SD_DXML {
      
      private string dATAField;
      
      /// <remarks/>
      [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
      public string DATA {
        get {
          return this.dATAField;
        }
        set {
          this.dATAField = value;
        }
      }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.42")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(TypeName="ArrayOf/SIE/SLA_SD_DXML", Namespace="http://Microsoft.LobServices.Sap/2007/03/Types/Rfc/")]
    [System.Xml.Serialization.XmlRootAttribute("ArrayOf/SIE/SLA_SD_DXML", Namespace="http://Microsoft.LobServices.Sap/2007/03/Types/Rfc/", IsNullable=true)]
    public partial class ArrayOfSIESLA_SD_DXML {
      
      private SIESLA_SD_DXML[] sIESLA_SD_DXMLField;
      
      /// <remarks/>
      [System.Xml.Serialization.XmlElementAttribute("/SIE/SLA_SD_DXML")]
      public SIESLA_SD_DXML[] SIESLA_SD_DXML {
        get {
          return this.sIESLA_SD_DXMLField;
        }
        set {
          this.sIESLA_SD_DXMLField = value;
        }
      }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.42")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="http://Microsoft.LobServices.Sap/2007/03/Rfc/")]
    [System.Xml.Serialization.XmlRootAttribute("/SIE/SLA_SD_RFC_SIGNATURE_FILE", Namespace="http://Microsoft.LobServices.Sap/2007/03/Rfc/", IsNullable=false)]
    public partial class SIESLA_SD_RFC_SIGNATURE_FILE {
      
      private string aDDR_HSMField;
      
      private string aLIAS_CERTField;
      
      private string aLIAS_KEYField;
      
      private string nAMESPACE_IDField;
      
      private string pORT_HSMField;
      
      private string pWD_HSMField;
      
      private string tAG_IDField;
      
      private string uSER_HSMField;
      
      private string xPATH_DADOSField;
      
      private string xPATH_IDField;
      
      private SIESLA_SD_DXML[] mENS_ERROField;
      
      private SIESLA_SD_DXML[] xMLField;
      
      /// <remarks/>
      [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
      public string ADDR_HSM {
        get {
          return this.aDDR_HSMField;
        }
        set {
          this.aDDR_HSMField = value;
        }
      }
      
      /// <remarks/>
      [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
      public string ALIAS_CERT {
        get {
          return this.aLIAS_CERTField;
        }
        set {
          this.aLIAS_CERTField = value;
        }
      }
      
      /// <remarks/>
      [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
      public string ALIAS_KEY {
        get {
          return this.aLIAS_KEYField;
        }
        set {
          this.aLIAS_KEYField = value;
        }
      }
      
      /// <remarks/>
      [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
      public string NAMESPACE_ID {
        get {
          return this.nAMESPACE_IDField;
        }
        set {
          this.nAMESPACE_IDField = value;
        }
      }
      
      /// <remarks/>
      [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
      public string PORT_HSM {
        get {
          return this.pORT_HSMField;
        }
        set {
          this.pORT_HSMField = value;
        }
      }
      
      /// <remarks/>
      [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
      public string PWD_HSM {
        get {
          return this.pWD_HSMField;
        }
        set {
          this.pWD_HSMField = value;
        }
      }
      
      /// <remarks/>
      [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
      public string TAG_ID {
        get {
          return this.tAG_IDField;
        }
        set {
          this.tAG_IDField = value;
        }
      }
      
      /// <remarks/>
      [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
      public string USER_HSM {
        get {
          return this.uSER_HSMField;
        }
        set {
          this.uSER_HSMField = value;
        }
      }
      
      /// <remarks/>
      [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
      public string XPATH_DADOS {
        get {
          return this.xPATH_DADOSField;
        }
        set {
          this.xPATH_DADOSField = value;
        }
      }
      
      /// <remarks/>
      [System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
      public string XPATH_ID {
        get {
          return this.xPATH_IDField;
        }
        set {
          this.xPATH_IDField = value;
        }
      }
      
      /// <remarks/>
      [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true)]
      [System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://Microsoft.LobServices.Sap/2007/03/Types/Rfc/", IsNullable=false)]
      public SIESLA_SD_DXML[] MENS_ERRO {
        get {
          return this.mENS_ERROField;
        }
        set {
          this.mENS_ERROField = value;
        }
      }
      
      /// <remarks/>
      [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true)]
      [System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://Microsoft.LobServices.Sap/2007/03/Types/Rfc/", IsNullable=false)]
      public SIESLA_SD_DXML[] XML {
        get {
          return this.xMLField;
        }
        set {
          this.xMLField = value;
        }
      }
    }
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.42")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="http://Microsoft.LobServices.Sap/2007/03/Rfc/")]
    [System.Xml.Serialization.XmlRootAttribute("/SIE/SLA_SD_RFC_SIGNATURE_FILEResponse", Namespace="http://Microsoft.LobServices.Sap/2007/03/Rfc/", IsNullable=false)]
    public partial class SIESLA_SD_RFC_SIGNATURE_FILEResponse {
      
      private SIESLA_SD_DXML[] mENS_ERROField;
      
      private SIESLA_SD_DXML[] xMLField;
      
      /// <remarks/>
      [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true)]
      [System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://Microsoft.LobServices.Sap/2007/03/Types/Rfc/", IsNullable=false)]
      public SIESLA_SD_DXML[] MENS_ERRO {
        get {
          return this.mENS_ERROField;
        }
        set {
          this.mENS_ERROField = value;
        }
      }
      
      /// <remarks/>
      [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true)]
      [System.Xml.Serialization.XmlArrayItemAttribute(Namespace="http://Microsoft.LobServices.Sap/2007/03/Types/Rfc/", IsNullable=false)]
      public SIESLA_SD_DXML[] XML {
        get {
          return this.xMLField;
        }
        set {
          this.xMLField = value;
        }
      }
    }
    
    
    Friday, May 13, 2011 12:07 PM
  • I am guessing that XSD.exe which is a VS tool may not understand how to create the class exactly right for the BizTalk schema. I would try referencing the SAP object in a .NET project using the add adapter service reference wizard because this will generate proxy classes that should look roughly similar to what xsd.exe generated but should generate a class by BizTalk supported code which may create more conformant C# code.

    Thanks,


    If this answers your question, please use the "Answer" button to say so | Ben Cline
    Saturday, May 14, 2011 12:12 PM
  • Hi Ben

    I generated the classes using the Add Adapter Service Reference Wizard, and the error on BizTalk still the same...

    The code generated is a lot diferent from before, but stills not working...

    cannot implicitly convert type 'SIESLA_SD_RFC_SIGNATURE_FILEResponse' to 'message Schemas.SLA_SD_RFC_SIGNATURE_FILE._x002F_SIE_x002F_SLA_SD_RFC_SIGNATURE_FILEResponse '

    //------------------------------------------------------------------------------
    // <auto-generated>
    //   This code was generated by a tool.
    //   Runtime Version:2.0.50727.3620
    //
    //   Changes to this file may cause incorrect behavior and will be lost if
    //   the code is regenerated.
    // </auto-generated>
    //------------------------------------------------------------------------------
    
    [assembly: System.Runtime.Serialization.ContractNamespaceAttribute("http://Microsoft.LobServices.Sap/2007/03/Types/Rfc/", ClrNamespace = "microsoft.lobservices.sap._2007._03.Types.Rfc")]
    
    namespace microsoft.lobservices.sap._2007._03.Types.Rfc
    {
      using System.Runtime.Serialization;
    
    
      [System.Diagnostics.DebuggerStepThroughAttribute()]
      [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")]
      [System.Runtime.Serialization.DataContractAttribute(Name = "/SIE/SLA_SD_DXML", Namespace = "http://Microsoft.LobServices.Sap/2007/03/Types/Rfc/")]
      public partial class SIESLA_SD_DXML : object, System.Runtime.Serialization.IExtensibleDataObject
      {
    
        private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
    
        private string DATAField;
    
        public System.Runtime.Serialization.ExtensionDataObject ExtensionData
        {
          get
          {
            return this.extensionDataField;
          }
          set
          {
            this.extensionDataField = value;
          }
        }
    
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string DATA
        {
          get
          {
            return this.DATAField;
          }
          set
          {
            this.DATAField = value;
          }
        }
      }
    }
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
    [System.ServiceModel.ServiceContractAttribute(Namespace = "http://Microsoft.LobServices.Sap/2007/03/", ConfigurationName = "Rfc")]
    public interface Rfc
    {
    
      // CODEGEN: Generating message contract since the wrapper namespace (http://Microsoft.LobServices.Sap/2007/03/Rfc/) of message _x002F_SIE_x002F_SLA_SD_RFC_SIGNATURE_FILERequest does not match the default value (http://Microsoft.LobServices.Sap/2007/03/)
      [System.ServiceModel.OperationContractAttribute(Action = "http://Microsoft.LobServices.Sap/2007/03/Rfc/_x002F_SIE_x002F_SLA_SD_RFC_SIGNATUR" +
        "E_FILE", ReplyAction = "http://Microsoft.LobServices.Sap/2007/03/Rfc/_x002F_SIE_x002F_SLA_SD_RFC_SIGNATUR" +
        "E_FILE/response")]
      SIESLA_SD_RFC_SIGNATURE_FILEResponse SIESLA_SD_RFC_SIGNATURE_FILE(SIESLA_SD_RFC_SIGNATURE_FILERequest request);
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
    [System.ServiceModel.MessageContractAttribute(WrapperName = "/SIE/SLA_SD_RFC_SIGNATURE_FILE", WrapperNamespace = "http://Microsoft.LobServices.Sap/2007/03/Rfc/", IsWrapped = true)]
    public partial class SIESLA_SD_RFC_SIGNATURE_FILERequest
    {
    
      [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://Microsoft.LobServices.Sap/2007/03/Rfc/", Order = 0)]
      public string ADDR_HSM;
    
      [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://Microsoft.LobServices.Sap/2007/03/Rfc/", Order = 1)]
      public string ALIAS_CERT;
    
      [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://Microsoft.LobServices.Sap/2007/03/Rfc/", Order = 2)]
      public string ALIAS_KEY;
    
      [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://Microsoft.LobServices.Sap/2007/03/Rfc/", Order = 3)]
      public string NAMESPACE_ID;
    
      [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://Microsoft.LobServices.Sap/2007/03/Rfc/", Order = 4)]
      public string PORT_HSM;
    
      [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://Microsoft.LobServices.Sap/2007/03/Rfc/", Order = 5)]
      public string PWD_HSM;
    
      [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://Microsoft.LobServices.Sap/2007/03/Rfc/", Order = 6)]
      public string TAG_ID;
    
      [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://Microsoft.LobServices.Sap/2007/03/Rfc/", Order = 7)]
      public string USER_HSM;
    
      [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://Microsoft.LobServices.Sap/2007/03/Rfc/", Order = 8)]
      public string XPATH_DADOS;
    
      [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://Microsoft.LobServices.Sap/2007/03/Rfc/", Order = 9)]
      public string XPATH_ID;
    
      [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://Microsoft.LobServices.Sap/2007/03/Rfc/", Order = 10)]
      public microsoft.lobservices.sap._2007._03.Types.Rfc.SIESLA_SD_DXML[] MENS_ERRO;
    
      [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://Microsoft.LobServices.Sap/2007/03/Rfc/", Order = 11)]
      public microsoft.lobservices.sap._2007._03.Types.Rfc.SIESLA_SD_DXML[] XML;
    
      public SIESLA_SD_RFC_SIGNATURE_FILERequest()
      {
      }
    
      public SIESLA_SD_RFC_SIGNATURE_FILERequest(string ADDR_HSM, string ALIAS_CERT, string ALIAS_KEY, string NAMESPACE_ID, string PORT_HSM, string PWD_HSM, string TAG_ID, string USER_HSM, string XPATH_DADOS, string XPATH_ID, microsoft.lobservices.sap._2007._03.Types.Rfc.SIESLA_SD_DXML[] MENS_ERRO, microsoft.lobservices.sap._2007._03.Types.Rfc.SIESLA_SD_DXML[] XML)
      {
        this.ADDR_HSM = ADDR_HSM;
        this.ALIAS_CERT = ALIAS_CERT;
        this.ALIAS_KEY = ALIAS_KEY;
        this.NAMESPACE_ID = NAMESPACE_ID;
        this.PORT_HSM = PORT_HSM;
        this.PWD_HSM = PWD_HSM;
        this.TAG_ID = TAG_ID;
        this.USER_HSM = USER_HSM;
        this.XPATH_DADOS = XPATH_DADOS;
        this.XPATH_ID = XPATH_ID;
        this.MENS_ERRO = MENS_ERRO;
        this.XML = XML;
      }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
    [System.ServiceModel.MessageContractAttribute(WrapperName = "/SIE/SLA_SD_RFC_SIGNATURE_FILEResponse", WrapperNamespace = "http://Microsoft.LobServices.Sap/2007/03/Rfc/", IsWrapped = true)]
    public partial class SIESLA_SD_RFC_SIGNATURE_FILEResponse
    {
    
      [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://Microsoft.LobServices.Sap/2007/03/Rfc/", Order = 0)]
      public microsoft.lobservices.sap._2007._03.Types.Rfc.SIESLA_SD_DXML[] MENS_ERRO;
    
      [System.ServiceModel.MessageBodyMemberAttribute(Namespace = "http://Microsoft.LobServices.Sap/2007/03/Rfc/", Order = 1)]
      public microsoft.lobservices.sap._2007._03.Types.Rfc.SIESLA_SD_DXML[] XML;
    
      public SIESLA_SD_RFC_SIGNATURE_FILEResponse()
      {
      }
    
      public SIESLA_SD_RFC_SIGNATURE_FILEResponse(microsoft.lobservices.sap._2007._03.Types.Rfc.SIESLA_SD_DXML[] MENS_ERRO, microsoft.lobservices.sap._2007._03.Types.Rfc.SIESLA_SD_DXML[] XML)
      {
        this.MENS_ERRO = MENS_ERRO;
        this.XML = XML;
      }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
    public partial class RfcClient : System.ServiceModel.ClientBase<Rfc>, Rfc
    {
    
      public RfcClient()
      {
      }
    
      public RfcClient(string endpointConfigurationName)
        :
          base(endpointConfigurationName)
      {
      }
    
      public RfcClient(string endpointConfigurationName, string remoteAddress)
        :
          base(endpointConfigurationName, remoteAddress)
      {
      }
    
      public RfcClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress)
        :
          base(endpointConfigurationName, remoteAddress)
      {
      }
    
      public RfcClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress)
        :
          base(binding, remoteAddress)
      {
      }
    
      [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
      SIESLA_SD_RFC_SIGNATURE_FILEResponse Rfc.SIESLA_SD_RFC_SIGNATURE_FILE(SIESLA_SD_RFC_SIGNATURE_FILERequest request)
      {
        return base.Channel.SIESLA_SD_RFC_SIGNATURE_FILE(request);
      }
    
      public void SIESLA_SD_RFC_SIGNATURE_FILE(string ADDR_HSM, string ALIAS_CERT, string ALIAS_KEY, string NAMESPACE_ID, string PORT_HSM, string PWD_HSM, string TAG_ID, string USER_HSM, string XPATH_DADOS, string XPATH_ID, ref microsoft.lobservices.sap._2007._03.Types.Rfc.SIESLA_SD_DXML[] MENS_ERRO, ref microsoft.lobservices.sap._2007._03.Types.Rfc.SIESLA_SD_DXML[] XML)
      {
        SIESLA_SD_RFC_SIGNATURE_FILERequest inValue = new SIESLA_SD_RFC_SIGNATURE_FILERequest();
        inValue.ADDR_HSM = ADDR_HSM;
        inValue.ALIAS_CERT = ALIAS_CERT;
        inValue.ALIAS_KEY = ALIAS_KEY;
        inValue.NAMESPACE_ID = NAMESPACE_ID;
        inValue.PORT_HSM = PORT_HSM;
        inValue.PWD_HSM = PWD_HSM;
        inValue.TAG_ID = TAG_ID;
        inValue.USER_HSM = USER_HSM;
        inValue.XPATH_DADOS = XPATH_DADOS;
        inValue.XPATH_ID = XPATH_ID;
        inValue.MENS_ERRO = MENS_ERRO;
        inValue.XML = XML;
        SIESLA_SD_RFC_SIGNATURE_FILEResponse retVal = ((Rfc)(this)).SIESLA_SD_RFC_SIGNATURE_FILE(inValue);
        MENS_ERRO = retVal.MENS_ERRO;
        XML = retVal.XML;
      }
    }
    
    
    Monday, May 16, 2011 12:07 PM
  • Is this error at design-time/compile-time rather than run-time? If at compile-time, I would have the custom method return a .NET XmlDocument to get past the error the message Xml can still be the content from the class, just try using the XmlSerializer.

    Thanks,


    If this answers your question, please use the "Answer" button to say so | Ben Cline
    Monday, May 16, 2011 1:14 PM
  • Hi Ben,

    Yes, it`s an error on design-time/compile-time. I solved loading the contents in a XmlDocument and returning it to the orchestration.

    Thanks,
    Willians

    Wednesday, May 18, 2011 5:00 PM
  • 'SIESLA_SD_RFC_SIGNATURE_FILEResponse'  is a .net object

    while

    'message Schemas.SLA_SD_RFC_SIGNATURE_FILE._x002F_SIE_x002F_SLA_SD_RFC_SIGNATURE_FILEResponse

    is a XML schema.

    I think serialization in to XLlDocument is the only way for acheiving te intended conversion.


    Rohit Singh
    Thursday, May 19, 2011 9:04 AM