Parameter types allowed

viperkviperk Member Posts: 12
edited 2013-06-19 in NAV Three Tier
Hi,

I can't find any specification about what parameter types that are allowed in a code unit that is published as a web service.

Is the DotNet type not allowed at all? i've tried to publish code units that has sortedlists and DataTables as parameters, but when i try to download the contract i get an error in the eventlog:

Service:
User:
Type: System.NotSupportedException
Message: DotNet
StackTrace:
at Microsoft.Dynamics.Nav.Types.XmlTypeHelper.SimpleTypesSupportedInWebservice(NavType navType)
at Microsoft.Dynamics.Nav.Types.XmlTypeHelper.XmlTypeNameFrom(NavType type)
at Microsoft.Dynamics.Nav.Service.WebServices.ServiceCodeunitWsdlAdapter.VisitParameter(ComplexTypeBuilder typeBuilder, ParameterInfo parameter)
at Microsoft.Dynamics.Nav.Service.WebServices.ServiceCodeunitWsdlAdapter.VisitInputParameters(ComplexTypeBuilder typeBuilder, ParameterInfo[] parameterInfo)
at Microsoft.Dynamics.Nav.Service.WebServices.ServiceCodeunitWsdlAdapter.<>c__DisplayClass4.<VisitMethod>b__1(ComplexTypeBuilder typebuilder)
at Microsoft.Dynamics.Nav.Xsd.BaseXsdBuilder.CreateType(ComplexType complexDelegate)
at Microsoft.Dynamics.Nav.Xsd.ElementBuilder.CreateType(ComplexType complexDelegate)
at Microsoft.Dynamics.Nav.Service.WebServices.ServiceCodeunitWsdlAdapter.<>c__DisplayClass4.<VisitMethod>b__0(ElementBuilder elementBuilder)
at Microsoft.Dynamics.Nav.Xsd.BaseXsdBuilder.CreateElement(String name, ElementNumber cardinality, ElementType elementDelegate)
at Microsoft.Dynamics.Nav.Xsd.XsdBuilder.CreateElement(String name, ElementNumber cardinality, ElementType elementDelegate)
at Microsoft.Dynamics.Nav.Service.WebServices.ServiceCodeunitWsdlAdapter.VisitMethod(MethodInfo method, PortBuilder port, BindingBuilder binding)
at Microsoft.Dynamics.Nav.Service.WebServices.ServiceCodeunitWsdlAdapter.VisitMethods(MethodInfo[] methods)
at Microsoft.Dynamics.Nav.Service.WebServices.ServiceCodeunitWsdlAdapter.Write(XmlTextWriter output, Uri requestUrl)
at Microsoft.Dynamics.Nav.Service.WebServices.ServiceBroker.MetadataFor(UrlParser relivantURLPart, Uri orginal, TextWriter output)
at Microsoft.Dynamics.Nav.Service.WebServices.ServiceBroker.Invoke(Boolean isSoapMessage, String serviceName, Uri url, XmlReader input, TextWriter output, String sid)
at Microsoft.Dynamics.Nav.Service.WebServices.NavWebService.<>c__DisplayClass3.<>c__DisplayClass5.<ProcessMessage>b__1()
at Microsoft.Dynamics.Nav.Service.WebServices.Disposer.Scope(Code code)
at Microsoft.Dynamics.Nav.Service.WebServices.NavWebService.<>c__DisplayClass3.<ProcessMessage>b__0(StreamWriter streamWriter)
at Microsoft.Dynamics.Nav.Service.WebServices.WCFUtil.GetPopulatedMemoryStream(StreamFillingCallback callback)
at Microsoft.Dynamics.Nav.Service.WebServices.NavWebService.ProcessMessage(Message message)
at SyncInvokeProcessMessage(Object , Object[] , Object[] )
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
Source: Microsoft.Dynamics.Nav.Types

Comments

  • kinekine Member Posts: 12,562
    I assume that complex datatypes are not allowed like blobs, dotnet, automation, records (extension codeunits only). Exception is XMLPort.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • GoMaDGoMaD Member Posts: 313
    I have the same problem with a function that has a BigText as parameter.

    At one customer this works (version 32012)
    at another customer it doesn't work (version 32198).

    There is NO difference in coding between the two customers.

    Can somebody please explain this??????

    --- EDIT ---

    The answer was: in a local function an automation was a paramater, this caused the error.
    Now, let's see what we can see.
    ...
    Everybody on-line.
    ...
    Looking good!
Sign In or Register to comment.