Wednesday, March 24, 2010

Deploying a Git subdirectory in Capistrano

Many suggest applying a patch to capistrano but for me this isn't an option.

I found this solution which works:

stackoverflow

Perhaps this can be refactored in vendor plugin receipt

Monday, March 15, 2010

apache CXF and .NET

I had some troubles finding out why .NET (3.5 RC1) svcutil wasn't able to invoke my java CXF web service. Hope this may help you.

The error was:

exception = {"There was an error reflecting 'return'."} InnerException = {"The Form property may not be 'Unqualified' when an explicit Namespace property is present."}

It turned out that (besides mandatory namespaces) it was also caused by the fact svcutil doesn't like encoding arrays/lists as:

<xs:element form="qualified" maxoccurs="unbounded" minoccurs="0" name="linkedGroups" type="tns:group">

but it requires a nested element:

<xs:element form="qualified" minOccurs="0" name="linkedGroups">
  <xs:complexType>
     <xs:sequence>
        <xs:element form="qualified" maxOccurs="unbounded" minOccurs="0" name="item" type="tns:group"/>
     </xs:sequence>
  </xs:complexType>
</xs:element>

This can be accomplished with the following jaxws annotations:

@XmlElementWrapper(namespace = "http://rmi.r2d2.dnetlib.eu/", name = "linkedGroups")
@XmlElement(namespace = "http://rmi.r2d2.dnetlib.eu/", name = "item")
public List<Profile> getLinkedGroups() {
  return linkedGroups;
}

This blog helped me http://kjellsj.blogspot.com/2008/03/wcf-datacontractserializer-schema-rules.html

Monday, March 1, 2010

lazy clojure couchdb

lazy paged clojure couch db interface:

http://gist.github.com/318486