New-NAVWebService

New-NAVWebService

Creates a new Microsoft Dynamics NAV web service.

Syntax

Parameter Set: __AllParameterSets
New-NAVWebService [-ServerInstance] <String> -ObjectId <Int32> -ObjectType <ObjectType> -ServiceName <String> [-Force] [-Published <Boolean> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

Use the New-NAVWebService cmdlet to create and optionally publish web services that are based on Microsoft Dynamics NAV application objects. You can see which web services have already been created by running the Get-NAVWebService cmdlet.

In a multitenant deployment of Microsoft Dynamics NAV, web services are created in the application database, and they apply to all tenants that are mounted against that Microsoft Dynamics NAV Server instance.

Parameters

-Force

Forces the command to run without asking for user confirmation.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ObjectId<Int32>

Specifies the ID of the object that you want to publish as a web service.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-ObjectType<ObjectType>

Specifies the type of the object that you want to publish as a web service. You can publish two types of web services from Microsoft Dynamics NAV objects:
--SOAP Web Services. You can publish either Microsoft Dynamics NAV pages or codeunits as SOAP services.
--OData Web Services. You can publish either pages or queries as OData services.

For more information, see "Overview of Microsoft Dynamics NAV Web Services" in the Developer and ITPro documentation for Microsoft Dynamics NAV 2016.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Published<Boolean>

Specifies if the web service must be published immediately.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-ServerInstance<String>

Specifies the name of a Microsoft Dynamics NAV Server instance. The default instance name is DynamicsNAV90. You can specify either the full name of an instance such as MicrosoftDynamicsNavServer$myinstance or the short name such as myinstance.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue, ByPropertyName)

Accept Wildcard Characters?

false

-ServiceName<String>

Specifies the name of the web service.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • None

    This cmdlet does not take any input.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • None

    This cmdlet does not generate any output.

Examples

-------------------------- EXAMPLE 1 --------------------------

Description

-----------

This example uses the New-NAVWebService cmdlet to create and publish a web service that is based on page 21, Customer Card.

PS C:\> New-NAVWebService -ServerInstance DynamicsNAV90 -ServiceName Customer -ObjectType Page -ObjectId 21 –Published 1