request wsdl service array object - arrays

I am using visual basic .net. I want to operate on wsdl service. I'm having a problem with something. I need to insert data into the service. I have no problem connecting to the service. but I could not run the function by using the objects defined in the wsdl file. I'm waiting for your help.
wsdl file
<wsdl:definitions xmlns:rfc="urn:sap-com:document:sap:rfc:functions" xmlns:p1="http://xxxxxxx.com/Retail/MAYA/TDMStokHareket" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" name="SI_TDMStokHareket_OB" targetNamespace="http://xxxxxx">
<wsdl:documentation/>
<wsp:UsingPolicy wsdl:required="false"/>
<wsp:Policy wsu:Id="OP_SI_TDMStokHareket_OB"/>
<wsdl:types>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:sap-com:document:sap:rfc:functions" targetNamespace="urn:sap-com:document:sap:rfc:functions">
<xsd:element name="ZRT_TDM_STOK_HAREKET">
<xsd:complexType>
<xsd:all>
<xsd:element name="ET_RETURN" minOccurs="0">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="item" type="ZRS_TDM_STOK_HAREKET_RES" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="IT_DATA" minOccurs="0">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="item" type="ZRS_TDM_STOK_HAREKET" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:all>
</xsd:complexType>
</xsd:element>
<xsd:element name="ZRT_TDM_STOK_HAREKET.Response">
<xsd:complexType>
<xsd:all>
<xsd:element name="EV_STATU" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="1"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="ET_RETURN" minOccurs="0">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="item" type="ZRS_TDM_STOK_HAREKET_RES" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="IT_DATA" minOccurs="0">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="item" type="ZRS_TDM_STOK_HAREKET" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:all>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="ZRS_TDM_STOK_HAREKET_RES">
<xsd:sequence>
<xsd:element name="MESSAGE" minOccurs="0">
<xsd:annotation>
<xsd:documentation>Message Text</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="220"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ZRS_TDM_STOK_HAREKET">
<xsd:sequence>
<xsd:element name="TDM_KODU" minOccurs="0">
<xsd:annotation>
<xsd:documentation>Search Term 1</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="20"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="DSN_KODU" minOccurs="0">
<xsd:annotation>
<xsd:documentation>Search Term 1</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="20"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="DSN_ALT_BAYI" minOccurs="0">
<xsd:annotation>
<xsd:documentation>Search Term 1</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="20"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="DSN_ALT_BAYI_ADI" minOccurs="0">
<xsd:annotation>
<xsd:documentation>Name</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="30"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="MATNR" minOccurs="0">
<xsd:annotation>
<xsd:documentation>Material Number</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="18"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="SERGE" minOccurs="0">
<xsd:annotation>
<xsd:documentation>Manufacturer serial number</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="30"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="MENGE" minOccurs="0">
<xsd:annotation>
<xsd:documentation>Quantity</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:decimal">
<xsd:totalDigits value="13"/>
<xsd:fractionDigits value="3"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</wsdl:types>
<wsdl:message name="rfc.ZRT_TDM_STOK_HAREKET.Input">
<wsdl:documentation/>
<wsdl:part name="parameters" element="rfc:ZRT_TDM_STOK_HAREKET"/>
</wsdl:message>
<wsdl:message name="rfc.ZRT_TDM_STOK_HAREKET.Output">
<wsdl:documentation/>
<wsdl:part name="parameters" element="rfc:ZRT_TDM_STOK_HAREKET.Response"/>
</wsdl:message>
<wsdl:portType name="SI_TDMStokHareket_OB">
<wsdl:documentation/>
<wsdl:operation name="SI_TDMStokHareket_OB">
<wsdl:documentation/>
<wsp:Policy>
<wsp:PolicyReference URI="#OP_SI_TDMStokHareket_OB"/>
</wsp:Policy>
<wsdl:input message="p1:rfc.ZRT_TDM_STOK_HAREKET.Input"/>
<wsdl:output message="p1:rfc.ZRT_TDM_STOK_HAREKET.Output"/>
</wsdl:operation>
</wsdl:portType>
vb code
client.SI_TDMStokHareket_OB(response.ET_RETURN, request.IT_DATA)
MsgBox(response.ET_RETURN(0).MESSAGE)
I can't send data to the function. Can you help with objects and arrays? thanks

