Use WSDL to construct your SOAP client. Even though a service endpoint URL is indicated in the WSDL, you must provide a location URL to your SOAP toolkit. This is necessary to transmit the application ID and the WSSID. In addition, you must set the cookie header containing the cookie that was returned with the WSSID when you credentialed the user in the previous step.
Cookies aren’t transport level independent. Heck, they are controversial even in HTTP. Do the developers of the Yahoo! Mail Web Service APIs care that they are making choices that may make it difficult to “port” this to a different transport layer than HTTP? I guess not. If I were in their shoes, I doubt I would either.
Looking at the Java example, we find the following comment:
Axis2 requires you to jump through some hoops to set a cookie on the SOAP proxy.
Can this same service be implemented using the JAX-WS (nee JAX-RPC) reference implementation? Would such an implementation, if indeed it were possible, be portable?
In not completely unrelated news, O’Reilly has issued a mascot for the RESTful Web Services book that I have been contributing to.
Update: Dims links to an Axis-specific interface that Yahoo!’s example could have used.
I think the “issued a mascot” link is wrong as it’s the same as the one before it...
Sam Ruby quotes from the new Yahoo! Mail API documentation: Use WSDL to construct your SOAP client. Even though a service endpoint URL is indicated in the WSDL, you must provide a location URL to your SOAP toolkit. This is necessary to transmit the application ID and the WSSID. In addition, you must set the cookie header containing the cookie......
[more]
Sam, it’s true...cookies aren’t transport independent. We have a traffic router (mail.yahooapis.com) that needs to route traffic based on where the user account is physically located. So having the credentials in the SOAP envelope would really slow down that routing process. Having them in the cookies means the router can get at them pretty quickly.
Hopefully that explains what’s going on. We are looking into how we can efficiently handle credentials inside of the envelope at the traffic router level. Until then, users will have to add some extra parameters to the endpoint URL and some cookies to the stub.
“Do the developers of the Yahoo! Mail Web Service APIs care that they are making choices that may make it difficult to “port” this to a different transport layer than HTTP? I guess not. If I were in their shoes, I doubt I would either.”...
The Yahoo! Developer blog has an entry entitled Introducing the Yahoo! Mail Web Service which states While we are certainly proud of the success of Yahoo! Mail, today we are announcing how we are going beyond the boundaries of the Yahoo! network...
Bringing sexy back. The Hobo migrations are sexy: create_table :updates do foreign_key :user foreign_key :group text :body string :type timestamps! end To infinity and beyond. I learned something new on Reddit today: DevGuy0: “OOP is the best...
This rules. This is the bane of my existence. At Proto, we are always trying to build (or help people build) cool apps that consume WSDLs and generate handy Proto interfaces to web services. When it works, it’s awesome. It’s......