Ryan,
For #2, can you give me a simple WSDL that recreates problem instead of
having me try to recreate WSDL? I think I know what the problem is, but I
need to verify against a WSDL.
Nadir Amra
"McCullough, Ryan" <[EMAIL PROTECTED]> wrote on 05/23/2008 11:22:37
AM:
> Here are a list of issues I encountered with the generated soap objects.
>
>
>
> 2) I also think I found a problem with XSD_DOUBLE and XSD_DATETIME.
>
> I have this in my schema xsd:
> <xs:complexType name="ac_value">
> <xs:choice>
> <xs:element name="cval" minOccurs="0" nillable="true"
> type="currency" />
> <xs:element name="dval" minOccurs="0" nillable="true"
> type="xs:double" />
> <xs:element name="ival" minOccurs="0" nillable="true"
> type="xs:long" />
> <xs:element name="sval" minOccurs="0" nillable="true"
> type="xs:string" />
> <xs:element name="tval" minOccurs="0" nillable="true"
> type="dttm" />
> </xs:choice>
> </xs:complexType>
>
> It was generating this code in the "Serialize sub-elements." section:
> else if(param->dval)
> {
> if (param->dval != NULL)
> pSZ->serializeAsElement("dval", Axis_URI_Ac_value,
> (void*)(*(param->dval)), XSD_DOUBLE);
> }
> // snipped irrelevant code
> else if(param->tval)
> {
> if (param->tval != NULL)
> pSZ->serializeAsElement("tval", Axis_URI_Ac_value,
> (void*)(*(param->tval)), XSD_DATETIME);
> }
>
> When I tried to compile this file, I received these 2 errors:
> error C2440: 'type cast' : cannot convert from 'double' to 'void *'
> error C2440: 'type cast' : cannot convert from 'struct tm' to 'void *'
>
> If I removed the de-reference * from param, the compile errors went
away.
> pSZ->serializeAsElement("dval", Axis_URI_Ac_value, (void*)(param->dval),
> XSD_DOUBLE);
> pSZ->serializeAsElement("tval", Axis_URI_Ac_value, (void*)(param->tval),
> XSD_DATETIME);
>
>
>
> 3) I received warnings all over the place about peekedElementName not
being
> used (unreferenced). So, I removed the lines:
> // We always use this...
> writer.write("\tconst char* peekedElementName;\n");
>
> And then where peekedElementName is used, I added this code:
> // We only peek for elements, not element attributes!
> if (attribs[i].isOptional() && !attribs[i].isAttribute())
> {
> writer.write(tab1 + "\tconst char* peekedElementName" + soapTagName
+
> ";\n");
> writer.write(tab1 + "peekedElementName" + soapTagName + " =
> pIWSDZ->peekNextElementName();\n");
> writer.write(tab1 + "if (strcmp(peekedElementName" + soapTagName +
",
> \"" + soapTagName + "\") == 0)\n");
> writer.write(tab1 + "{\n");
> tab2 += "\t";
> }
>
> if (attribs[i].isOptional())
> {
> writer.write(tab1 + "\tconst char* peekedElementName" + soapTagName
+
> ";\n");
> writer.write(tab1 + "peekedElementName" + soapTagName + " =
> pIWSDZ->peekNextElementName();\n");
> writer.write(tab1 + "if (strcmp(peekedElementName" + soapTagName +
",
> \"" + soapTagName + "\") == 0)\n");
> tab2 += "\t";
> }
>
> I had to append the soapTagName to the peekedElementName, otherwise I
got
> re-definition errors.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]