I solved the problem of sending the values to the function as follows
ReDim request.IT_DATA(0)
request.IT_DATA(0) = New ZRS_TDM_STOK_HAREKET
request.IT_DATA(0).TDM_KODU = "70031.42002"
request.IT_DATA(0).DSN_KODU = "70031.42002"
request.IT_DATA(0).DSN_ALT_BAYI = "00000.12345"
request.IT_DATA(0).DSN_ALT_BAYI_ADI = "CAGLAR DSN ALT BAYISI"
request.IT_DATA(0).MATNR = "100000000000001287"
request.IT_DATA(0).SERGE = "445313311000213"
request.IT_DATA(0).MENGESpecified = True
request.IT_DATA(0).MENGE = 1
client.SI_TDMStokHareket_OB(response.ET_RETURN, request.IT_DATA)
MsgBox(response.ET_RETURN(0).MESSAGE)

Related

Change the connection string of the auto generated WEB API authentication?

I created a WEB API project that involves individual user accounts authentication. I have already an existing database with additional tables, how can I link my database to this project instead of creating a new one?
I tried to add an ADO entity model but still it can't reach my database.
What should be done in this case?
This is the web.config file :
<?xml version="1.0" encoding="utf-8"?>
<!--
For more information on how to configure your ASP.NET application, please
visit
https://go.microsoft.com/fwlink/?LinkId=301879
-->
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit
http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework"
type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection,
EntityFramework, Version=6.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<connectionStrings>
<add name="DefaultConnection" connectionString="Data Source=
(LocalDb)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\aspnet-
FlutterBackend-20200123055259.mdf;Initial Catalog=aspnet-FlutterBackend-
20200123055259;Integrated Security=True" providerName="System.Data.SqlClient" />
</connectionStrings>
<appSettings></appSettings>
<system.web>
<authentication mode="None" />
<compilation debug="true" targetFramework="4.7.2" />
<httpRuntime targetFramework="4.7.2" />
</system.web>
<system.webServer>
<modules>
<remove name="FormsAuthentication" />
</modules>
<handlers>
<remove name="ExtensionlessUrlHandler-Integrated-4.0" />
<remove name="OPTIONSVerbHandler" />
<remove name="TRACEVerbHandler" />
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
</handlers></system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin.Security"
publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin.Security.OAuth"
publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin.Security.Cookies"
publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35"
/>
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Antlr3.Runtime" publicKeyToken="eb42632606e9261f"
/>
<bindingRedirect oldVersion="0.0.0.0-3.5.0.2" newVersion="3.5.0.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Optimization"
publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-1.1.0.0" newVersion="1.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-1.6.5135.21930" newVersion="1.6.5135.21930" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" />
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<entityFramework>
<defaultConnectionFactory
type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs"
type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701" />
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+" />
</compilers>
</system.codedom>
</configuration>
I want to apply the authentication actions on my own database instead of the one autogenerated by the asp.net

xml /XSD file source ssis 2010 - data at root level is invalid to SQL server table

I am trying to learn how to load an XML (XML source) into SSIS 2010 , the data will then go to an SQL Server 2012 Table.
The issue I am having, Is I am trying to follow a tutorial, and I am getting the same error:
The XML Source was unable to read the XML data. Data at the root level is invalid. Line 1, position 1.
This when downloading any of the tables - the one I have chosen is region.
Here is the script - this is in an XSD file
<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="countries">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" name="country">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="iso2Code" type="xs:string" />
<xs:element minOccurs="0" name="name" type="xs:string" />
<xs:element minOccurs="0" name="region">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="id" type="xs:string" use="optional" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" name="adminregion">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="id" type="xs:string" use="optional" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" name="incomeLevel">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="id" type="xs:string" use="optional" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" name="lendingType">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="id" type="xs:string" use="optional" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" name="capitalCity" type="xs:string" />
<xs:element minOccurs="0" name="longitude" type="xs:string" />
<xs:element minOccurs="0" name="latitude" type="xs:string" />
</xs:sequence>
<xs:attribute name="id" type="xs:string" use="optional" />
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="page" type="xs:unsignedByte" use="optional" />
<xs:attribute name="pages" type="xs:unsignedByte" use="optional" />
<xs:attribute name="per_page" type="xs:unsignedByte" use="optional" />
<xs:attribute name="total" type="xs:unsignedByte" use="optional" />
</xs:complexType>
</xs:element>
</xs:schema>
The trail site is http://api.worldbank.org/countries
I have tried changing the top line
<?xml version="1.0" encoding="UTF-8" ?>
with no success. Please help

