By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,011 Members | 2,968 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,011 IT Pros & Developers. It's quick & easy.

Help: .net soap client sees empty responses from Axis

P: n/a
I've seen a couple posts by people having similar problems, but the
suggested solutions I've tried so far haven't worked.

I'm using a SOAP client in VB.Net (constructed by wsdl.exe) and the
third party web service it's consuming is served by Axis. The request
messages my client sends are processed fine by the server, and the SOAP
response is making its way to my client - but when .Net finishes
processing the message I end up with an empty result data structure,
even though the information is in the response message.

Also, the web service is using literal/wrapped wsdl.

Any help or suggestions would be appreciated. Thanks,

Jennifer

The wsdl is:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="https://mydomain.org/Tester_v1_1"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="https://mydomain.org/Tester_v1_1"
xmlns:intf="https://mydomain.org/Tester_v1_1"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!--WSDL created by Apache Axis version: 1.2RC1
Built on Oct 04, 2004 (01:32:18 PDT)-->
<wsdl:types>
<schema elementFormDefault="qualified"
targetNamespace="https://mydomain.org/Tester_v1_1"
xmlns="http://www.w3.org/2001/XMLSchema">
<element name="count">
<complexType/>
</element>
<element name="countResponse">
<complexType>
<sequence>
<element name="countReturn" type="xsd:int"/>
</sequence>
</complexType>
</element>
<element name="echo">
<complexType>
<sequence>
<element name="s" type="xsd:string"/>
</sequence>
</complexType>
</element>
<element name="echoResponse">
<complexType>
<sequence>
<element name="echoReturn" type="xsd:string"/>
</sequence>
</complexType>
</element>
<element name="setEchoMode">
<complexType>
<sequence>
<element name="mode" type="impl:EchoType"/>
</sequence>
</complexType>
</element>
<simpleType name="EchoType">
<restriction base="xsd:string">
<enumeration value="UNCHANGED"/>
<enumeration value="UPPERCASE"/>
<enumeration value="LOWERCASE"/>
</restriction>
</simpleType>
<element name="setEchoModeResponse">
<complexType/>
</element>
</schema>
</wsdl:types>

<wsdl:message name="setEchoModeResponse">

<wsdl:part element="impl:setEchoModeResponse" name="parameters"/>

</wsdl:message>

<wsdl:message name="countRequest">

<wsdl:part element="impl:count" name="parameters"/>

</wsdl:message>

<wsdl:message name="countResponse">

<wsdl:part element="impl:countResponse" name="parameters"/>

</wsdl:message>

<wsdl:message name="setEchoModeRequest">

<wsdl:part element="impl:setEchoMode" name="parameters"/>

</wsdl:message>

<wsdl:message name="echoResponse">

<wsdl:part element="impl:echoResponse" name="parameters"/>

</wsdl:message>

<wsdl:message name="echoRequest">

<wsdl:part element="impl:echo" name="parameters"/>

</wsdl:message>

<wsdl:portType name="Tester_v1_1">

<wsdl:operation name="count">

<wsdl:input message="impl:countRequest" name="countRequest"/>

<wsdl:output message="impl:countResponse"
name="countResponse"/>

</wsdl:operation>

<wsdl:operation name="echo">

<wsdl:input message="impl:echoRequest" name="echoRequest"/>

<wsdl:output message="impl:echoResponse" name="echoResponse"/>

</wsdl:operation>

<wsdl:operation name="setEchoMode">

<wsdl:input message="impl:setEchoModeRequest"
name="setEchoModeRequest"/>

<wsdl:output message="impl:setEchoModeResponse"
name="setEchoModeResponse"/>

</wsdl:operation>

</wsdl:portType>

<wsdl:binding name="Tester_v1_1SoapBinding" type="impl:Tester_v1_1">

<wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>

<wsdl:operation name="count">

<wsdlsoap:operation soapAction=""/>

<wsdl:input name="countRequest">

<wsdlsoap:body use="literal"/>

</wsdl:input>

<wsdl:output name="countResponse">

<wsdlsoap:body use="literal"/>

</wsdl:output>

</wsdl:operation>

