web service call fails - type mismatch
Hi All
I hope someone can help, as I have been struggling with this issue for a few days. If I have missed any useful information off of this post, please ask and I will try to supply.
I am trying to call a web service, but contantly receiving the error:
"{http://springframework.org/spring-ws}ValidationError:cvc-elt.4.3: Type 'xsd:long' is not validly derived from the type definition, 'idField', of element 'documentId'."
An example of the call to the webservice is:
<cfscript>
getDocumentAsPdfRequest = structNew();
getDocumentAsPdfRequest.documentId = 12017988;
getDocumentAsPdfRequest.ignoreUnsupportedConversion = 0;
ws = createObject("webservice", "#wsdldocumenturl#");
ws.setUsername("#wsdlusername#");
ws.setPassword("#wsdlpassword#");
myresult = ws.getDocumentAsPdf(getDocumentAsPdfRequest);
</cfscript>
<cfdump var="#myresult#">
the webservice definition is:
getDocumentAsPdfRequest type getDocumentAsPdfRequest
- documentId type idField - type long with restriction minInclusive(1000) maxInclusive(9223372036854775807)
Id of the document to be converted to pdf
- ignoreUnsupportedConversion type boolean
Specifying true for this will return the original document without converting - if a conversion is not possible
the webservice xml is:
<xs:element name="getDocumentAsPdfRequest">
<xs:element name="ignoreUnsupportedConversion" type="xs:boolean">
</xs:element>
I have tried using javacast("long", "12017988"), but the same error is shown
any help or advise gratefully received.
Thanks,
Darren