soapui wsdl empty request

I have tried to generate a wsdl, but when importing it into soap UI the request template is empty - there is no warning or anything else that indicates a problem.
this is the result
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body/>
</soapenv:Envelope>
The wsdl i have made looks like this (removed some for clarity)
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tns="http://localhost/powershell/" targetNamespace="http://localhost/powershell/" name="powershell">
<wsdl:types>
<xs:schema targetNamespace="http://localhost/powershell/" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="GetProcessRequest">
<xs:complexType name="GetProcessRequestType">
<xs:sequence>
<xs:element name="field1" minOccurs="0" type="xs:string" nillable="false" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="GetProcessResponse">
<xs:complexType name="GetProcessResponseType">
<xs:sequence>
<xs:element name="o1" minOccurs="0" type="xs:string" nillable="false" />
<xs:element name="o2" minOccurs="0" type="xs:string" nillable="false" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ListGetProcessResponse">
<xs:complexType name="ListGetProcessResponseType">
<xs:complexContent mixed="false">
<xs:restriction base="soapenc:Array">
<xs:attribute ref="soapenc:arrayType" wsdl:arrayType="GetProcessResponseType[]" />
</xs:restriction>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="GetItemsRequest">
<xs:complexType name="GetItemsRequestType">
<xs:sequence>
<xs:element name="field1" minOccurs="0" type="xs:string" nillable="false" />
<xs:element name="field2" minOccurs="0" type="xs:string" nillable="false" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="GetItemsResponse">
<xs:complexType name="GetItemsResponseType">
<xs:sequence>
<xs:element name="o1" minOccurs="0" type="xs:string" nillable="false" />
<xs:element name="o2" minOccurs="0" type="xs:string" nillable="false" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ListGetItemsResponse">
<xs:complexType name="ListGetItemsResponseType">
<xs:complexContent mixed="false">
<xs:restriction base="soapenc:Array">
<xs:attribute ref="soapenc:arrayType" wsdl:arrayType="GetItemsResponseType[]" />
</xs:restriction>
</xs:complexContent>
</xs:complexType>
</xs:element>
</xs:schema>
</wsdl:types>
<wsdl:portType name="powershell">
<wsdl:operation name="GetProcess">
<wsdl:input message="tns:GetProcessRequestMessage" />
<wsdl:output message="tns:GetProcessResponseMessage" />
</wsdl:operation>
<wsdl:operation name="GetItems">
<wsdl:input message="tns:GetItemsRequestMessage" />
<wsdl:output message="tns:GetItemsResponseMessage" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="powershellBinding" type="tns:powershell">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="GetProcess">
<soap:operation soapAction="http://localhost/powershell.svc/GetProcess" style="document">
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</soap:operation>
</wsdl:operation>
<wsdl:operation name="GetItems">
<soap:operation soapAction="http://localhost/powershell.svc/GetItems" style="document">
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</soap:operation>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="powershell">
<wsdl:port binding="tns:powershellBinding" name="powershellBinding">
<soap:address location="http://localhost/powershell.svc" />
</wsdl:port>
</wsdl:service>
<wsdl:message name="GetProcessRequestMessage">
<wsdl:part name="parameters" element="tns:GetProcessRequest" />
</wsdl:message>
<wsdl:message name="GetProcessResponseMessage">
<wsdl:part name="parameters" element="tns:ListGetProcessResponse" />
</wsdl:message>
<wsdl:message name="GetItemsRequestMessage">
<wsdl:part name="parameters" element="tns:GetItemsRequest" />
</wsdl:message>
<wsdl:message name="GetItemsResponseMessage">
<wsdl:part name="parameters" element="tns:GetItemsResponse" />
</wsdl:message>
</wsdl:definitions>
As far as i can tell, everything should be linked correctly, but obviously im missing something somewhere, i just cannot find it.
Your WSDL is not valid. The definition of soap:operation element does not allow any content. You need to close the element soap:operation straight away, without any subelements:
<soap:operation soapAction="http://localhost/powershell.svc/GetItems" style="document" />
You need to do the following change:
<wsdl:operation name="GetItems">
<soap:operation soapAction="http://localhost/powershell.svc/GetItems" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
Similarly for other operations.