<wsdl:operation name="echo">

<wsdlsoap:operation soapAction=""/>

<wsdl:input name="echoRequest">

<wsdlsoap:body use="literal"/>

</wsdl:input>

<wsdl:output name="echoResponse">

<wsdlsoap:body use="literal"/>

</wsdl:output>

</wsdl:operation>

<wsdl:operation name="setEchoMode">

<wsdlsoap:operation soapAction=""/>

<wsdl:input name="setEchoModeRequest">

<wsdlsoap:body use="literal"/>

</wsdl:input>

<wsdl:output name="setEchoModeResponse">

<wsdlsoap:body use="literal"/>

</wsdl:output>

</wsdl:operation>

</wsdl:binding>

<wsdl:service name="Tester_v1_1Service">

<wsdl:port binding="impl:Tester_v1_1SoapBinding"
name="Tester_v1_1">

<wsdlsoap:address
location="https://mydomain.org/Tester_v1_1"/>

</wsdl:port>

</wsdl:service>

</wsdl:definitions>

And the resulting vb.net code is

Option Strict Off
Option Explicit On

Imports System
Imports System.ComponentModel
Imports System.Diagnostics
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.Xml.Serialization

'
'This source code was auto-generated by wsdl, Version=1.1.4322.573.
'

'<remarks/>
<System.Diagnostics.DebuggerStepThroughAttribute() , _
System.ComponentModel.DesignerCategoryAttribute("c ode"), _

System.Web.Services.WebServiceBindingAttribute(Nam e:="Tester_v1_1SoapBinding",
[Namespace]:="https://mydomain.org/Tester_v1_1")> _
Public Class Tester_v1_1Service
Inherits System.Web.Services.Protocols.SoapHttpClientProtoc ol

'<remarks/>
Public Sub New()
MyBase.New
Me.Url = "https://mydomain.org/Tester_v1_1"
End Sub

'<remarks/>
<System.Web.Services.Protocols.SoapDocumentMethodA ttribute("",
RequestNamespace:="https://mydomain.org/Tester_v1_1",
ResponseNamespace:="https://mydomain.org/Tester_v1_1",
Use:=System.Web.Services.Description.SoapBindingUs e.Literal,
ParameterStyle:=System.Web.Services.Protocols.Soap ParameterStyle.Wrapped)>
_
Public Function count() As
<System.Xml.Serialization.XmlElementAttribute("cou ntReturn")> Integer
Dim results() As Object = Me.Invoke("count", New Object(-1) {})
Return CType(results(0),Integer)
End Function
'<remarks/>
<System.Web.Services.Protocols.SoapDocumentMethodA ttribute("",
RequestNamespace:="https://mydomain.org/Tester_v1_1",
ResponseNamespace:="https://mydomain.org/Tester_v1_1",
Use:=System.Web.Services.Description.SoapBindingUs e.Literal,
ParameterStyle:=System.Web.Services.Protocols.Soap ParameterStyle.Wrapped)>
_
Public Function echo(ByVal s As String) As
<System.Xml.Serialization.XmlElementAttribute("ech oReturn")> String
Dim results() As Object = Me.Invoke("echo", New Object() {s})
Return CType(results(0),String)
End Function
'<remarks/>
<System.Web.Services.Protocols.SoapDocumentMethodA ttribute("",
RequestNamespace:="https://mydomain.org/Tester_v1_1",
ResponseNamespace:="https://mydomain.org/Tester_v1_1",
Use:=System.Web.Services.Description.SoapBindingUs e.Literal,
ParameterStyle:=System.Web.Services.Protocols.Soap ParameterStyle.Wrapped)>
_
Public Sub setEchoMode(ByVal mode As EchoType)
Me.Invoke("setEchoMode", New Object() {mode})
End Sub

End Class

'<remarks/>
<System.Xml.Serialization.XmlTypeAttribute([Namespace]:="https://mydomain.org/Tester_v1_1")>
_
Public Enum EchoType

'<remarks/>
UNCHANGED

'<remarks/>
UPPERCASE

'<remarks/>
LOWERCASE
End Enum

Nov 23 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.