Показать сообщение отдельно
Старый 18.06.2008, 13:52   #11  
KingPeas is offline
KingPeas
Участник
Аватар для KingPeas
 
163 / 35 (2) +++
Регистрация: 09.01.2007
Адрес: Россия, Новосибирск
Пробую получить список объектов.
X++:
static void Mel_RSGetReportParameter2(Args _args)
{
    Microsoft.Dynamics.ReportingServices.ReportingService2005   ReportingServices = new Microsoft.Dynamics.ReportingServices.ReportingService2005();
    Microsoft.Dynamics.ReportingServices.CatalogItem            catalogItem;
    Microsoft.Dynamics.ReportingServices.ReportParameter        reportParameter;
    System.Net.ICredentials cred = CLRInterop::staticInvoke("System.Net.CredentialCache", "get_DefaultCredentials");

    System.Exception                                            exception;
    System.Array                                                ar;
    System.Uri                                                  url = new System.Uri('http://ax-dev/ReportServer');
    str         name;
    ;

    try
    {
        ReportingServices.set_WebServiceUrl('http://ax-dev/ReportServer');
        ReportingServices.set_Credentials(cred);
        ReportingServices.ListChildren('/',true);
    }
    catch (Exception::CLRError)
    {
        info('Ошибка .NET');
        exception = CLRInterop::getLastException();
        name = exception.ToString();
        info (name);
 
    }

    info('Конец');

}
А получаю ошибку. Судя по ошибке ему не нравиться вариант с передачей в качестве параметра '/'. В SRSProxy вызывается именно так, делал по аналогии. Что может не нравиться?
Цитата:
Info Сообщение (15:48:06) Ошибка .NET
Info Сообщение (15:48:06) System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: Client found response content type of '', but expected 'text/xml'.
The request failed with an empty response.
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.Dynamics.ReportingServices.ReportingService2005.ListChildren(String Item, Boolean Recursive)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at ClrBridgeImpl.InvokeClrInstanceMethod(ClrBridgeImpl* , ObjectWrapper* objectWrapper, Char* pszMethodName, Int32 argsLength, ObjectWrapper** arguments, Boolean* isException)
Info Сообщение (15:48:06) Конец
__________________
Хочу IQ как ICQ, ну или хотя бы ICQ как IQ.