R
R. Sammut
Hi,
please help me get this working. I'm getting this error everytime I
execute the SaveBusiness.Send() function
System.Xml.XmlException: The root element is missing.
at System.Xml.XmlTextReader.Read()
at System.Xml.XmlReader.MoveToContent()
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream responseStream, Boolean
asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)
at Microsoft.Uddi.SoapClient.SaveBusiness(SaveBusiness
save_business)
at Microsoft.Uddi.Publish.SaveBusiness(SaveBusiness save_business)
at Microsoft.Uddi.SaveBusiness.Send()
at CustomerDB.Service1.publish() in
c:\inetpub\wwwroot\customerdb\service1.asmx.cs:line 203
--- End of inner exception stack trace ---
at CustomerDB.Service1.publish() in
c:\inetpub\wwwroot\customerdb\service1.asmx.cs:line 207
this is an extract of my code:
//Create Business
SaveBusiness sb = new SaveBusiness();
sb.BusinessEntities.Add();
sb.BusinessEntities[0].Name = "CustomerBusiness";
sb.BusinessEntities[0].Descriptions.Add("en","Insert Description
Here");
//Create BusinessService
sb.BusinessEntities[0].BusinessServices.Add();
sb.BusinessEntities[0].BusinessServices[0].Name = "CustomerService";
sb.BusinessEntities[0].BusinessServices[0].Descriptions.
Add("en","Insert Description of Service Here");
//Create BindingTemplate
sb.BusinessEntities[0].BusinessServices[0].BindingTemplates.Add();
sb.BusinessEntities[0].BusinessServices[0].BindingTemplates[0].
Descriptions.Add("en","Insert Description of Binding Here");
sb.BusinessEntities[0].BusinessServices[0].BindingTemplates[0].
AccessPoint.Text = "http://217.145.2.17/CustomerDB/Service1.asmx";
sb.BusinessEntities[0].BusinessServices[0].BindingTemplates[0].
AccessPoint.URLType = Microsoft.Uddi.Api.URLTypeEnum.Http;
//Create tModelInstanceInfo
sb.BusinessEntities[0].BusinessServices[0].BindingTemplates[0].
TModelInstanceDetail.TModelInstanceInfos.Add();
sb.BusinessEntities[0].BusinessServices[0].BindingTemplates[0].
TModelInstanceDetail.TModelInstanceInfos[0].Descriptions.
Add("en","Insert Description Here");
//Use tModelKey string from above
sb.BusinessEntities[0].BusinessServices[0].BindingTemplates[0].
TModelInstanceDetail.TModelInstanceInfos[0].TModelKey =
tmd.TModels[0].TModelKey;
BusinessDetail bd = sb.Send(); <<< Error occurs on the execution of
this line
regards,
RSAmmut
please help me get this working. I'm getting this error everytime I
execute the SaveBusiness.Send() function
System.Xml.XmlException: The root element is missing.
at System.Xml.XmlTextReader.Read()
at System.Xml.XmlReader.MoveToContent()
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream responseStream, Boolean
asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)
at Microsoft.Uddi.SoapClient.SaveBusiness(SaveBusiness
save_business)
at Microsoft.Uddi.Publish.SaveBusiness(SaveBusiness save_business)
at Microsoft.Uddi.SaveBusiness.Send()
at CustomerDB.Service1.publish() in
c:\inetpub\wwwroot\customerdb\service1.asmx.cs:line 203
--- End of inner exception stack trace ---
at CustomerDB.Service1.publish() in
c:\inetpub\wwwroot\customerdb\service1.asmx.cs:line 207
this is an extract of my code:
//Create Business
SaveBusiness sb = new SaveBusiness();
sb.BusinessEntities.Add();
sb.BusinessEntities[0].Name = "CustomerBusiness";
sb.BusinessEntities[0].Descriptions.Add("en","Insert Description
Here");
//Create BusinessService
sb.BusinessEntities[0].BusinessServices.Add();
sb.BusinessEntities[0].BusinessServices[0].Name = "CustomerService";
sb.BusinessEntities[0].BusinessServices[0].Descriptions.
Add("en","Insert Description of Service Here");
//Create BindingTemplate
sb.BusinessEntities[0].BusinessServices[0].BindingTemplates.Add();
sb.BusinessEntities[0].BusinessServices[0].BindingTemplates[0].
Descriptions.Add("en","Insert Description of Binding Here");
sb.BusinessEntities[0].BusinessServices[0].BindingTemplates[0].
AccessPoint.Text = "http://217.145.2.17/CustomerDB/Service1.asmx";
sb.BusinessEntities[0].BusinessServices[0].BindingTemplates[0].
AccessPoint.URLType = Microsoft.Uddi.Api.URLTypeEnum.Http;
//Create tModelInstanceInfo
sb.BusinessEntities[0].BusinessServices[0].BindingTemplates[0].
TModelInstanceDetail.TModelInstanceInfos.Add();
sb.BusinessEntities[0].BusinessServices[0].BindingTemplates[0].
TModelInstanceDetail.TModelInstanceInfos[0].Descriptions.
Add("en","Insert Description Here");
//Use tModelKey string from above
sb.BusinessEntities[0].BusinessServices[0].BindingTemplates[0].
TModelInstanceDetail.TModelInstanceInfos[0].TModelKey =
tmd.TModels[0].TModelKey;
BusinessDetail bd = sb.Send(); <<< Error occurs on the execution of
this line
regards,
RSAmmut