The following errors or warnings may display when you add the Verastream Host Integrator (VHI) web service to your project, or subsequently attempt to build your project.
Warnings When Adding Service Reference
In your Microsoft Visual Studio 2008 or 2010 project using .NET Framework 3.0 or 3.5, after adding a service reference to the VHI web service WSDL, the Error List may display warnings similar to the following:
Errors When Building Project in Visual Studio 2010
In a BizTalk Server 2010 project, after importing a VHI web service as a Service Reference and attempting to build the solution, the Error List may display multiple errors similar to the following:
Node "<Schema>" - Schema reference "http://<hostname>:9680/vhi-ws/<model or session>/<model name>/<file>.xsd" is not a valid reference or does not exist in the current project.
Errors When Building Project in Visual Studio 2008
When attempting to compile your project in Visual Studio, the Error List and build output may display multiple errors similar to the following:
error CS0102: The type '<project name>.<service reference name>.<type name>' already contains a definition for '<name>'
error CS0111: Type '<project name>.<service reference name>.<type name>' already defines a member called '<name>' with the same parameter types
Error in BizTalk WCF Service Consuming Wizard
If you are attempting to add a Verastream Host Integrator 7.0 web service WSDL to a Microsoft BizTalk Server 2006 R2 or 2009 project using the WCF Adapter, the BizTalk WCF Service Consuming Wizard may display the following error:
In Microsoft Visual Studio 2010, for non-BizTalk projects, you can simply ignore the warnings when importing the service reference.
Beginning in VHI version 7.1, WS-Resource (Web Services Resource 1.2 Framework) can be disabled for compatibility with technologies that do not use this standard. To disable this feature, see KB 7021336.
Add Web Reference
Use the following steps to add a VHI web service to your project. This process will generate code using .NET Framework 2.0 technology (Microsoft wsdl.exe).
- Click Project > Add Service Reference.
- At the bottom of the Add Service Reference dialog, click Advanced.
- At the bottom of the Service References Settings dialog, click Add Web Reference.
- In the URL edit field, enter the WSDL document location (as described in KB 7021550) and click Go. For example:
- After the web service description is displayed, click Add Reference.
Svcutil WCF Method
Use the following steps to add a web service to a project using the Microsoft svcutil.exe tool. This process will generate WCF (Windows Communication Foundation) proxy client code.
- Click Start > Programs > Microsoft Visual Studio 2008 > Visual Studio Tools > Visual Studio 2008 Command Prompt.
- Enter the following command (substituting appropriate values, including the WSDL document location as described in KB 7021550):
svcutil /serializer:xmlserializer http://<server name>:<port>/vhi-ws/<model or session>/<model name>?wsdl /out:<model name>
svcutil /serializer:xmlserializer http://my-server:9680/vhi-ws/session/my-model?wsdl /out:my-model
- Several validation errors will display, similar to the Warnings When Adding Service Reference, which you can be ignore.
You should also see .cs and .config files generated:
c:\Program Files\Microsoft Visual Studio 9.0\VC\my-model.cs
c:\Program Files\Microsoft Visual Studio 9.0\VC\output.config
- In Visual Studio, click Project > Add Existing Item to import the generated .cs file (C# proxy code for client) into your project.
- Merge the generated output.config XML (WCF configuration) into your projectâs existing app.config file. If you do not have an existing app.config, add the .config file to your project.