When I try to import a WSDL (http://ns.hr-xml.org/schemas/org_hr-xml/3_0/Services/Web_Services/WSDL/TimeCard.wsdl) via WCF Test Client I get the "
WCF Operation not supported in WCF Test Client"
because it uses type " error message as shown on screenshot.
The contract looks like below, I'm not sure why I'm getting above error message. Could some one please guide me to right direction:
[System.ServiceModel.OperationContractAttribute(Action="ChangeTimeCard", ReplyAction="*")]
[System.ServiceModel.FaultContractAttribute(typeof(HRXMLTimeCard.HRXML_Candidate_3_1.ConfirmBODType), Action="ChangeTimeCard", Name="ConfirmBOD", Namespace="http://www.openapplications.org/oagis/9")]
[System.ServiceModel.XmlSerializerFormatAttribute(SupportFaults=true)]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BinaryObjectType))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(AmountType))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(QuantityType))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(PreferenceABIEType))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(AddressBaseType))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(NameType))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(PersonNameBaseType))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(TimePeriodABIEType))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(TextType))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(CodeType))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(StatusBasisType))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(VerbType))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(ResponseCodeType))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(IdentifierType))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BusinessObjectDocumentType))]
HRXMLTimeCard.HRXML_Candidate_3_1.ProcessTimeCardResponse ChangeTimeCard(HRXMLTimeCard.HRXML_Candidate_3_1.ChangeTimeCardRequest request);
And this is the ChangeTimeCardRequest class:
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
[System.ServiceModel.MessageContractAttribute(IsWrapped=false)]
public partial class ChangeTimeCardRequest {
[System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://www.hr-xml.org/3", Order=0)]
public HRXMLTimeCard.HRXML_Candidate_3_1.ChangeTimeCardType ChangeTimeCard;
public ChangeTimeCardRequest() {
}
public ChangeTimeCardRequest(HRXMLTimeCard.HRXML_Candidate_3_1.ChangeTimeCardType ChangeTimeCard) {
this.ChangeTimeCard = ChangeTimeCard;
}
}
Below is the ChangeTimeCardType:
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.225")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.hr-xml.org/3")]
public partial class ChangeTimeCardType : BusinessObjectDocumentType {
private ChangeTimeCardDataAreaType dataAreaField;
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Order=0)]
public ChangeTimeCardDataAreaType DataArea {
get {
return this.dataAreaField;
}
set {
this.dataAreaField = value;
this.RaisePropertyChanged("DataArea");
}
}
}
Also, if wsdl doesn't work in WCF Test Client, does it mean it won't work for all clients ie. Java or php?
Best Answer
I think your problem here is that WCF doesn't understand the type HRXMLTimeCard.HRXML_Candidate_3_1.ChangeTimeCardType. Where is the code for the HRXMLTimeCard.HRXML_Candidate_3_1.ChangeTimeCardType class?