Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Add Web Reference from remote web service – Error "Failed to add a Web Reference."
- This topic has 9 replies, 1 voice, and was last updated 9 years, 1 month ago by
community-content.
-
AuthorPosts
-
-
June 10, 2010 at 1:54 AM #24936
Hi,
I’m trying to add a web reference for a remote web service.
Error: Failed to add a Web Reference.
I know I can hit it successfully from the server as I have used the companies test program. I have successfully added my own web service to the project in question.
When adding the web reference it find the service. I then set the WebReference name and hit add web reference. It start updating and then completes with the above error.
Is there some ports that need to be opened by them for me to add the web reference or do I need to set this up manually, because it’s remote. I tried to add a internal web reference and then manually modify it to the remote site. I get errors when rebuilding the project on the .ocx for the web reference. It says cannot find symbol and ‘xxxx’:must be a type.
Can someone point me in the right direction please.
Thank you and regards,
Rob
-
June 10, 2010 at 7:52 PM #24939
Hi Rob,
You mentioned that you are able to connect to this remote web service through the internet browser, so your company’s firewall is allowing network traffic (just double-check to make sure of that).
Then, you might want to check the following blogs to see if the problem they are referring to is similar to what you are experiencing:
http://www.pluralsight-training.net/community/blogs/aaron/archive/2005/10/07/15391.aspx
http://mtaulty.com/communityserver/blogs/mike_taultys_blog/archive/2005/07/20/5540.aspx
Hope this helps,
Daniel.
-
June 10, 2010 at 8:16 PM #24941
Hi Daniel,
I can confirm that firewall rules are set up OK. As I can hit the site and call the web service and receive a response via a c# application that the remote company sent me. I also can add internal web services successfully. The two blogs you sent me did not assist. I’m wondering if VS.Net needs other ports opened apart from HTTP.
Below is the web service I’m trying to hit. I’ve replaced host, company names with x’s It looks good to me so I don’t understand why it want add.
POST /global/data/xxxx_integration.asmx HTTP/1.1 Host: xxxxxxx.xxxxx.net Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: "http://www.xxxxxxxxx.com/webservices/xxxxx_Integration" <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <xxxx_Integration xmlns="http://www.xxxxxxxxx.com/webservices/"> <sMethodName>string</sMethodName> <sUserName>string</sUserName> <sPassWord>string</sPassWord> <sXmlInput>string</sXmlInput> </xxxx_Integration> </soap:Body> </soap:Envelope>
HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <xxxxx_IntegrationResponse xmlns="http://www.xxxxxxxxx.com/webservices/"> <xxxxx_IntegrationResult>xml</xxxxx_IntegrationResult> </xxxxx_IntegrationResponse> </soap:Body> </soap:Envelope>
thanks, Rob
-
June 10, 2010 at 9:02 PM #24942
Hi Rob,
Since you are using BizTalk Server 2006, check the WSDL of that web service to make sure whether or not your problem is related to this MS KB article:
http://kbalertz.com/948089/cannot-consume-service-BizTalk-Server-service-references-another.aspx
Best,
Daniel.
-
June 11, 2010 at 12:25 AM #24944
Hi Daniel,
all the blogs about Web reference failed doesn’t seem to relate to the problem I’m having. I have a theory but don’t know how to test.
The external company I’m hitting has white spaces in the asp page name
in my testing I create a web service the display name on the web is that of the web service class. As it is a class it does not let me put white spaces in the name. i’ve noticed that BizTalk create it’s ports using this name when the web reference is added.
for the life of me I cannot see how I get the form name to be different to the .net web service class name. If someone can instruct me on how to show a different name I can test my theory.
Thanks,
Rob
-
June 11, 2010 at 9:07 AM #24946
Hi Rob,
It sounds like there’s a problem with generating a web reference in a BizTalk project from a web service that has white spaces in its URL. I haven’t come across this one, and I assume that the external company is not likely to modify that web service to remove the white spaces, am I correct?
Here’s a workaround that I would suggest: create an internal .NET web service (ASMX) to consume that external web service, and expose that internal web service in your BizTalk project. How does that sound?
Daniel.
-
June 11, 2010 at 11:57 PM #24952
After some testing I’m sure that it’s failing when trying to generate the reference.map and .ocx. BizTalk create the ports with the class name. Below is the HTML source of the page.
<p class=”heading1″>Estaronline – iSAMS Integration</p><br>
Where as my test I created the site as
<p class=”heading1″>integration</p><br>
By doing this BizTalk is able to generate the required items.
i want to prove my theory before advising the external company, but for the life of me I cannot work out how to modify the class name in the HTML.
Your previous suggestion I tried a couple of days ago with no success. I added a local web service which was almost a replica of external web service except the class name. I added it successfully. Then when I changed the URL to point to the external location, it updated the WSDL and cisco files and then failed to update the .map and .ocx. I then tried manually to modify via editor and I got nine errors on rebuild relating to the class name i used.
Thanks,
Rob
-
June 12, 2010 at 12:00 AM #24953
Hi Daniel,
miss read your previous reply. The option you provided will be the way I go if the external company cannot modify the class name in the HTML.
Thanks again,
Rob
-
June 14, 2010 at 7:00 PM #24960
Hi Daniel, the external company was kind enough to modify the Web Service class name to not have white spaces. By doing this BizTalk added the Web Reference successfully. Thank you for you help. best regards, Rob
-
June 14, 2010 at 8:15 PM #24961
Hi Rob,
I’m glad it turned out well for you. It was a learning experience for both of us, and for anyone who comes on this forum and reads through this thread.
I’m happy to help you out, wish you best of luck in your project and hope you enjoy working with BizTalk.
Daniel.
-
-
-
-
-
-
-
-
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.