You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jaxme-dev@ws.apache.org by jo...@apache.org on 2004/02/07 22:52:33 UTC
cvs commit: ws-jaxme/src/pm/org/apache/ws/jaxme/generator/ino/api4j TaminoAPI4JSG.java
jochen 2004/02/07 13:52:33
Modified: src/pm/org/apache/ws/jaxme/generator/ino/api4j
TaminoAPI4JSG.java
Log:
Fixed a bug in the handling of simple elements.
Revision Changes Path
1.2 +12 -10 ws-jaxme/src/pm/org/apache/ws/jaxme/generator/ino/api4j/TaminoAPI4JSG.java
Index: TaminoAPI4JSG.java
===================================================================
RCS file: /home/cvs/ws-jaxme/src/pm/org/apache/ws/jaxme/generator/ino/api4j/TaminoAPI4JSG.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TaminoAPI4JSG.java 29 Jan 2004 21:35:01 -0000 1.1
+++ TaminoAPI4JSG.java 7 Feb 2004 21:52:33 -0000 1.2
@@ -236,16 +236,18 @@
private Set elementNames = new HashSet();
public ObjectSG getObjectSG(SGFactory pFactory, XSElement pElement) throws SAXException {
ObjectSG result = super.getObjectSG(pFactory, pElement);
- XsQName elementName = pElement.getName();
- if (!elementNames.contains(elementName)) {
- elementNames.add(elementName);
- // Does the element have an ino:id attribute? If not, create it
- XsQName qName = new XsQName(InoResponseHandler.INO_RESPONSE2_URI, "id", "ino");
- XSType stringType = XSString.getInstance();
- addAttribute(result.getTypeSG(), pElement.getType(), qName, stringType, "inoId");
- // Does the element have an ino:docname attribute? If not, create it
- qName = new XsQName(InoResponseHandler.INO_RESPONSE2_URI, "docname", "ino");
- addAttribute(result.getTypeSG(), pElement.getType(), qName, stringType, "inoDocname");
+ if (result.getTypeSG().isComplex()) {
+ XsQName elementName = pElement.getName();
+ if (!elementNames.contains(elementName)) {
+ elementNames.add(elementName);
+ // Does the element have an ino:id attribute? If not, create it
+ XsQName qName = new XsQName(InoResponseHandler.INO_RESPONSE2_URI, "id", "ino");
+ XSType stringType = XSString.getInstance();
+ addAttribute(result.getTypeSG(), pElement.getType(), qName, stringType, "inoId");
+ // Does the element have an ino:docname attribute? If not, create it
+ qName = new XsQName(InoResponseHandler.INO_RESPONSE2_URI, "docname", "ino");
+ addAttribute(result.getTypeSG(), pElement.getType(), qName, stringType, "inoDocname");
+ }
}
return result;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org