Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / March 2005

Tip: Looking for answers? Try searching our database.

Soap Response

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jit Prasad - 10 Nov 2004 22:13 GMT
I have been consuming a IBM Websphere (Java) web service using .Net 1.0 front
end writen in VB.NET.  The proxy class submits a soap request and gets a soap
response.
When I migrated the front-end to .NET1.1, the response from the web service
appears as null in the proxy class.  This only happens with .NET1.1, .NET1.0
is ok and works fine.  I have played around with the
System.Web.Services.Protocols.SoapDocumentMethodAttribute, but no luck. I
regenerated the proxy class using WSDL.exe v1.1 - it generated the same proxy
as per .NET1.0.
Could you please advise whether I need to change some other settings, and
also why the problem only occurs in .NET1.1.
Find attached the wsdl file and the proxy class.
...Jit.

WSDL.....
<definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="urn:ServiceRequest"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="urn:ServiceRequest">
    <types>
        <s:schema elementFormDefault="qualified"
targetNamespace="urn:ServiceRequest">
            <s:complexType name="process3ParmRequest">
                <s:sequence>
                    <s:element minOccurs="0" maxOccurs="1" name="inputHeader"
type="s:string"/>
                    <s:element minOccurs="0" maxOccurs="1" name="messageControlPayload"
type="s:string"/>
                    <s:element minOccurs="0" maxOccurs="1" name="inputMessage"
type="s:string"/>
                </s:sequence>
            </s:complexType>
            <s:complexType name="process3ParmRequestResponse">
                <s:sequence>
                    <s:element minOccurs="0" maxOccurs="1" name="process3ParmRequestResult"
type="s:string"/>
                </s:sequence>
            </s:complexType>
            <s:element name="string" nillable="true" type="s:string"/>
        </s:schema>
    </types>
    <message name="process3ParmRequestSoapIn">
        <part name="parameters" type="s0:process3ParmRequest"/>
    </message>
    <message name="process3ParmRequestSoapOut">
        <part name="parameters" type="s0:process3ParmRequestResponse"/>
    </message>
    <portType name="GTPSRouterServiceSoap">
        <operation name="process3ParmRequest">
            <input message="s0:process3ParmRequestSoapIn"/>
            <output message="s0:process3ParmRequestSoapOut"/>
        </operation>
    </portType>
    <binding name="GTPSRouterServiceSoap" type="s0:GTPSRouterServiceSoap">
        <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
        <operation name="process3ParmRequest">
            <soap:operation soapAction="urn:ServiceRequest/process3ParmRequest"
style="document"/>
            <input>
                <soap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
            </input>
            <output>
                <soap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
            </output>
        </operation>
    </binding>
    <service name="GTPSRouterService">
        <port name="GTPSRouterServiceSoap" binding="s0:GTPSRouterServiceSoap">
            <soap:address
location="http://localhost/GTPSRRWebService/GTPSRouterService.asmx"/>
        </port>
    </service>
</definitions>

Proxy Class...
'------------------------------------------------------------------------------
' <autogenerated>
'     This code was generated by a tool.
'     Runtime Version: 1.0.3705.0
'
'     Changes to this file may cause incorrect behavior and will be lost if
'     the code is regenerated.
' </autogenerated>
'------------------------------------------------------------------------------

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.0.3705.0.
'

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

System.Web.Services.WebServiceBindingAttribute(Name:="GTPSRouterServiceSoap",
[Namespace]:="urn:ServiceRequest")>  _
Public Class GTPSRouterService
   Inherits System.Web.Services.Protocols.SoapHttpClientProtocol
   
   '<remarks/>
   Public Sub New()
       MyBase.New
       Me.Url = "http://localhost/GTPSRRWebService/GTPSRouterService.asmx"
   End Sub

   '<remarks/>
   
<System.Web.Services.Protocols.SoapDocumentMethodAttribute("urn:ServiceRequest/process3ParmRequest", _
                                                               
RequestNamespace:="urn:ServiceRequest", _
                                                               
ResponseNamespace:="urn:ServiceRequest", _
                                                               
Use:=System.Web.Services.Description.SoapBindingUse.Encoded, _
                                                               
ParameterStyle:=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)> _
   Public Function process3ParmRequest(ByVal inputHeader As String, ByVal
messageControlPayload As String, ByVal inputMessage As String) As String
       Dim results() As Object = Me.Invoke("process3ParmRequest", New
Object() {inputHeader, messageControlPayload, inputMessage})
       Return CType(results(0), String)
   End Function

   '<remarks/>
   Public Function Beginprocess3ParmRequest(ByVal inputHeader As String,
ByVal messageControlPayload As String, ByVal inputMessage As String, ByVal
callback As System.AsyncCallback, ByVal asyncState As Object) As
System.IAsyncResult
       Return Me.BeginInvoke("process3ParmRequest", New Object()
{inputHeader, messageControlPayload, inputMessage}, callback, asyncState)
   End Function

   '<remarks/>
   Public Function Endprocess3ParmRequest(ByVal asyncResult As
System.IAsyncResult) As String
       Dim results() As Object = Me.EndInvoke(asyncResult)
       Return CType(results(0), String)
   End Function
End Class
Jit Prasad - 10 Nov 2004 22:29 GMT
Further to my earlier email....
The response (results()) is null when the method call returns from the
webservice as per the following code in the proxy class:
       Dim results() As Object = Me.Invoke("process3ParmRequest", New
Object() {inputHeader, messageControlPayload, inputMessage})

The results of the immediate window are:
?results(0)
Nothing

...Jit.

