on 08-23-2008 5:51 AM
Error consuming NetWeaver Enterprise Services in .Net Client
I get error calling NetWeaver Enterprise Services:
Method EmployeeNameByEmployeeQueryResponse_InService.EmployeeNameByEmployeeQueryResponse_In can not be reflected
This is what I did
1. Create a C# Windows Application in Visual Studio 2005 with name POC_Client_For_EnterpriseServices
2. Add Web Reference to WSDL from
and give it this name: ECC_EMPLOYEENAMEBYEMPLOYEEQR
3. Add a using statement:
using POC_Client_For_EnterpriseServices.ECC_EMPLOYEENAMEBYEMPLOYEEQR;
4. Add a button named btnECC_EMPLOYEENAMEBYEMPLOYEEQR
5. Add a TextBox named ErrorMessage and set it's multiline property to True and expand it's height for multiline.
6. Write code in button_click event
private void btnECC_EMPLOYEENAMEBYEMPLOYEEQR_Click(object sender, EventArgs e)
{
try
{
EmployeeNameByEmployeeQueryMessageEmployeeNameSelectionByEmployee EmployeeNameSelectionByEmployee
= new EmployeeNameByEmployeeQueryMessageEmployeeNameSelectionByEmployee();
EmployeeNameSelectionByEmployee.EmployeeID = new EmployeeID();
EmployeeNameSelectionByEmployee.EmployeeID.Value = "00001273"; // or any other EmployeeID
Log Log = new Log();
EmployeeNameByEmployeeQueryResponse_InService proxy = new EmployeeNameByEmployeeQueryResponse_InService();
proxy.Credentials = GetCredentials();
proxy.EmployeeNameByEmployeeQueryResponse_In(EmployeeNameSelectionByEmployee, out Log);
}
catch (Exception ex)
{
ErrorMessage.Text = ex.Message + " " + ex.InnerException;
}
}
7. This is the detailed error:
Method EmployeeNameByEmployeeQueryResponse_InService.EmployeeNameByEmployeeQueryResponse_In can not be reflected.
System.InvalidOperationException: There was an error reflecting 'EmployeeNameSelectionByEmployee'. --->
System.InvalidOperationException: The Form property may not be 'Unqualified' when an explicit Namespace property is present.
at System.Xml.Serialization.XmlReflectionImporter.CheckForm(XmlSchemaForm form, Boolean isQualified)
at System.Xml.Serialization.XmlReflectionImporter.ImportAccessorMapping(MemberMapping accessor, FieldModel model, XmlAttributes a, String ns, Type choiceIdentifierType, Boolean rpc, Boolean openModel)
at System.Xml.Serialization.XmlReflectionImporter.ImportMemberMapping(XmlReflectionMember xmlReflectionMember, String ns, XmlReflectionMember[] xmlReflectionMembers, Boolean rpc, Boolean openModel)
at System.Xml.Serialization.XmlReflectionImporter.ImportMembersMapping(XmlReflectionMember[] xmlReflectionMembers, String ns, Boolean hasWrapperElement, Boolean rpc, Boolean openModel)
--- End of inner exception stack trace ---
at System.Xml.Serialization.XmlReflectionImporter.ImportMembersMapping(XmlReflectionMember[] xmlReflectionMembers, String ns, Boolean hasWrapperElement, Boolean rpc, Boolean openModel)
at System.Xml.Serialization.XmlReflectionImporter.ImportMembersMapping(String elementName, String ns, XmlReflectionMember[] members, Boolean hasWrapperElement, Boolean rpc, Boolean openModel, XmlMappingAccess access)
at System.Web.Services.Protocols.SoapReflector.ImportMembersMapping(XmlReflectionImporter xmlImporter, SoapReflectionImporter soapImporter, Boolean serviceDefaultIsEncoded, Boolean rpc, SoapBindingUse use, SoapParameterStyle paramStyle, String elementName, String elementNamespace, Boolean nsIsDefault, XmlReflectionMember[] members, Boolean validate, Boolean openModel, String key, Boolean writeAccess)
at System.Web.Services.Protocols.SoapReflector.ReflectMethod(LogicalMethodInfo methodInfo, Boolean client, XmlReflectionImporter xmlImporter, SoapReflectionImporter soapImporter, String defaultNs)
Pl refer to Page 5 of the following article, change "parameters" to "parameter" in WSDL as explained in the article.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, could you share how you fixed the error? My team is facing the same error and we have been trying for three days already without any luck. Hope you can share your solution with us. Thanks.
rgrds, Pam.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This problem is solved.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This problem is solved.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.