Solved

Help needed with connection to web service using a WSDL file in VB.NET

Posted on 2014-11-21
4
438 Views
Last Modified: 2016-02-26
We have obtained a WSDL file ('non VB.NET') from a customer to use for making a connection with their web service. All the web service certificates are are installed correctly on both sides. When I use the WSDL file with soapUI then I can sent a request to the web service at a specified endpoint address without any problems. The response to the request is received correctly in soapUI.

After that we started to use the WSDL in VB.NET to create a program that can exchange messages with the web service. We added the WSDL file as a Service Reference to the VB.NET project. A routine 'Reference.vb " is created under the project containing several routines, functions, definitions and so on. This looks correct to me. To sent a message from within the VB.NET application to the web service, we perform the following steps:
1.      Define a variable as a class of the WSDL definition for sending the message to the web service
2.      Fill the properties of the variable with information of the message
3.      Define the binding to use
4.      Define a variable as the portalServicePortClient of the WSDL file, with the endpoint address and the bindig as parameters
5.      Call the function of the WSDL that will sent the message to the web service
6.      Receive answer and process it

After calling the function of the WSDL, there is no response received. There is only a error message that is shown:
" Content Type application/soap+xml; charset=utf-8 was not supported by service http://broker-......................  The client and service bindings may be mismatched."

And when I try this over another port with SSL:

"An error occurred while receiving the HTTP response to https://broker....... This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details."

Our customer does not receive a message in  the web service!

Any help is much appreciated!
0
Comment
Question by:Pirie
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 75

Assisted Solution

by:käµfm³d 👽
käµfm³d   👽 earned 100 total points
ID: 40457663
Have you confirmed with the customer which binding should be used (or was only one included in your app.config file)?
0
 

Author Comment

by:Pirie
ID: 40461532
Hello Kaufmed,

Thanks for your reply!

In other projects in which we were reading a WSDL definition in VB.NET/VS for a link to a web service, we became a 'configuration.svcinfo' and a 'configuration91.svcinfo' file as a part of the service reference. These files contained information about the binding. Also, the app.config file was adapted with a Binding configuration section with the required settings. It was easy to create the link with the web service after that.

But after reading the WSDL definition where this question is about, the both files be created but there is no information in the files! The app.config also is not adapted. So it seems that there is no Binding information available or it is not required.

I have studied the files from the WSDL definition and searched for information about Binding. First in the WSDL file itself I found the following information about Binding:
    <wsdl:binding name="PortalServicePortSoapBinding" type="tns:PortalServicePort">
        <soap:binding style="document"
            transport="http://schemas.xmlsoap.org/soap/http" />

        <wsdl:operation name="toevoegenMelding">
            <soap:operation
                soapAction="http://www.interaccess.nl/ienm/lavs/portal/1_1/toevoegenMelding"
                style="document" />
            <wsdl:input>
                <soap:body use="literal" />
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal" />
            </wsdl:output>
            <wsdl:fault name="genericFaultMessage">
                <soap:fault use="literal" />
            </wsdl:fault>
        </wsdl:operation>
    </wsdl:binding>

There is also a file available 'bindings.xml' with this information:
<?xml version="1.0" ?>
<jaxb:bindings xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
    jaxb:extensionBindingPrefixes="xjc" version="2.1"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/jaxb ./bindingschema_2_0.xsd">
    <jaxb:globalBindings>
        <jaxb:serializable uid="1" />
    </jaxb:globalBindings>
</jaxb:bindings>

Any idea?
0
 

Accepted Solution

by:
Pirie earned 0 total points
ID: 40476111
Hi,

I solved the problem myself. Using a standard binding is enough.

Thanks for you help
0
 

Author Closing Comment

by:Pirie
ID: 40485345
No futher aswers
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question