> I have been consuming a IBM Websphere (Java) web service using .Net 1.0 front
> end writen in VB.NET.  The proxy class submits a soap request and gets a soap
[quoted text clipped - 150 lines]
>     End Function
> End Class
Dan Rogers - 03 Dec 2004 22:54 GMT
Try refreshing the proxy.  When you see a null response coming back, it
often means that the serializer did not see the right content that it
expected on the wire.

Regards

Dan Rogers
Microsoft Corporation
--------------------
Thread-Topic: Soap Response
thread-index: AcTHdLDViDg9mhfyRkuSypob6ADBaA==
X-WBNR-Posting-Host: 210.55.201.197
From: "=?Utf-8?B?Sml0IFByYXNhZA==?=" <JitPrasad@discussions.microsoft.com>
References:  <596D72F5-4148-4DFD-83E6-B308F433F7EA@microsoft.com>
Subject: RE: Soap Response
Date: Wed, 10 Nov 2004 14:29:07 -0800
Lines: 170
Message-ID: <F733DE2F-B20E-4D85-A99A-3723EA4DC09A@microsoft.com>
MIME-Version: 1.0
Content-Type: text/plain;
    charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.webservices:7359
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

Further to my earlier email....
The response (results()) is null when the method call returns from the
webservice as per the following code in the proxy class:
       Dim results() As Object = Me.Invoke("process3ParmRequest", New
Object() {inputHeader, messageControlPayload, inputMessage})

The results of the immediate window are:
?results(0)
Nothing

..Jit.

> I have been consuming a IBM Websphere (Java) web service using .Net 1.0 front
> end writen in VB.NET.  The proxy class submits a soap request and gets a soap
[quoted text clipped - 34 lines]
>                 <s:sequence>
>                     <s:element minOccurs="0" maxOccurs="1"
name="process3ParmRequestResult"
> type="s:string"/>
>                 </s:sequence>
[quoted text clipped - 39 lines]
>
> Proxy Class...

'---------------------------------------------------------------------------
---
> ' <autogenerated>
> '     This code was generated by a tool.
[quoted text clipped - 3 lines]
> '     the code is regenerated.
> ' </autogenerated>

'---------------------------------------------------------------------------
---

> Option Strict Off
> Option Explicit On
[quoted text clipped - 14 lines]
>  System.ComponentModel.DesignerCategoryAttribute("code"),  _
>  

System.Web.Services.WebServiceBindingAttribute(Name:="GTPSRouterServiceSoap"
,
> [Namespace]:="urn:ServiceRequest")>  _
> Public Class GTPSRouterService
[quoted text clipped - 8 lines]
>     '<remarks/>
>    

<System.Web.Services.Protocols.SoapDocumentMethodAttribute("urn:ServiceReque
st/process3ParmRequest", _
>                                                                
> RequestNamespace:="urn:ServiceRequest", _
[quoted text clipped - 3 lines]
> Use:=System.Web.Services.Description.SoapBindingUse.Encoded, _
>                                                                

ParameterStyle:=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)> _
>     Public Function process3ParmRequest(ByVal inputHeader As String, ByVal
> messageControlPayload As String, ByVal inputMessage As String) As String
[quoted text clipped - 19 lines]
>     End Function
> End Class
MSDN Andi - 22 Mar 2005 13:02 GMT
Hi,

I pretty much have the same problem like Jit.
It worked under 1.0 it does not work under 1.1
In my case I have also "encoded" SoapBinding-use and SoapParameterStyle
"wrapped".

I recompiled the whole project using .NET 1.1
I even intercepted the dynamically generated code and even disassambled it.
No actual difference in program flow and program logic.
However, the .NET 1.1 Framework returns nothing instead of the XML-string.
I had the SOAP-sniffer of the Soap Toolkit 3.0 running - and the return
string ist just fine... just under .NET 1.1 I get a "nothing" response.

I have no way of further debugging what happens after the ".invoke" call,
since the framework hides the rest of the processing.

I tried to tackle this quite a while now and I find traces here and there
online that several people have the same problem.

All of them communicating with non-.net-based systems of some sort.

Regards,

Andi

> Try refreshing the proxy.  When you see a null response coming back, it
> often means that the serializer did not see the right content that it
[quoted text clipped - 216 lines]
> >     End Function
> > End Class
HG - 11 Nov 2004 15:54 GMT
Hi there

This is a shoot in the dark.

But, if I remember correctly .NET 1.0 used RPC style call to web services as
default. 1.1 use the Wrapped/Document style as default when generating proxy
classes.

Check your webmethod attributes, if there's a difference here between the
1.0 proxy class and the 1.1 proxy class.

Best regards

Henrik

> I have been consuming a IBM Websphere (Java) web service using .Net 1.0 front
> end writen in VB.NET.  The proxy class submits a soap request and gets a soap
[quoted text clipped - 77 lines]
>
> Proxy Class...

'---------------------------------------------------------------------------
---
> ' <autogenerated>
> '     This code was generated by a tool.
[quoted text clipped - 3 lines]
> '     the code is regenerated.
> ' </autogenerated>

'---------------------------------------------------------------------------
---

> Option Strict Off
> Option Explicit On
[quoted text clipped - 13 lines]
> <System.Diagnostics.DebuggerStepThroughAttribute(),  _
>  System.ComponentModel.DesignerCategoryAttribute("code"),  _

System.Web.Services.WebServiceBindingAttribute(Name:="GTPSRouterServiceSoap"
,
> [Namespace]:="urn:ServiceRequest")>  _
> Public Class GTPSRouterService
[quoted text clipped - 7 lines]
>
>     '<remarks/>

<System.Web.Services.Protocols.SoapDocumentMethodAttribute("urn:ServiceReque
st/process3ParmRequest", _

> RequestNamespace:="urn:ServiceRequest", _
>
[quoted text clipped - 26 lines]
>     End Function
> End Class

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.