ssis import problems to mapping some data into xml files

I need to import some data from XML file using a SSIS package to SQL Server but when I generate xsd file (from SSIS) some necessary data into XML file are not mapped as a column to output:
Here is a very similar model of xml file i'm using:
xml format model
It's required to import the data in line 2 (DocumentID, ExportID, JobID, RunID,CreationTime, StartTime, EndTime).
Here's how the XSD file is being generated from SSIS:
<?xml version="1.0"?>
<xs:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="urn:com:ssn:schema:export:SSNExportFormat.xsd">
<xsd:element name="SSNExportDocument">
<xsd:complexType>
<xsd:sequence>
<xsd:element minOccurs="0" name="MeterData">
<xsd:complexType>
<xsd:sequence>
<xsd:element minOccurs="0" name="RegisterData">
<xsd:complexType>
<xsd:sequence>
<xsd:element minOccurs="0" name="RegisterRead">
<xsd:complexType>
<xsd:sequence>
<xsd:element minOccurs="0" name="Tier">
<xsd:complexType>
<xsd:sequence>
<xsd:element minOccurs="0" maxOccurs="unbounded" name="Register">
<xsd:complexType>
<xsd:attribute name="Number" type="xsd:unsignedShort" use="optional" />
<xsd:attribute name="Summation" type="xsd:decimal" use="optional" />
<xsd:attribute name="SummationUOM" type="xsd:string" use="optional" />
<xsd:attribute name="CumulativeDemand" type="xsd:decimal" use="optional" />
<xsd:attribute name="MaximumDemand" type="xsd:decimal" use="optional" />
<xsd:attribute name="MaximumDemandTime" type="xsd:dateTime" use="optional" />
<xsd:attribute name="DemandUOM" type="xsd:string" use="optional" />
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="Number" type="xsd:unsignedByte" use="optional" />
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="ReadTime" type="xsd:dateTime" use="optional" />
<xsd:attribute name="GatewayCollectedTime" type="xsd:dateTime" use="optional" />
<xsd:attribute name="RegisterReadSource" type="xsd:string" use="optional" />
<xsd:attribute name="Season" type="xsd:unsignedByte" use="optional" />
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="StartTime" type="xsd:dateTime" use="optional" />
<xsd:attribute name="EndTime" type="xsd:dateTime" use="optional" />
<xsd:attribute name="NumberReads" type="xsd:unsignedByte" use="optional" />
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="MeterName" type="xsd:unsignedInt" use="optional" />
<xsd:attribute name="UtilDeviceID" type="xsd:string" use="optional" />
<xsd:attribute name="MacID" type="xsd:string" use="optional" />
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="Version" type="xsd:decimal" use="optional" />
<xsd:attribute name="DocumentID" type="xsd:string" use="optional" />
<xsd:attribute name="ExportID" type="xsd:string" use="optional" />
<xsd:attribute name="JobID" type="xsd:unsignedByte" use="optional" />
<xsd:attribute name="RunID" type="xsd:unsignedByte" use="optional" />
<xsd:attribute name="CreationTime" type="xsd:dateTime" use="optional" />
<xsd:attribute name="StartTime" type="xsd:dateTime" use="optional" />
<xsd:attribute name="EndTime" type="xsd:dateTime" use="optional" />
</xsd:complexType>
</xsd:element>
</xs:schema>
I'm new with SSIS and XML tasks and I would be grateful with any help! Tks...
I don't think you can achieve this using an XML Source component, you have to add a Script Component (as a Source), open the script component editor, add the output columns you need (DocumentID, ExportID, JobID, RunID,CreationTime, StartTime, EndTime).
Then open the script editor and write the following code (i used VB.NET):
You have to replace "C:\MyPath\xmlfile.xml" with the xml file path, also you have to add System.Xml.Linq dll as reference
Imports System
Imports System.Data
Imports System.Math
Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper
Imports Microsoft.SqlServer.Dts.Runtime.Wrapper
Imports System.Xml
Imports System.Xml.Linq
<Microsoft.SqlServer.Dts.Pipeline.SSISScriptComponentEntryPointAttribute>
<CLSCompliant(False)>
Public Class ScriptMain
Inherits UserComponent
Public Overrides Sub CreateNewOutputRows()
Dim strFilePath As String = "C:\MyPath\xmlfile.GetXmlNamespace"
Dim xml As XDocument = XDocument.Load(strFilePath)
Output0Buffer.AddRow()
With Output0Buffer
.DocumentID = If(xml.Root.Attribute("DocumentID") Is Nothing, "", xml.Root.Attribute("DocumentID").Value.ToString)
.ExportID = If(xml.Root.Attribute("ExportID") Is Nothing, "", xml.Root.Attribute("ExportID").Value.ToString)
.JobID = If(xml.Root.Attribute("JobID") Is Nothing, "", xml.Root.Attribute("JobID").Value.ToString)
.RunID = If(xml.Root.Attribute("RunID") Is Nothing, "", xml.Root.Attribute("RunID").Value.ToString)
.CreationTime = If(xml.Root.Attribute("CreationTime") Is Nothing, "", xml.Root.Attribute("CreationTime").Value.ToString)
.StartTime = If(xml.Root.Attribute("StartTime") Is Nothing, "", xml.Root.Attribute("StartTime").Value.ToString)
.EndTime = If(xml.Root.Attribute("EndTime") Is Nothing, "", xml.Root.Attribute("EndTime").Value.ToString)
End With
End Sub
End Class

