<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic CIM in an MVC3 app - how to instantiate ServiceSoap? in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/CIM-in-an-MVC3-app-how-to-instantiate-ServiceSoap/m-p/16292#M9205</link>
    <description>&lt;P&gt;I'm integrating CIM into an MVC3 app. &amp;nbsp;I've added a service reference using the development url and coded the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;        public long x()
        {
            var u = this.User.Identity as IClaimsIdentity;
            var id = u.Claims.First(x =&amp;gt; x.ClaimType == ClaimTypes.NameIdentifier);

            AuthorizeNet.CustomerProfileType cust = new AuthorizeNet.CustomerProfileType();
            cust.merchantCustomerId = id.Value;

            AuthorizeNet.MerchantAuthenticationType merch = new AuthorizeNet.MerchantAuthenticationType();
            merch.name = "8aFRk4663XMd";
            merch.transactionKey = "4MS675e62fQEdUXN";
            AuthorizeNet.ServiceSoap svc = new AuthorizeNet.ServiceSoap();
            AuthorizeNet.CreateCustomerProfileResponseType response = svc.CreateCustomerProfile(
                merch, cust, AuthorizeNet.ValidationModeEnum.none
            );
            return response.customerProfileId;
        }&lt;/PRE&gt;&lt;P&gt;but, of course, it doesn't work because one cannot instantiate an interface like that (.ServiceSoap is an interface). &amp;nbsp;The sample code makes a reference to a .Service - but that doesn't exist AFAICT.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so how is this supposed to work?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TIA - e!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 18 Aug 2011 07:36:19 GMT</pubDate>
    <dc:creator>ekkis</dc:creator>
    <dc:date>2011-08-18T07:36:19Z</dc:date>
    <item>
      <title>CIM in an MVC3 app - how to instantiate ServiceSoap?</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/CIM-in-an-MVC3-app-how-to-instantiate-ServiceSoap/m-p/16292#M9205</link>
      <description>&lt;P&gt;I'm integrating CIM into an MVC3 app. &amp;nbsp;I've added a service reference using the development url and coded the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;        public long x()
        {
            var u = this.User.Identity as IClaimsIdentity;
            var id = u.Claims.First(x =&amp;gt; x.ClaimType == ClaimTypes.NameIdentifier);

            AuthorizeNet.CustomerProfileType cust = new AuthorizeNet.CustomerProfileType();
            cust.merchantCustomerId = id.Value;

            AuthorizeNet.MerchantAuthenticationType merch = new AuthorizeNet.MerchantAuthenticationType();
            merch.name = "8aFRk4663XMd";
            merch.transactionKey = "4MS675e62fQEdUXN";
            AuthorizeNet.ServiceSoap svc = new AuthorizeNet.ServiceSoap();
            AuthorizeNet.CreateCustomerProfileResponseType response = svc.CreateCustomerProfile(
                merch, cust, AuthorizeNet.ValidationModeEnum.none
            );
            return response.customerProfileId;
        }&lt;/PRE&gt;&lt;P&gt;but, of course, it doesn't work because one cannot instantiate an interface like that (.ServiceSoap is an interface). &amp;nbsp;The sample code makes a reference to a .Service - but that doesn't exist AFAICT.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so how is this supposed to work?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TIA - e!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2011 07:36:19 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/CIM-in-an-MVC3-app-how-to-instantiate-ServiceSoap/m-p/16292#M9205</guid>
      <dc:creator>ekkis</dc:creator>
      <dc:date>2011-08-18T07:36:19Z</dc:date>
    </item>
    <item>
      <title>Re: CIM in an MVC3 app - how to instantiate ServiceSoap?</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/CIM-in-an-MVC3-app-how-to-instantiate-ServiceSoap/m-p/16296#M9207</link>
      <description>&lt;P&gt;incidentally, I did find an old post (&lt;A href="http://community.developer.authorize.net/t5/Integration-and-Testing/CIM-Integration-as-Service-Reference-to-Class-Library-Project/m-p/16294#M9206" target="_blank"&gt;http://community.developer.authorize.net/t5/Integration-and-Testing/CIM-Integration-as-Service-Reference-to-Class-Library-Project/m-p/16294#M9206&lt;/A&gt;﻿) with the exact problem I'm having but, alas, no solution.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2011 08:03:11 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/CIM-in-an-MVC3-app-how-to-instantiate-ServiceSoap/m-p/16296#M9207</guid>
      <dc:creator>ekkis</dc:creator>
      <dc:date>2011-08-18T08:03:11Z</dc:date>
    </item>
    <item>
      <title>Re: CIM in an MVC3 app - how to instantiate ServiceSoap?</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/CIM-in-an-MVC3-app-how-to-instantiate-ServiceSoap/m-p/16298#M9208</link>
      <description>&lt;P&gt;if there's a better solution, I'm all ears. &amp;nbsp;for now I'll be following this:&amp;nbsp;&lt;A href="http://stackoverflow.com/questions/7104192/cim-in-an-mvc3-app-how-to-instantiate-servicesoap/7104300#7104300" target="_blank"&gt;http://stackoverflow.com/questions/7104192/cim-in-an-mvc3-app-how-to-instantiate-servicesoap/7104300#7104300&lt;/A&gt;﻿&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2011 08:14:43 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/CIM-in-an-MVC3-app-how-to-instantiate-ServiceSoap/m-p/16298#M9208</guid>
      <dc:creator>ekkis</dc:creator>
      <dc:date>2011-08-18T08:14:43Z</dc:date>
    </item>
  </channel>
</rss>

