If the services really are identical, then you don't need to use the wizard to import the schema twice - just import the first service's WSDL to create the schemas and port types, and then create a new send port* and change the bindings accordingly to point to the second service (i.e. notably the service URL).
This situation also typically happens if your WCF Services use MessageContracts
which accepts or returns the same message payload for more than one service call (as opposed to DataContract
, where you should get typically 'uniquified' root element names of the form xmlns#MyMethod
and xmlns#MyMethodResponse
).
In this case (i.e. common MessageContracts
), in addition to basvo's answer, you can also get around this issue as follows:
- Import all artifacts for all consumed WCF services into your BTS project in Visual Studio.
- Retain the first 'instance' of each request (or response schema), and then in Orchestration view in VS, go through each of the second and subsequent port types and delete the duplicated request or response messages ("operation message") on the Port type. (Under each Port Type, you should see the request, the response and also any fault message types)
- You then need to 'edit' each of the message types that you've deleted, and then manually go and change it to the original instance of the schema that you've retained.
- You may also need to delete or worse, hack, the duplicated message types out of the imported
.xsd
files.
This is a pain however if your web service changes and you need to 'refresh' your imported schemas again - it would be a nice feature if the Import Wizard detected duplicate schemas and offered to merge them in this way for you.
*
Update - just to clarify, reuse the same logical send port in your orch design, but create a new Send Port in the deployed BTS server / cluster, subscribing the send port to the required messages / link the second Orch to the send port (depending on whether you are using Direct binding or not), and obviously change the binding to the second URL.