Thursday, December 30, 2010

How to statically serve a wsdl with WSF/PHP.

WSF/PHP has two modes of operations. When using wsdl mode, you will always start with a wsdl and hence, that wsdl will be served for ?wsdl request. On the other hand, you can write a service with annotations and the corresponding wsdl will be generated for you. However, when using the xml-in-out mode with WSMessage object as the input and output parameter for the operation, its better to be able to serve a wsdl that is saved in the server since auto generated wsdl’s schema might not match the operation accepted xml.

Getting this done is quite simple. all you need to do is to set the option “omitProcesswsdl” in WSService operations array to true. 

$opParams = array("testFunction"=>"WSMESSAGE");

$service = new WSService(array(  "wsdl"=>"mystaticwsdl.wsdl",
        "operations" => $operations,
        "actions"=>$actions );

By specifying omitProcesswsdl, you can prevent WSF/PHP from trying to process the operation as a WSDL Mode operation. Also note that you would need to set your function as of type WSMESSAGE by using opParams. This is a work about which is not required for current svn trunk.

Tuesday, December 14, 2010

Running Objective C code on Windows 7

If you are on Windows and want to run object c code, there are few Objective C  compilers available for windows. One such implementation of Objective C spec is  GNUstep project which has implementations for a number of operating systems including windows.

Installing it is straightforward. Download and run the installers in the specified order. Once its complete,  you will get a GNUstep option in the start menu.


Shell can be used to compile and run programs including Objective C programs. This shell has most of the unix programming utilities including gcc, g++ , make and gdb.

In order to build and run a sample program, easiest way is to use a makefile. For GUNstep, the makefile should be named GNUmakefile. If the makefile uses any other name, it should be specified in the make command.

Monday, December 13, 2010

How to fix VMWare server 2.0 VM No Internet Access issue on Windows 7

If you are on windows 7 and using VMWare 2.0. server, your virtual machines will have a problem of accessing the internet. 


However, there is a work around to get network access with the VM using the windows Internet Connection Sharing option. First open up the WMWare Virtual network editor vmnetcfg.exe located at C:\Program Files (x86)\VMware\VMware Server. 


On the “Host Virtual network Mapping” tab , for VMNet1, click the > button and select subnet option. Put an Ip address other then and click OK.  For VMnet8 adaptor click > and set the subnet ip to for the subnet option and on the default gateway option, set and click OK. This is the IP address Windows 7 assign when using Internet connection sharing option.

Open the ‘Network and Sharing Center’ from control panel and click ‘Change Adaptor Settings’ Open the properties for your active Internet connection, go to sharing tab and click the check box with option “allow other network users to connect through this computer’s internet connection” and for the Home networking connection , Select to connect though VMnet8.


Windows will tell that it will assign IP

If your VM machine does not have a fixed IP configured , it should be able to access internet without issue now. In case, it has a fixed IP configured, VM IP4 gateway and DNS1 should be changed to