VMware {code} Community
laurentsd
VMware Employee
VMware Employee

2 Important reminders for your 5.5 plugin to be compatible with Web Client 6.0

As vSphere 6.0 is about to go GA here are two important reminders that will ensure that your Web Client plugin built with SDK 5.5 works correctly with 6.0.  Failure to do so will generate errors such as "Unable to load resource module from /myplugin-ui/locales/myplugin-ui-en_US.swf", or invalid proxy calls, because of the reverse-proxy used in vSphere 6.0.

This information has been included in the SDK Release Notes since the 5.5 version.  Be sure to read the full SDK 6.0 Release-Notes.html when you download the new SDK.

1) All UI plugins Web-ContextPath must use the format vsphere-client/plugin-name in MANIFEST.MF, i.e. be prefixed with vsphere-client, in anticipation of the 6.0 release where this will be required.

2) Plugins using java proxies must have two default channels in war/src/main/webapp/WEB-INF/flex/remote-config.xml and war/src/main/webapp/WEB-INF/flex/services-config.xml, "amf" and "secure-amf" as shown below:


<service id="remoting-service"

  class="flex.messaging.services.RemotingService">

  <adapters>

  <adapter-definition id="java-object"

  class="com.vmware.vise.messaging.remoting.JavaAdapterEx"

  default="true"/>

  </adapters>

  <default-channels>

   <channel ref="secure-amf"/>

   <channel ref="amf"/>

  </default-channels>

</service>

<services-config>

  <services>

  <service-include file-path="remoting-config.xml" />

  <default-channels>

    <channel ref="secure-amf"/>

    <channel ref="amf"/>

  </default-channels>

  </services>

  <channels>

  <channel-definition id="secure-amf" class="mx.messaging.channels.SecureAMFChannel">

  <endpoint url="https://{server.name}:{server.port}/{context.root}/messagebroker/amfsecure"

   class="com.vmware.vise.messaging.endpoints.SecureAMFEndpoint" />

  </channel-definition>

  <channel-definition id="amf" class="mx.messaging.channels.AMFChannel">

  <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amf"

   class="com.vmware.vise.messaging.endpoints.AMFEndpoint" />

  </channel-definition>

  </channels>

  ...

5 Replies
shravansofts
Contributor
Contributor

Thanks for the info.

Is there any information on release date of vSphere 6.0?

Reply
0 Kudos
erikDoesStorage
Enthusiast
Enthusiast

Does any of this effect those that are using the HTML bridge for all of their plugin?

Reply
0 Kudos
laurentsd
VMware Employee
VMware Employee

6.0 will be released in a week or two I think.

The Web-ContextPath format is relevant to all plugins, Flex and HTML  (because HTML plugins also include a .swf resource file)

The "amf" and "secure-amf" channels are only relevant to Flex plugins, and only those using a Java proxy.

Another important reminder for Flex plugins that define their own proxy class, they must use ServiceUtil.getDefaultChannelUri()  instead of hard-coding the channel URI:


public class EchoServiceProxy extends BaseProxy {

   private static const SERVICE_NAME:String = "EchoService";

   public function EchoServiceProxy() {

      // channelUri uses the Web-ContextPath defined in MANIFEST.MF

      const channelUri:String = ServiceUtil.getDefaultChannelUri(GlobalviewModule.contextPath);

      super(SERVICE_NAME, channelUri);

   }

If you don't have SDK 5.5.2 where getDefaultChannelUri() was added see a work-around in Important note for proxy class future compatibility

sleamhnanai
Contributor
Contributor

Hi,

I'm somewhat of a noob to VWC development so please excuse me if the following questions are not well informed!

I'm trying to determine the security impact of using this - Can you explain the scenarios where VWC uses https + "secure-amf", versus http + "amf"?

Is it always https for 5.x, and always http over reverse-proxy for 6.0? Or does it depend on how one's VWC or one's plugin is configured...

Thanks,

Niall

Reply
0 Kudos
laurentsd
VMware Employee
VMware Employee

http + "amf" is used in a 6.0 environment when the Web Client root module is behind the built-in reverse proxy (i.e. production setup)

https + "amf-secure" is used on pre 6.0 versions, or in 6.0 localhost setup when by-passing the reverse-proxy (i.e. development setup with https://localhost:9443/vsphere-client)