A
Adrian Parker
I have to write a windows service app that consumes a web service provided
by the UK government. The only info I have is on this page..
http://www.hmrc.gov.uk/ebu/paye_techpack/dps.htm
The API specification doesn't give a discovery URL, but there are two WSDL
zip downloads.. one for a test service and one for a live service.
In the past, in VS2003, I've added a web reference to a web service where
you put a URL in and then you have access to the proxy, but I've no idea
what to do with the two WSDL files.. I've tried referencing them directly
in add web reference on the local filepath, one loads ok, but the other
returns a load of
errors..
The document at the url file:///C:/dotnet2/egov/testWSDL/dps.wsdl was not
recognized as a known document type.
The error message from each known type may help you fix the problem:
- Report from 'DISCO Document' is 'Unexpected XML declaration. The XML
declaration must be the first node in the document, and no white space
characters are allowed to appear before it. Line 2, position 3.'.
- Report from 'WSDL Document' is 'There is an error in XML document (2,
3).'.
- Unexpected XML declaration. The XML declaration must be the first node
in the document, and no white space characters are allowed to appear before
it. Line 2, position 3.
- Report from 'XML Schema' is 'Unexpected XML declaration. The XML
declaration must be the first node in the document, and no white space
characters are allowed to appear before it. Line 2, position 3.'.
Questions..
1. How should I be referencing these WSDL files
2. How can I easily switch between then when switching from test to live ?
by the UK government. The only info I have is on this page..
http://www.hmrc.gov.uk/ebu/paye_techpack/dps.htm
The API specification doesn't give a discovery URL, but there are two WSDL
zip downloads.. one for a test service and one for a live service.
In the past, in VS2003, I've added a web reference to a web service where
you put a URL in and then you have access to the proxy, but I've no idea
what to do with the two WSDL files.. I've tried referencing them directly
in add web reference on the local filepath, one loads ok, but the other
returns a load of
errors..
The document at the url file:///C:/dotnet2/egov/testWSDL/dps.wsdl was not
recognized as a known document type.
The error message from each known type may help you fix the problem:
- Report from 'DISCO Document' is 'Unexpected XML declaration. The XML
declaration must be the first node in the document, and no white space
characters are allowed to appear before it. Line 2, position 3.'.
- Report from 'WSDL Document' is 'There is an error in XML document (2,
3).'.
- Unexpected XML declaration. The XML declaration must be the first node
in the document, and no white space characters are allowed to appear before
it. Line 2, position 3.
- Report from 'XML Schema' is 'Unexpected XML declaration. The XML
declaration must be the first node in the document, and no white space
characters are allowed to appear before it. Line 2, position 3.'.
Questions..
1. How should I be referencing these WSDL files
2. How can I easily switch between then when switching from test to live ?