Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Run Stop Method: runs the Stop() method.
  • References: maintains a list of references used by the device (see Using References below).
  • Service References:  maintains a list of web and service references (see Using Web and Service References below).
  • Resources: maintains a list of embedded resource files (see Using Resources below).
  • Code: maintains a list of code files (see Using code files below).
  • Transform status: displays the compile status and method calls (Start, Stop, ProcessMessage).
  • Input Message: If there are messages in the upstream Queue, you can view the messages in this pane by selecting one. Use the forward/back arrows to browse through the messages in the queue. You can also paste a message into this pane. This message is used as the source message for your transform.
  • Output Message: displays the resulting message after the transform is executed, and highlights any differences.
  • Debug Output Pane: displays the results of any Logger method calls (for example, Logger.DebugFormat(...)).
  • Compile Errors: displays any errors generated by the compiler.

...

You can also use references to a remote service (usually a SOAP service) in your Custom Code device. Right click the Service Reference item and select Add Service Reference. The Add Service Reference window will be displayed.

<screen shot>

The window contains the following:

  • Service address: the URL/URI of the service to connect to.
  • Parse Service button: click to connect to the service and query for methods and properties.
  • Service Information: displays the mthods and properties exposed by the given service.
  • Add Reference button: click to generate the service proxy class and add it to your project.

Using a Service Proxy

Unlike service proxies created in Visual Studio (which use separate definition files), you must explicitly initialize your proxy object before use. For example, you can use the following code in your Start() method [Also see the sample templates included with Connexion]:

//init the bing service. The values you use here should match the contents of the wsdl file for your service.
//Binding - choose a binding which is defined in the wsdl. You can set security in the binding.security classes.
BasicHttpBinding binding = new BasicHttpBinding();
//the uri of the web service.
EndpointAddress endpoint = new EndpointAddress("http://dev.virtualearth.net/webservices/v1/geocodeservice/geocodeservice.svc");

var serviceFactory = new ChannelFactory<IGeocodeService>(binding, endpoint);
m_BingService = serviceFactory.CreateChannel();
if(m_BingService != null)
Logger.Debug("Successfully created proxy to Bing geocode service.");

Using Resources