</xsd:appinfo>
</xsd:annotation>
<xsd:all>
- <xsd:element name="data" type="parent:limitedString"/>
+ <xsd:element name="data" type="parent:limitedStringType"/>
</xsd:all>
</xsd:complexType>
</xsd:element>
<soap12:address location="http://localhost:8080/web-services-spring-cxf-server/spring-ws/example"/>
</wsdl:port>
</wsdl:service>
-</wsdl:definitions>
\ No newline at end of file
+</wsdl:definitions>
</xsd:appinfo>
</xsd:annotation>
<xsd:all>
- <xsd:element name="data" type="parent:limitedString" />
+ <xsd:element name="data" type="parent:limitedStringType" />
</xsd:all>
</xsd:complexType>
</xsd:element>
<xsd:sequence> specifies child elements can only appear in the order mentioned.
-->
+ <!-- WARNING: I DO NOT KNOW WHY BUT TYPES WORK BETTER WITH JAXB IF THEY END WITH THE Type SUFFIX!!!! :/ -->
<xsd:simpleType name="parentEnumType">
<xsd:restriction base="xsd:token">
<xsd:enumeration value="FIRST"/>
</xsd:restriction>
</xsd:simpleType>
- <xsd:simpleType name="limitedString">
+ <!-- WARNING: I DO NOT KNOW WHY BUT TYPES WORK BETTER WITH JAXB IF THEY END WITH THE Type SUFFIX!!!! :/ -->
+ <xsd:simpleType name="limitedStringType">
<xsd:restriction base="xsd:string">
<xsd:maxLength value="30" />
</xsd:restriction>
</xsd:simpleType>
- <xsd:complexType name="element">
+ <!-- WARNING: I DO NOT KNOW WHY BUT TYPES WORK BETTER WITH JAXB IF THEY END WITH THE Type SUFFIX!!!! :/ -->
+ <xsd:complexType name="elementType">
<xsd:sequence>
<xsd:element name="message" type="xsd:string"/>
<xsd:element name="messageArgs" type="xsd:string" minOccurs="0" maxOccurs="100"/>
</xsd:sequence>
</xsd:complexType>
- <xsd:element name="GeneralFault">
+ <xsd:element id="GeneralFault" name="GeneralFault">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="technicalError" type="xsd:string" />
- <xsd:element name="elements" type="element" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="elements" type="elementType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
import org.springframework.ws.soap.server.endpoint.SoapFaultDefinitionEditor;
import de.spring.webservices.exceptions.CustomBusinessException;
-import de.spring.webservices.server.auto.Element;
-import de.spring.webservices.server.auto.GeneralFault;
+import de.spring.webservices.parent.auto.ElementType;
+import de.spring.webservices.parent.auto.GeneralFault;
public class MyCustomMappingExceptionResolver extends AbstractSoapFaultDefinitionExceptionResolver {
private static final Logger LOGGER = LoggerFactory.getLogger(MyCustomMappingExceptionResolver.class);
GeneralFault customFault = new GeneralFault();
customFault.setTechnicalError(getStackTrace(ex));
- Element element = buildElement(ex);
- List<Element> elements = customFault.getElements();
+ ElementType element = buildElement(ex);
+ List<ElementType> elements = customFault.getElements();
elements.add(element);
SoapFaultDetail detail = fault.addFaultDetail();
this.marshaller = marshaller;
}
- private Element buildElement(Exception ex) {
- Element element = new Element();
+ private ElementType buildElement(Exception ex) {
+ ElementType element = new ElementType();
element.setMessage(ex.getMessage());
if (ex instanceof CustomBusinessException) {
</xsd:appinfo>
</xsd:annotation>
<xsd:all>
- <xsd:element name="data" type="parent:limitedString" />
+ <xsd:element name="data" type="parent:limitedStringType" />
</xsd:all>
</xsd:complexType>
</xsd:element>
</xsd:appinfo>
</xsd:annotation>
<xsd:all>
- <xsd:element name="data" type="parent:limitedString"/>
+ <xsd:element name="data" type="parent:limitedStringType"/>
</xsd:all>
</xsd:complexType>
</xsd:element>
</xsd:appinfo>
</xsd:annotation>
<xsd:all>
- <xsd:element name="data" type="parent:limitedString" />
+ <xsd:element name="data" type="parent:limitedStringType" />
</xsd:all>
</xsd:complexType>
</xsd:element>
<xsd:sequence> specifies child elements can only appear in the order mentioned.
-->
+ <!-- WARNING: I DO NOT KNOW WHY BUT TYPES WORK BETTER WITH JAXB IF THEY END WITH THE Type SUFFIX!!!! :/ -->
<xsd:simpleType name="parentEnumType">
<xsd:restriction base="xsd:token">
<xsd:enumeration value="FIRST"/>
</xsd:restriction>
</xsd:simpleType>
- <xsd:simpleType name="limitedString">
+ <!-- WARNING: I DO NOT KNOW WHY BUT TYPES WORK BETTER WITH JAXB IF THEY END WITH THE Type SUFFIX!!!! :/ -->
+ <xsd:simpleType name="limitedStringType">
<xsd:restriction base="xsd:string">
<xsd:maxLength value="30" />
</xsd:restriction>
</xsd:simpleType>
- <xsd:complexType name="element">
+ <!-- WARNING: I DO NOT KNOW WHY BUT TYPES WORK BETTER WITH JAXB IF THEY END WITH THE Type SUFFIX!!!! :/ -->
+ <xsd:complexType name="elementType">
<xsd:sequence>
<xsd:element name="message" type="xsd:string"/>
<xsd:element name="messageArgs" type="xsd:string" minOccurs="0" maxOccurs="100"/>
</xsd:sequence>
</xsd:complexType>
- <xsd:element name="GeneralFault">
+ <xsd:element id="GeneralFault" name="GeneralFault">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="technicalError" type="xsd:string" />
- <xsd:element name="elements" type="element" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="elements" type="elementType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
import org.springframework.ws.soap.server.endpoint.SoapFaultDefinitionEditor;
import de.spring.webservices.exceptions.CustomBusinessException;
-import de.spring.webservices.parent.auto.Element;
+import de.spring.webservices.parent.auto.ElementType;
import de.spring.webservices.parent.auto.GeneralFault;
public class MyCustomMappingExceptionResolver extends AbstractSoapFaultDefinitionExceptionResolver {
GeneralFault customFault = new GeneralFault();
customFault.setTechnicalError(getStackTrace(ex));
- Element element = buildElement(ex);
- List<Element> elements = customFault.getElements();
+ ElementType element = buildElement(ex);
+ List<ElementType> elements = customFault.getElements();
elements.add(element);
SoapFaultDetail detail = fault.addFaultDetail();
this.marshaller = marshaller;
}
- private Element buildElement(Exception ex) {
- Element element = new Element();
+ private ElementType buildElement(Exception ex) {
+ ElementType element = new ElementType();
element.setMessage(ex.getMessage());
if (ex instanceof CustomBusinessException) {
</xsd:appinfo>
</xsd:annotation>
<xsd:all>
- <xsd:element name="data" type="parent:limitedString" />
+ <xsd:element name="data" type="parent:limitedStringType" />
</xsd:all>
</xsd:complexType>
</xsd:element>