Share via


How to: Reconnect Web Services on Application Diagrams

In Application Designer, you can reconnect a Web service consumer endpoint that has been disconnected from a Web service endpoint. For example, when moving connections between Web services, you must delete the connection and then reconnect the Web service consumer endpoint to a new Web service provider endpoint.

When you reconnect a Web service consumer endpoint, the Reconnect Web Service Endpoints dialog box appears if the following conditions are true:

  • The WSDL location of the Web service consumer endpoint is different than the location of the target Web service provider endpoint.

  • The Web service consumer endpoint is implemented and associated with a Web reference.

When this dialog box appears, you can choose one of the following:

  • Update Web service consumer endpoint with the WSDL file location (URL) of the new Web service provider endpoint. (Recommended)

    Note

    Updating the Web service consumer endpoint deletes the associated Web reference and the underlying proxy class, causing the consumer endpoint to become unimplemented. To generate a new Web reference and proxy class, you will need to reimplement the consumer endpoint. If you are using source code control, you might also need to check in any affected files before reimplementing. As a result, regardless of whether you generate a new Web reference and proxy class, the application might not compile. To resolve this condition, fix those places in code that reference old types. In addition, reconnecting to a Web service provider endpoint with a different WSDL binding name and namespace generates a warning but does not prevent the underlying connection. However, make sure that the behavior of the Web service provider endpoint is compatible with the behavior expected by the Web service consumer endpoint.

  • Connect the Web service consumer endpoint without updating it.

    Tip

    Reconnecting a Web service consumer endpoint without updating it can be useful for determining whether the target Web service can be substituted for the previously connected Web service.

For more information, see Overview of Endpoints on Applications and Communication Between Applications.

To reconnect a Web service consumer endpoint to a different Web service

  1. On the diagram, delete the connection between the Web service endpoints.

  2. Connect the Web service consumer endpoint to the Web service provider endpoint you want.

  3. If the Reconnect Web Service Endpoints dialog box appears, choose one of the following:

    • Connect and update the consumer endpoint's WSDL location (URL) with the WSDL location from the provider endpoint.

      Application Designer creates the connection and updates the consumer endpoint's WSDL Location property with the provider endpoint's WSDL Location property. The consumer endpoint's Target Location property is updated with the provider endpoint's Endpoint Location property.

      Note

      To reimplement the Web service consumer endpoint and generate a new Web reference, right-click the consumer endpoint and choose Implement. You might need to check in any affected files before reimplementing.

    • Connect only.

      Application Designer creates the connection and updates only the consumer endpoint's Target Location property with the provider endpoint's Endpoint Location property.

See Also

Tasks

How to: Connect Applications on Application Diagrams

Other Resources

Defining Communication Pathways on Application Diagrams