Skip to content

Instantly share code, notes, and snippets.

@OlegYch
Created November 12, 2011 15:26
Show Gist options
  • Save OlegYch/1360681 to your computer and use it in GitHub Desktop.
Save OlegYch/1360681 to your computer and use it in GitHub Desktop.
// Generated by <a href="http://scalaxb.org/">scalaxb</a>.
case class ComplexEntity(test: EntityType)
trait EntityType
object EntityType {
def fromString(value: String): EntityType = value match {
case "Account" => Account
}
}
case object Account extends EntityType { override def toString = "Account" }
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:ns1="http://schemas.datacontract.org/Entities"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://tempuri.org/">
<wsdl:types>
<xsd:schema
attributeFormDefault="unqualified" elementFormDefault="qualified"
targetNamespace="http://schemas.datacontract.org/Entities">
<xsd:complexType name="ComplexEntity">
<xsd:sequence>
<xsd:element name="test" type="ns1:EntityType"/>
</xsd:sequence>
</xsd:complexType>
<xsd:simpleType name="EntityType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Account"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:element name="EntityType" nillable="true" type="ns1:EntityType"/>
</xsd:schema>
</wsdl:types>
</wsdl:definitions>
// Generated by <a href="http://scalaxb.org/">scalaxb</a>.
case class ComplexEntity(test: com.entities.EntityType)
trait EntityType
object EntityType {
def fromString(value: String): EntityType = value match {
case "Account" => Account
}
}
case object Account extends EntityType { override def toString = "Account" }
// Generated by <a href="http://scalaxb.org/">scalaxb</a>.
trait EntityType
object EntityType {
def fromString(value: String): EntityType = value match {
case "Account" => Account
}
}
case object Account extends EntityType { override def toString = "Account" }
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:ns1="http://schemas.datacontract.org/Entities"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://tempuri.org/">
<wsdl:types>
<xsd:schema
attributeFormDefault="unqualified" elementFormDefault="qualified"
targetNamespace="http://schemas.datacontract.org/Entities">
<xsd:complexType name="ComplexEntity">
<xsd:sequence>
<xsd:element name="test" type="ns1:EntityType"/>
</xsd:sequence>
</xsd:complexType>
<xsd:simpleType name="EntityType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Account"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:element name="EntityType" nillable="true" type="ns1:EntityType"/>
</xsd:schema>
</wsdl:types>
</wsdl:definitions>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment