Loading ...
Sorry, an error occurred while loading the content.

On-Behalf-Of Authorizations

Expand Messages
  • hmcclungiii
    I m setting up for On-behalf-of Authorizations, as described at http://ysm.techportal.searchmarketing.yahoo.com/docs/gsg/auth.asp#onbeha lfof. Unfortunately,
    Message 1 of 9 , Jan 7, 2007
    View Source
    • 0 Attachment
      I'm setting up for On-behalf-of Authorizations, as described at
      http://ysm.techportal.searchmarketing.yahoo.com/docs/gsg/auth.asp#onbeha
      lfof.

      Unfortunately, the onBehalfOfUsername and onBehalfOfPassword fields can
      be found in none of the WSDL files, which, among other things, makes
      generating proxy classes in .NET that support On-Behalf-Of
      Authorizations next to impossible.

      Any suggestions, ideas, workarounds?

      When is Yahoo expected to support this feature in their WSDL?
    • Yahoo! Search Marketing Monkey
      If the WSDL contains a header, it become mandatory per SOAP specs. So optional headers cannot be put into the WSDL, they must be manually injected by the
      Message 2 of 9 , Jan 7, 2007
      View Source
      • 0 Attachment
        If the WSDL contains a header, it become mandatory per SOAP specs. So
        optional headers cannot be put into the WSDL, they must be manually
        injected by the user. I agree it's clunky for you, but it's the only
        way to make things work cleanly for 99% of the users.

        I don't know of the .NET syntax required to do this, however.

        Best,
        -Y!SM Monkey

        hmcclungiii wrote:
        > I'm setting up for On-behalf-of Authorizations, as described at
        > http://ysm.techportal.searchmarketing.yahoo.com/docs/gsg/auth.asp#onbeha
        > lfof.
        >
        > Unfortunately, the onBehalfOfUsername and onBehalfOfPassword fields can
        > be found in none of the WSDL files, which, among other things, makes
        > generating proxy classes in .NET that support On-Behalf-Of
        > Authorizations next to impossible.
        >
        > Any suggestions, ideas, workarounds?
        >
        > When is Yahoo expected to support this feature in their WSDL?
        >
        >
        >
        >
        > Yahoo! Groups Links
        >
        >
        >
      • hmcclungiii
        That is hard to swallow to say the least. Who cares if it is required in the header? It is much easier to simply pass a null string as the value of required
        Message 3 of 9 , Jan 7, 2007
        View Source
        • 0 Attachment
          That is hard to swallow to say the least. Who cares if it is required
          in the header? It is much easier to simply pass a null string as the
          value of required onBehalfOfUsername and onBehalfOfPassword fields,
          than to manually edit proxy classes generated against an accepted
          standard SOAP sytax each time we sync our code against a new WSDL.

          Actually, this might be a good thing. I've got an idea about a little
          utility that a .NET developer can use to modify the .NET generated
          proxy classes to add the onBehalfOfUsername and onBehalfOfPassword
          fields when they update their proxy classes.

          Anyone feel free to let me know if you are interested in something like
          this.
        • don.frazier
          I have a hard time understanding why (presumably) the largest 1% of accounts don t get 100% support too. Maybe .... ah ... who cares about politics. Anyway
          Message 4 of 9 , Jan 8, 2007
          View Source
          • 0 Attachment
            I have a hard time understanding why (presumably) the largest 1% of
            accounts don't get 100% support too. Maybe .... ah ... who cares
            about politics. Anyway ...

            I used a little utility in vS.net called "the change command." I
            edit the generated WSDL to do the following:

            .) create the obo classes similar to the masterAccountId class


            .) edit the generated .cs file to add the onBehalfOf attributes.
            change all
            \[System.Web.Services.Protocols.SoapHeaderAttribute\(\"licenseValue\"\
            )\]
            to
            \[System.Web.Services.Protocols.SoapHeaderAttribute\(\"licenseValue\"\
            )\]\n
            \[System.Web.Services.Protocols.SoapHeaderAttribute\(\"onBehalfOfUsern
            ameValue\"\)\]\n
            \[System.Web.Services.Protocols.SoapHeaderAttribute\(\"onBehalfOfPassw
            ordValue\"\)\]
            using regular expressions
            .) Add the onBehalfOfUsername/onBehalfOfPassword to each service in
            the generated file.
            to each SoapHttpClientProtocol-derived class, add the following
            code snippet

            #region onBehalfOf properties extension
            private onBehalfOfUsername onBehalfOfUsernameField;
            private onBehalfOfPassword onBehalfOfPasswordField;

            public onBehalfOfUsername onBehalfOfUsernameValue
            {
            get
            {
            return this.onBehalfOfUsernameField;
            }
            set
            {
            this.onBehalfOfUsernameField = value;
            }
            }

            public onBehalfOfPassword onBehalfOfPasswordValue
            {
            get
            {
            return this.onBehalfOfPasswordField;
            }
            set
            {
            this.onBehalfOfPasswordField = value;
            }
            }
            #endregion onBehalfOf properties extension

            .) save and compile

            --- In yws-searchmarketing@yahoogroups.com, "hmcclungiii"
            <hmcclungiii@...> wrote:
            >
            > That is hard to swallow to say the least. Who cares if it is
            required
            > in the header? It is much easier to simply pass a null string as
            the
            > value of required onBehalfOfUsername and onBehalfOfPassword fields,
            > than to manually edit proxy classes generated against an accepted
            > standard SOAP sytax each time we sync our code against a new WSDL.
            >
            > Actually, this might be a good thing. I've got an idea about a
            little
            > utility that a .NET developer can use to modify the .NET generated
            > proxy classes to add the onBehalfOfUsername and onBehalfOfPassword
            > fields when they update their proxy classes.
            >
            > Anyone feel free to let me know if you are interested in something
            like
            > this.
            >
          • Yahoo! Search Marketing Monkey
            ... Yeah, don t get me wrong here. In my personal opinion, the 1% that need the OBO (on behalf of) commands tend to be a bit more technically adept and can
            Message 5 of 9 , Jan 8, 2007
            View Source
            • 0 Attachment
              > I have a hard time understanding why (presumably) the largest 1% of
              > accounts don't get 100% support too. Maybe .... ah ... who cares
              > about politics. Anyway ...

              Yeah, don't get me wrong here. In my personal opinion, the 1% that need
              the OBO (on behalf of) commands tend to be a bit more technically adept
              and can find tricks like you have done. That's a compliment :)

              Thanks for finding a reasonable solution.

              -Y!SM Monkey
            • don.frazier
              Here s a sample OBO property class ... Note the IsNullable=true setting that only adds this header to the request when it is present.
              Message 6 of 9 , Jan 8, 2007
              View Source
              • 0 Attachment
                Here's a sample OBO property class ... Note the IsNullable=true
                setting that only adds this header to the request when it is present.


                [System.SerializableAttribute()]
                [System.Diagnostics.DebuggerStepThroughAttribute()]
                [System.ComponentModel.DesignerCategoryAttribute("code")]
                [System.Xml.Serialization.XmlTypeAttribute(Namespace
                = "http://marketing.ews.yahooapis.com/V1")]
                [System.Xml.Serialization.XmlRootAttribute(Namespace
                = "http://marketing.ews.yahooapis.com/V1", IsNullable = true)]
                public partial class onBehalfOfUsername :
                System.Web.Services.Protocols.SoapHeader
                {

                private string[] textField;

                /// <remarks/>
                [System.Xml.Serialization.XmlTextAttribute()]
                public string[] Text
                {
                get
                {
                return this.textField;
                }
                set
                {
                this.textField = value;
                }
                }
                }



                --- In yws-searchmarketing@yahoogroups.com, "don.frazier"
                <don_frazier_2004@...> wrote:
                >
                > I have a hard time understanding why (presumably) the largest 1% of
                > accounts don't get 100% support too. Maybe .... ah ... who cares
                > about politics. Anyway ...
                >
                > I used a little utility in vS.net called "the change command." I
                > edit the generated WSDL to do the following:
                >
                > .) create the obo classes similar to the masterAccountId class
                >
                >
                > .) edit the generated .cs file to add the onBehalfOf attributes.
                > change all
                >
                \[System.Web.Services.Protocols.SoapHeaderAttribute\(\"licenseValue\"\
                > )\]
                > to
                >
                \[System.Web.Services.Protocols.SoapHeaderAttribute\(\"licenseValue\"\
                > )\]\n
                >
                \[System.Web.Services.Protocols.SoapHeaderAttribute\(\"onBehalfOfUsern
                > ameValue\"\)\]\n
                >
                \[System.Web.Services.Protocols.SoapHeaderAttribute\(\"onBehalfOfPassw
                > ordValue\"\)\]
                > using regular expressions
                > .) Add the onBehalfOfUsername/onBehalfOfPassword to each service in
                > the generated file.
                > to each SoapHttpClientProtocol-derived class, add the following
                > code snippet
                >
                > #region onBehalfOf properties extension
                > private onBehalfOfUsername onBehalfOfUsernameField;
                > private onBehalfOfPassword onBehalfOfPasswordField;
                >
                > public onBehalfOfUsername onBehalfOfUsernameValue
                > {
                > get
                > {
                > return this.onBehalfOfUsernameField;
                > }
                > set
                > {
                > this.onBehalfOfUsernameField = value;
                > }
                > }
                >
                > public onBehalfOfPassword onBehalfOfPasswordValue
                > {
                > get
                > {
                > return this.onBehalfOfPasswordField;
                > }
                > set
                > {
                > this.onBehalfOfPasswordField = value;
                > }
                > }
                > #endregion onBehalfOf properties extension
                >
                > .) save and compile
                >
                > --- In yws-searchmarketing@yahoogroups.com, "hmcclungiii"
                > <hmcclungiii@> wrote:
                > >
                > > That is hard to swallow to say the least. Who cares if it is
                > required
                > > in the header? It is much easier to simply pass a null string as
                > the
                > > value of required onBehalfOfUsername and onBehalfOfPassword
                fields,
                > > than to manually edit proxy classes generated against an accepted
                > > standard SOAP sytax each time we sync our code against a new WSDL.
                > >
                > > Actually, this might be a good thing. I've got an idea about a
                > little
                > > utility that a .NET developer can use to modify the .NET
                generated
                > > proxy classes to add the onBehalfOfUsername and
                onBehalfOfPassword
                > > fields when they update their proxy classes.
                > >
                > > Anyone feel free to let me know if you are interested in
                something
                > like
                > > this.
                > >
                >
              • hmcclungiii
                Thanks to all who responded. The problem was not related to my understanding of protocols, or soap, but as to how inconvenient it is to have to manually add
                Message 7 of 9 , Jan 11, 2007
                View Source
                • 0 Attachment
                  Thanks to all who responded.

                  The problem was not related to my understanding of protocols, or soap,
                  but as to how inconvenient it is to have to manually add code to proxy
                  classes generated by wsdl, each time they are updated.

                  Anyways, I've implemented YWS API proxies in a windows class library
                  assembly (.dll) that not only supports all YWS services as well as
                  OnBehalfOfAuthorizations without any VS WebReferences, but also exposes
                  a handy interface implemented by a generic parent class (inherited by
                  all of the service classes) so that you don't have to separately add
                  the headers for different services. It is also com-visible.

                  So if any .NET or even Visual Studio 6 developers out there want a
                  clean, simple and easy way to code against the Yahoo API's, shoot me an
                  email.
                • don.frazier
                  I would be interested. Sounds like you did something very similar to what I did. don dot frazier aatt yahooo dot comm ... soap, ... proxy ... library ...
                  Message 8 of 9 , Jan 11, 2007
                  View Source
                  • 0 Attachment
                    I would be interested. Sounds like you did something very similar to
                    what I did.

                    don dot frazier aatt yahooo dot comm
                    --- In yws-searchmarketing@yahoogroups.com, "hmcclungiii"
                    <hmcclungiii@...> wrote:
                    >
                    > Thanks to all who responded.
                    >
                    > The problem was not related to my understanding of protocols, or
                    soap,
                    > but as to how inconvenient it is to have to manually add code to
                    proxy
                    > classes generated by wsdl, each time they are updated.
                    >
                    > Anyways, I've implemented YWS API proxies in a windows class
                    library
                    > assembly (.dll) that not only supports all YWS services as well as
                    > OnBehalfOfAuthorizations without any VS WebReferences, but also
                    exposes
                    > a handy interface implemented by a generic parent class (inherited
                    by
                    > all of the service classes) so that you don't have to separately
                    add
                    > the headers for different services. It is also com-visible.
                    >
                    > So if any .NET or even Visual Studio 6 developers out there want a
                    > clean, simple and easy way to code against the Yahoo API's, shoot
                    me an
                    > email.
                    >
                  • verde160
                    Yes, I am definately interested. I wrote a web service in .NET 2.0 (VS2005) that accesses the Yahoo API but has no reference to OnBehalfOfAuthorizations.
                    Message 9 of 9 , Feb 2, 2007
                    View Source
                    • 0 Attachment
                      Yes, I am definately interested. I wrote a web service in .NET 2.0
                      (VS2005) that accesses the Yahoo API but has no reference to
                      OnBehalfOfAuthorizations. Please email me back. Thanks! =)

                      --- In yws-searchmarketing@yahoogroups.com, "hmcclungiii"
                      <hmcclungiii@...> wrote:
                      >
                      > Thanks to all who responded.
                      >
                      > The problem was not related to my understanding of protocols, or
                      soap,
                      > but as to how inconvenient it is to have to manually add code to
                      proxy
                      > classes generated by wsdl, each time they are updated.
                      >
                      > Anyways, I've implemented YWS API proxies in a windows class
                      library
                      > assembly (.dll) that not only supports all YWS services as well as
                      > OnBehalfOfAuthorizations without any VS WebReferences, but also
                      exposes
                      > a handy interface implemented by a generic parent class (inherited
                      by
                      > all of the service classes) so that you don't have to separately
                      add
                      > the headers for different services. It is also com-visible.
                      >
                      > So if any .NET or even Visual Studio 6 developers out there want a
                      > clean, simple and easy way to code against the Yahoo API's, shoot
                      me an
                      > email.
                      >
                    Your message has been successfully submitted and would be delivered to recipients shortly.