[
http://issues.apache.org/jira/browse/AXISCPP-716?page=comments#action_12459327
]
Franz Fehringer commented on AXISCPP-716:
-----------------------------------------
I made a hack for detecting the presence/absence of optional attributes in
deserializing the SOAP response.
To this end i initialize the pertaining C++ attributes in the generated to
special values.
While this is not a real solution to the problem it might help others too (it
helped me alot!)?
The special values could also be all -1 (except from boolean) if that matters
for inclusion in SVN.
Comments?
$ pwd
/cd/d/Quellen/SVN/axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws
Index: cpp/BeanParamWriter.java
===================================================================
--- cpp/BeanParamWriter.java (Revision 480584)
+++ cpp/BeanParamWriter.java (Arbeitskopie)
@@ -1474,6 +1492,27 @@
writer.write("\t"+ attribs[i].getParamNameAsMember() +
" = NULL;\n");
writer.write("\t__axis_deepcopy_" +
attribs[i].getParamName() + " = false;\n");
}
+ else if (attribs[i].isAttribute() &&
attribs[i].isSimpleType())
+ {
+ String typeName = attribs[i].getTypeName();
+
+ if (typeName == "xsd__int" || typeName == "xsd__long"
|| typeName == "xsd__integer")
+ {
+ writer.write("\t" + attribs[i].getParamName() + "
= -9999999;\n");
+ }
+ else if (typeName == "xsd__double")
+ {
+ writer.write("\t" + attribs[i].getParamName() + "
= -99999999;\n");
+ }
+ else if (typeName == "xsd__boolean")
+ {
+ writer.write("\t" + attribs[i].getParamName() + "
= false_;\n");
+ }
+ else if (typeName == "xsd__date" || typeName ==
"xsd__time" || typeName == "xsd__dateTime")
+ {
+ writer.write("\t" + attribs[i].getParamName() +
".tm_sec = -9999999;\n");
+ }
+ }
}
}
writer.write("}\n");
@@ -1641,4 +1680,4 @@
{
return null;
}
-}
\ Kein Zeilenvorschub am Ende der Datei
+}
> Support for the attribute construct 'use'
> -----------------------------------------
>
> Key: AXISCPP-716
> URL: http://issues.apache.org/jira/browse/AXISCPP-716
> Project: Axis-C++
> Issue Type: Improvement
> Components: Client - Deserialization, Serialization, Server -
> Deserialization, SOAP, WSDL processing - Doc, WSDL processing - RPC
> Affects Versions: current (nightly)
> Reporter: Adrian Dick
>
> Currently, there is no support for the 'use' construct on attributes defined
> in a WSDL file.
> The values this can take are:
> - required
> - optional
> - prohibited
> The current default behaviour we provide matches to 'required', although
> WSDL2Ws does not validate this is definitely the case.
> To support optional we would need to do something similar to the behaviour
> for nillable on elements.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]