Errors in Microsoft Visual Studio When Using Verastream Host Integrator 7.x Web Service

  • 7021554
  • 17-Jun-2010
  • 03-Mar-2018


Verastream Host Integrator version 7.0 or higher


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:

Custom tool warning: There was a validation error on a schema generated during export:
    Line: 2 Column: 3
   Validation Error: The global attribute ' lang' has already been declared.

Custom tool warning: There was a validation error on a schema generated during export:
    Line: 3 Column: 3
   Validation Error: The global attribute ' space' has already been declared.

Custom tool warning: There was a validation error on a schema generated during export:
    Line: 11 Column: 3
   Validation Error: The global attribute ' base' has already been declared.

Custom tool warning: There was a validation error on a schema generated during export:
    Line: 12 Column: 3
   Validation Error: The global attribute ' id' has already been declared.

Custom tool warning: There was a validation error on a schema generated during export:
    Line: 13 Column: 3
   Validation Error: The attributeGroup '' has already been declared.

Custom tool warning: The optional WSDL extension element 'UsingAddressing' from namespace '' was not handled.
XPath: //wsdl:definitions[@targetNamespace='urn:xmlns:attachmate:vhi-ws:<model or session>:<model name>']/wsdl:binding[@name='<model name>PortBinding']

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.

Figure 1. Sample build errors in Microsoft Visual Studio 2010 Error List

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

Figure 2. Sample build errors in Microsoft Visual Studio 2008 Error List

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:

Figure 3. 'Error consuming WCF service metadata. Object reference not set to an instance of an object.'
Figure 3. 'Error consuming WCF service metadata. Object reference not set to an instance of an object.'


In Microsoft Visual Studio 2010, for non-BizTalk projects, you can simply ignore the warnings when importing the service reference.

To resolve the errors in Visual Studio, choose one of the alternatives below. Note: For BizTalk projects Disable WS-Resource or use the Svcutil WCF Method.

Disable WS-Resource

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).

  1. Click Project > Add Service Reference.
  2. At the bottom of the Add Service Reference dialog, click Advanced.
  3. At the bottom of the Service References Settings dialog, click Add Web Reference.
  1. In the URL edit field, enter the WSDL document location (as described in KB 7021550) and click Go. For example:
  1. 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.

  1. Click Start > Programs > Microsoft Visual Studio 2008 > Visual Studio Tools > Visual Studio 2008 Command Prompt.
  2. 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>

For example:

svcutil /serializer:xmlserializer http://my-server:9680/vhi-ws/session/my-model?wsdl /out:my-model
  1. 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:

Generating files...
c:\Program Files\Microsoft Visual Studio 9.0\VC\my-model.cs
c:\Program Files\Microsoft Visual Studio 9.0\VC\output.config
  1. In Visual Studio, click Project > Add Existing Item to import the generated .cs file (C# proxy code for client) into your project.
  2. 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.


Beginning in Verastream Host Integrator version 7.0, the embedded SOAP 1.1 stack is a standards-compliant implementation that supports WS-* specifications (such as WS-Addressing) and multiple XSD schemas. Some Microsoft implementations have difficulty consuming these web services.

Additional Information

Legacy KB ID

This article was originally published as Attachmate Technical Note 10098.