Error:Could not Load File or Assembly Entity Framework 4.4.0.0 on opening application?

I have created a setup project and installed on local machine. The application opens but connection to Database doesnt occurs it throws error as following screen shot. I am using Entity Framework 4.0 but it asks for EntityFramework 4.4.0 don't know why? i have built this setup with framework 4.0 default with some devexpress & telerik tools in project.
NOTE: Their is no reference to Entity 4.4 but still it asks for 4.4 any idea? but reference to 4.0 is their in config file.
config markup:
<?xml version="1.0"?>
<configuration>
<configSections>
<!--<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>-->
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --></configSections>
<connectionStrings>
<!--<add name="XproEntities" connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlClient;provider connection string="data source=.\sqlexpress;initial catalog=Xpro;integrated security=True;multipleactiveresultsets=True;application name=EntityFramework"" providerName="System.Data.EntityClient" />-->
<!--<add name="XproEntities" connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlClient;provider connection string="data source=.\sqlexpress;initial catalog=Xpro;integrated security=True;multipleactiveresultsets=True;application name=EntityFramework"" providerName="System.Data.EntityClient" />-->
<!--For Reporting-->
<add name="Xpro1" connectionString="Data Source=.\sqlexpress;Initial Catalog=Xpro;Integrated Security=True" providerName="System.Data.SqlClient"/>
<!--For Xtreme forms-->
<add name="XproEntities" connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlClient;provider connection string="data source=.\sqlexpress;initial catalog=Xpro;integrated security=True;multipleactiveresultsets=True;application name=EntityFramework"" providerName="System.Data.EntityClient"/>
</connectionStrings>
<!--<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework"/>
</entityFramework>-->
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Telerik.Reporting" publicKeyToken="a9d7983dfcc261be" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-7.0.13.521" newVersion="7.0.13.521"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System" publicKeyToken="b77a5c561934e089" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Drawing" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Data" publicKeyToken="b77a5c561934e089" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Core" publicKeyToken="b77a5c561934e089" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Windows.Forms" publicKeyToken="b77a5c561934e089" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="WindowsBase" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Xml" publicKeyToken="b77a5c561934e089" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Xml.Linq" publicKeyToken="b77a5c561934e089" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="PresentationFramework" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.Serialization" publicKeyToken="b77a5c561934e089" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Data.Linq" publicKeyToken="b77a5c561934e089" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Security" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
It sounds like you have somehow managed to lose the EF reference, perhaps by accidentally adding the .net 4.5 version of the assembly.
The easiest way to resolve this is to go into nuget and uninstall EF 5 and then reinstall it. This will get nuget to readd it to your solution and set up the project reference correctly.

Resources