Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > null object returnd to .net client while calling axis web service

Reply
Thread Tools

null object returnd to .net client while calling axis web service

 
 
chandra kantha via .NET 247
Guest
Posts: n/a
 
      03-29-2005
Hi ,
I have a java web services (message style web service whichreturns document object) on axis and im trying to access it fromvb.net client. It is returning nothing/null. Please help me tofix this problem. We monitored the SOAP request and responsethey look ok.

Web service code
================================================== ======
public class MessageServiceDoc {
* Service method, which simply echoes back any XML itreceives.
public Document echoDocument(Document doc)
{
// Printing an element from the recieved XML document
System.out.println("PriMod = " +doc.getElementsByTagName("PriMod").getLength());

return doc;
}
}
==================================
WSDD file looks like this
==========================
<deployment name="test" xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"
xmlnssi="http://www.w3.org/2000/10/XMLSchema-instance">
<service name=" MessageServiceDoc " style="message">
<parameter name="className" value="samples.message.MessageServiceDoc " />
<parameter name="allowedMethods" value="echoDocument" />
</service>
</deployment>

WSDL file looks like this
=======================================
<?xml version="1.0" encoding="UTF-8" ?>
- <wsdl:definitionstargetNamespace="http://gdcwf215:8080/axis/services/MessageServiceDoc" xmlns="http://schemas.xmlsoap.org/wsdl/"xmlns:apachesoap="http://xml.apache.org/xml-soap"xmlns:impl="http://gdcwf215:8080/axis/services/MessageServiceDoc"xmlns:intf="http://gdcwf215:8080/axis/services/MessageServiceDoc" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"xmlns:tns1="http://message.samples"xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"xmlnssd="http://www.w3.org/2001/XMLSchema">
- <wsdl:types>
- <schema targetNamespace="http://message.samples"xmlns="http://www.w3.org/2001/XMLSchema">
<element name="echoDocument" type="xsd:anyType" />
</schema>
- <schematargetNamespace="http://gdcwf215:8080/axis/services/MessageServiceDoc" xmlns="http://www.w3.org/2001/XMLSchema">
<element name="echoDocumentReturn" type="xsd:anyType" />
</schema>
</wsdl:types>
- <wsdl:message name="echoDocumentRequest">
<wsdlart element="tns1:echoDocument" name="part" />
</wsdl:message>
- <wsdl:message name="echoDocumentResponse">
<wsdlart element="impl:echoDocumentReturn"name="echoDocumen tReturn" />
</wsdl:message>
- <wsdlortType name="MessageServiceDoc">
- <wsdlperation name="echoDocument">
<wsdl:input message="impl:echoDocumentRequest"name="echoDocume ntRequest" />
<wsdlutput message="impl:echoDocumentResponse"name="echoDocum entResponse" />
</wsdlperation>
</wsdlortType>
- <wsdl:binding name="MessageServiceDocSoapBinding"type="impl:Mess ageServiceDoc">
<wsdlsoap:binding style="document"transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdlperation name="echoDocument">
<wsdlsoapperation soapAction="" />
- <wsdl:input name="echoDocumentRequest">
<wsdlsoap:body namespace="http://message.samples" use="literal"/>
</wsdl:input>
- <wsdlutput name="echoDocumentResponse">
<wsdlsoap:bodynamespace="http://gdcwf215:8080/axis/services/MessageServiceDoc"use="literal" />
</wsdlutput>
</wsdlperation>
</wsdl:binding>
- <wsdl:service name="MessageServiceDocService">
- <wsdlort binding="impl:MessageServiceDocSoapBinding"name="M essageServiceDoc">
<wsdlsoap:addresslocation="http://gdcwf215:8080/axis/services/MessageServiceDoc"/>
</wsdlort>
</wsdl:service>
</wsdl:definitions>
==================================
VB.net proxy code is
=============================
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 Microsoft.VSDesigner,Version 1.1.4322.2032.
'
Namespace gdcwf215

'<remarks/>
<System.Diagnostics.DebuggerStepThroughAttribute() , _
System.ComponentModel.DesignerCategoryAttribute("c ode"), _
System.Web.Services.WebServiceBindingAttribute(Nam e:="MessageServiceDocSoapBinding",[Namespace]:="http://localhost:8082/axis/services/MessageServiceDoc")> _
Public Class MessageServiceDocService
InheritsSystem.Web.Services.Protocols.SoapHttpClie ntProtocol

'<remarks/>
Public Sub New()
MyBase.New
Me.Url ="http://localhost:8082/axis/services/MessageServiceDoc"
End Sub

'<remarks/>
<System.Web.Services.Protocols.SoapDocumentMethodA ttribute("",Use:=System.Web.Services.Description.S oapBindingUse.Literal,ParameterStyle:=System.Web.S ervices.Protocols.SoapParameterStyle.Bare)> _
Public FunctionechoDocument(<System.Xml.Serialization.Xml Element_u116?tribute("echoDocument", [Namespace]:="http://message.samples")>ByVal echoDocument1 As System.Xml.XmlDocument) As<System.Xml.Serialization.XmlElementAttribute("e choDocumentReturn",[Namespace]:="http://localhost:8082/axis/services/MessageServiceDoc")> Object
Dim results() As Object = Me.Invoke("echoDocument",New Object() {echoDocument1})
Return CType(results(0), Object)
End Function

'<remarks/>
Public Function BeginechoDocument(ByVal echoDocument1 AsObject, ByVal callback As System.AsyncCallback, ByVal asyncStateAs Object) As System.IAsyncResult
Return Me.BeginInvoke("echoDocument", New Object(){echoDocument1}, callback, asyncState)
End Function

'<remarks/>
Public Function EndechoDocument(ByVal asyncResult AsSystem.IAsyncResult) As Object
Dim results() As Object = Me.EndInvoke(asyncResult)
Return CType(results(0), Object)
End Function
End Class
End Namespace
===========================================
Vb.net client code
Dim proxy As New gdcwf215.MessageServiceDocService
Dim xmldoc As New Xml.XmlDocument
Dim xmldoc1 As New Xml.XmlDocument

Try
xmldoc.LoadXml("<ParameterRequest><PriMod><Name>NA ROE</Name><ModelUser>500700656</ModelUser></PriMod></ParameterRequest>")
xmldoc1 = proxy.echoDocument(xmldoc)
TextBox2.Text = xmldoc1.InnerXml
Catch ex As Exception
TextBox2.Text = ex.Message
End Try


Thanks in advance

--------------------------------
From: chandra kantha

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>34/TsKuuNES7daPsSNFpaw==</Id>
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
null object returnd to .net client while calling axis web service John Smith ASP .Net Web Services 2 11-12-2006 04:33 AM
How to fetch the class object returnd from C# dll to VC++???? jklioe C++ 0 10-31-2006 06:32 AM
InvocationTargetException when calling "new Service()" in Axis web service to call another web service Michael Averstegge Java 0 01-10-2006 11:05 PM
Calling a Web Service using Axis, from within an Axis Web Service running under Tomcat hocho888 Java 1 04-29-2005 08:26 PM
.net recieving null object while accessing axis message style web service chandra kantha via .NET 247 ASP .Net Web Services 0 03-29-2005 06:55 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57