Web Service Operation invocation fails
There can be multiple reasons for that:
Symptom 1
- View the defaultTrace
- If the following exceptions appear, there is a problem in the request (parameters sent to server):
- XmlMarshalException
- XML Serialization Error
A mandatory parameter may be missing, or, a parameter may not fulfill schema restrictions (e.g. length, min/max values etc)
- Option 1: Validate the request sent to the server
- 100% guarantee
- Hard to achieve if the schema imports additional schemas (<xsd:import>)
- Hard to achieve if more than 1 schema within <wsdl:types>
- Option 2: Compare to Metadata written to defaultTrace
Solution
Add the missing parameter, or, set its value to fulfill the restrictions
Symptom 2
- View the defaultTrace
- If the following exceptions appear, there is a problem in the response (sent by the server):
- XmlUnmarshalException
- XML Deserialization Error
Within service response, a mandatory parameter might be missing, or, a parameter might not fulfill schema restrictions (e.g. length, min/max values etc)
- Option 1: Validate the request sent to the server
- 100% guarantee
- Hard to achieve if the schema imports additional schemas (<xsd:import>)
- Hard to achieve if more than 1 schema within <wsdl:types>
- Option 2: Compare to Metadata written to defaultTrace
Solution
Contact the web service provider to fix the server side.