Share via


Specifying Access Points

Note: The Microsoft UDDI SDK is not supported by or included in Microsoft Windows versions after Microsoft Windows Server 7. The Microsoft UDDI V3 SDK is included with Microsoft BizTalk Server. For more information about the Microsoft UDDI V3 SDK, see Microsoft BizTalk Server documentation

This topic shows you how to specify access points of a UDDI server, using the ExtensionsUrl, InquireUrl, and PublishUrl properties of the UddiConnection object. The example is a method that takes a UDDI connection object, access point type, and URL, and sets the appropriate property on the connection object.

Example Code

The following example shows you how to use the C# programming language to set the access points of a UDDI server using the InquireUrl, PublishUrl, or ExtensionsUrl properties of the UddiConnection object.

public void UpdateAccessPointSample(Microsoft.Uddi.UddiConnection myConn,
string accessPointType,
string accessPointURL)
{
    try
    {
        switch(accessPointType)
        {
            case "Inquiry":
            {
                myConn.InquireUrl = accessPointURL;
                break;
            }
            
            case "Publish":
            {
                myConn.PublishUrl = accessPointURL;
                break;
            }
                
            case "Extension":
            {
                myConn.ExtensionsUrl = accessPointURL;
                break;
            }
            
            default:
            {
                return;
            }
        }
     }
        
    catch (UddiException uddiEx)
    {
        Console.WriteLine(String.Concat("UDDI error: ", uddiEx.Message));
    }
        
    catch (Exception genEx)
    {
        Console.WriteLine(String.Concat("General exception: ", genEx.Message));
    }
}

The following example shows you how to use the Visual Basic .NET programming language to set the access points of a UDDI server using the InquireUrl, PublishUrl, or ExtensionsUrl properties of the UddiConnection object.

Sub UpdateAccessPointSample(ByVal myConn As Microsoft.Uddi.UddiConnection, _
ByVal accessPointType As String, _
ByVal accessPointURL As String)

    Try
        Select Case (accessPointType)

            Case "Inquiry"
                myConn.InquireUrl = accessPointURL

            Case "Publish"
                myConn.PublishUrl = accessPointURL

            Case "Extension"
                myConn.ExtensionsUrl = accessPointURL

            Case Else
                Return

        End Select

        Catch uddiEx As Microsoft.Uddi.UddiException
            Console.WriteLine(String.Concat("UDDI error: ", uddiEx.Message))

        Catch ex As Exception
            Console.WriteLine(ex.GetType())

    End Try

End Sub

Send comments about this topic to Microsoft.