473,770 Members | 6,506 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C# client consuming a Java Axis (1.2RC2) web service

I'm sure this topic has been "around the block" a few times, but I have not
been able to find ANY solutin that fits this particular problem. I have
written a Java Axis web service that has a method which returns an object
with the following characteristics :

public class MMPerson {
public string firstName;
public string surname;
public int age;
public MMAddress address;
}

public class MMAddress {
public string street;
public string city;
public string state;
public string country;
public string postcode;
}

The method is called and via SOAPMonitor (utility to trace the SOAP messages
from server to client) I can see that the Request and Response messages are
fine and dandy:

Request:
--------
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelop e xmlns:soap="htt p://schemas.xmlsoap .org/soap/envelope/"
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http ://www.w3.org/2001/XMLSchema">
<soap:Body>
<test_Person
xmlns="http://localhost:8080/axis/services/MarketManagerWe bService">
<Username>guest </Username>
</test_Person>
</soap:Body>
</soap:Envelope>

Response:
---------
<soapenv:Envelo pe xmlns:soapenv=" http://schemas.xmlsoap .org/soap/envelope/"
xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body >
<test_PersonRes ponse
xmlns="http://localhost:8080/axis/services/MarketManagerWe bService">
<test_PersonRet urn>
<firstName>John </firstName>
<surname>Doe</surname>
<age>26</age>
<address>
<street>51 New Street</street>
<city>London</city>
<state>N/A</state>
<country>UK</country>
<postCode>SW1 5XZ</postCode>
</address>
</test_PersonRetu rn>
</test_PersonResp onse>
</soapenv:Body>
</soapenv:Envelop e>

Unfortunately, when the proxy instantiates the relevant class in c#, all of
the parameters (member variables) are un-initialised...

oPerson.firstNa me = null
oPerson.surname = null
oPerson.age = 0
oPerson.address = null

I will provide the relevant proxy code (Autogenerated by the reference to
the WSDL) OR the WSDL to whoever thinks that they can help me out.
--
Kind regards,

Jamie
Nov 23 '05 #1
7 8898
Jamie,
Check if the namespace in the c# proxy uses the same namespace [0]
as the mesage coming in.

[0] - http://localhost:8080/axis/services/...agerWebService

Jamie Phillips wrote:
I'm sure this topic has been "around the block" a few times, but I have not
been able to find ANY solutin that fits this particular problem. I have
written a Java Axis web service that has a method which returns an object
with the following characteristics :

public class MMPerson {
public string firstName;
public string surname;
public int age;
public MMAddress address;
}

public class MMAddress {
public string street;
public string city;
public string state;
public string country;
public string postcode;
}

The method is called and via SOAPMonitor (utility to trace the SOAP messages
from server to client) I can see that the Request and Response messages are
fine and dandy:

Request:
--------
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelop e xmlns:soap="htt p://schemas.xmlsoap .org/soap/envelope/"
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http ://www.w3.org/2001/XMLSchema">
<soap:Body>
<test_Person
xmlns="http://localhost:8080/axis/services/MarketManagerWe bService">
<Username>guest </Username>
</test_Person>
</soap:Body>
</soap:Envelope>

Response:
---------
<soapenv:Envelo pe xmlns:soapenv=" http://schemas.xmlsoap .org/soap/envelope/"
xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body >
<test_PersonRes ponse
xmlns="http://localhost:8080/axis/services/MarketManagerWe bService">
<test_PersonRet urn>
<firstName>John </firstName>
<surname>Doe</surname>
<age>26</age>
<address>
<street>51 New Street</street>
<city>London</city>
<state>N/A</state>
<country>UK</country>
<postCode>SW1 5XZ</postCode>
</address>
</test_PersonRetu rn>
</test_PersonResp onse>
</soapenv:Body>
</soapenv:Envelop e>

Unfortunately, when the proxy instantiates the relevant class in c#, all of
the parameters (member variables) are un-initialised...

oPerson.firstNa me = null
oPerson.surname = null
oPerson.age = 0
oPerson.address = null

I will provide the relevant proxy code (Autogenerated by the reference to
the WSDL) OR the WSDL to whoever thinks that they can help me out.


--
HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com
Nov 23 '05 #2
Dilip,

Everything appears to be fine in the c# proxy ie the namespace is the same
as the message coming in :-(

Kind regards,

Jamie

"Dilip Krishnan" wrote:
Jamie,
Check if the namespace in the c# proxy uses the same namespace [0]
as the mesage coming in.

[0] - http://localhost:8080/axis/services/...agerWebService

Jamie Phillips wrote:
I'm sure this topic has been "around the block" a few times, but I have not
been able to find ANY solutin that fits this particular problem. I have
written a Java Axis web service that has a method which returns an object
with the following characteristics :

public class MMPerson {
public string firstName;
public string surname;
public int age;
public MMAddress address;
}

public class MMAddress {
public string street;
public string city;
public string state;
public string country;
public string postcode;
}

The method is called and via SOAPMonitor (utility to trace the SOAP messages
from server to client) I can see that the Request and Response messages are
fine and dandy:

Request:
--------
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelop e xmlns:soap="htt p://schemas.xmlsoap .org/soap/envelope/"
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http ://www.w3.org/2001/XMLSchema">
<soap:Body>
<test_Person
xmlns="http://localhost:8080/axis/services/MarketManagerWe bService">
<Username>guest </Username>
</test_Person>
</soap:Body>
</soap:Envelope>

Response:
---------
<soapenv:Envelo pe xmlns:soapenv=" http://schemas.xmlsoap .org/soap/envelope/"
xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body >
<test_PersonRes ponse
xmlns="http://localhost:8080/axis/services/MarketManagerWe bService">
<test_PersonRet urn>
<firstName>John </firstName>
<surname>Doe</surname>
<age>26</age>
<address>
<street>51 New Street</street>
<city>London</city>
<state>N/A</state>
<country>UK</country>
<postCode>SW1 5XZ</postCode>
</address>
</test_PersonRetu rn>
</test_PersonResp onse>
</soapenv:Body>
</soapenv:Envelop e>

Unfortunately, when the proxy instantiates the relevant class in c#, all of
the parameters (member variables) are un-initialised...

oPerson.firstNa me = null
oPerson.surname = null
oPerson.age = 0
oPerson.address = null

I will provide the relevant proxy code (Autogenerated by the reference to
the WSDL) OR the WSDL to whoever thinks that they can help me out.


--
HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com

Nov 23 '05 #3
Best way to get interop is to start with thw WSDL, and generate the server
and client-side stubs from that.

Usually it's necessary to see the WSDL to figure out interop problems.

-D
"Jamie Phillips" <Ja***********@ discussions.mic rosoft.com> wrote in message
news:5F******** *************** ***********@mic rosoft.com...
Dilip,

Everything appears to be fine in the c# proxy ie the namespace is the same
as the message coming in :-(

Kind regards,

Jamie

"Dilip Krishnan" wrote:
Jamie,
Check if the namespace in the c# proxy uses the same namespace [0]
as the mesage coming in.

[0] - http://localhost:8080/axis/services/...agerWebService

Jamie Phillips wrote:
> I'm sure this topic has been "around the block" a few times, but I have
> not
> been able to find ANY solutin that fits this particular problem. I have
> written a Java Axis web service that has a method which returns an
> object
> with the following characteristics :
>
> public class MMPerson {
> public string firstName;
> public string surname;
> public int age;
> public MMAddress address;
> }
>
> public class MMAddress {
> public string street;
> public string city;
> public string state;
> public string country;
> public string postcode;
> }
>
> The method is called and via SOAPMonitor (utility to trace the SOAP
> messages
> from server to client) I can see that the Request and Response messages
> are
> fine and dandy:
>
> Request:
> --------
> <?xml version="1.0" encoding="utf-8"?>
> <soap:Envelop e xmlns:soap="htt p://schemas.xmlsoap .org/soap/envelope/"
> xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http ://www.w3.org/2001/XMLSchema">
> <soap:Body>
> <test_Person
> xmlns="http://localhost:8080/axis/services/MarketManagerWe bService">
> <Username>guest </Username>
> </test_Person>
> </soap:Body>
> </soap:Envelope>
>
> Response:
> ---------
> <soapenv:Envelo pe
> xmlns:soapenv=" http://schemas.xmlsoap .org/soap/envelope/"
> xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance">
> <soapenv:Body >
> <test_PersonRes ponse
> xmlns="http://localhost:8080/axis/services/MarketManagerWe bService">
> <test_PersonRet urn>
> <firstName>John </firstName>
> <surname>Doe</surname>
> <age>26</age>
> <address>
> <street>51 New Street</street>
> <city>London</city>
> <state>N/A</state>
> <country>UK</country>
> <postCode>SW1 5XZ</postCode>
> </address>
> </test_PersonRetu rn>
> </test_PersonResp onse>
> </soapenv:Body>
> </soapenv:Envelop e>
>
> Unfortunately, when the proxy instantiates the relevant class in c#,
> all of
> the parameters (member variables) are un-initialised...
>
> oPerson.firstNa me = null
> oPerson.surname = null
> oPerson.age = 0
> oPerson.address = null
>
> I will provide the relevant proxy code (Autogenerated by the reference
> to
> the WSDL) OR the WSDL to whoever thinks that they can help me out.


--
HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com

Nov 23 '05 #4
Hi Dino,

Unfortunately in the final version of the client I will not have any
influence on the Java web service, hence why I was writing the server client
in this manner.

As I stated in the original post, I will supply the WSDL to whoever thinks
they can give me a helping hand, simply so as not to fill this thread up with
so much text :-D
"Dino Chiesa [Microsoft]" wrote:
Best way to get interop is to start with thw WSDL, and generate the server
and client-side stubs from that.

Usually it's necessary to see the WSDL to figure out interop problems.

-D
"Jamie Phillips" <Ja***********@ discussions.mic rosoft.com> wrote in message
news:5F******** *************** ***********@mic rosoft.com...
Dilip,

Everything appears to be fine in the c# proxy ie the namespace is the same
as the message coming in :-(

Kind regards,

Jamie

"Dilip Krishnan" wrote:
Jamie,
Check if the namespace in the c# proxy uses the same namespace [0]
as the mesage coming in.

[0] - http://localhost:8080/axis/services/...agerWebService

Jamie Phillips wrote:
> I'm sure this topic has been "around the block" a few times, but I have
> not
> been able to find ANY solutin that fits this particular problem. I have
> written a Java Axis web service that has a method which returns an
> object
> with the following characteristics :
>
> public class MMPerson {
> public string firstName;
> public string surname;
> public int age;
> public MMAddress address;
> }
>
> public class MMAddress {
> public string street;
> public string city;
> public string state;
> public string country;
> public string postcode;
> }
>
> The method is called and via SOAPMonitor (utility to trace the SOAP
> messages
> from server to client) I can see that the Request and Response messages
> are
> fine and dandy:
>
> Request:
> --------
> <?xml version="1.0" encoding="utf-8"?>
> <soap:Envelop e xmlns:soap="htt p://schemas.xmlsoap .org/soap/envelope/"
> xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http ://www.w3.org/2001/XMLSchema">
> <soap:Body>
> <test_Person
> xmlns="http://localhost:8080/axis/services/MarketManagerWe bService">
> <Username>guest </Username>
> </test_Person>
> </soap:Body>
> </soap:Envelope>
>
> Response:
> ---------
> <soapenv:Envelo pe
> xmlns:soapenv=" http://schemas.xmlsoap .org/soap/envelope/"
> xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance">
> <soapenv:Body >
> <test_PersonRes ponse
> xmlns="http://localhost:8080/axis/services/MarketManagerWe bService">
> <test_PersonRet urn>
> <firstName>John </firstName>
> <surname>Doe</surname>
> <age>26</age>
> <address>
> <street>51 New Street</street>
> <city>London</city>
> <state>N/A</state>
> <country>UK</country>
> <postCode>SW1 5XZ</postCode>
> </address>
> </test_PersonRetu rn>
> </test_PersonResp onse>
> </soapenv:Body>
> </soapenv:Envelop e>
>
> Unfortunately, when the proxy instantiates the relevant class in c#,
> all of
> the parameters (member variables) are un-initialised...
>
> oPerson.firstNa me = null
> oPerson.surname = null
> oPerson.age = 0
> oPerson.address = null
>
> I will provide the relevant proxy code (Autogenerated by the reference
> to
> the WSDL) OR the WSDL to whoever thinks that they can help me out.

--
HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com


Nov 23 '05 #5

hello
I m creating a C# client that connects to Java Web Service for
accessing events using Systinet Web Server.
The connection to the service is done but it does not get the events
from the service.
secondly it is very inconsisitent. it runs once n then keep on showing
exception. the complete stack trace is here:
Connecting EventService...
Connected: SampleClient.Ev entService.Even tService
Subscribing...
System.Net.WebE xception: The underlying connection was closed: The
proxy name could not be resolved, verify correct proxy configuration.
at System.Net.Http WebRequest.Chec kFinalStatus()
at System.Net.Http WebRequest.EndG etRequestStream (IAsyncResult
asyncResult)
at System.Net.Http WebRequest.GetR equestStream()
at
System.Web.Serv ices.Protocols. SoapHttpClientP rotocol.Invoke( String
methodName, Object[] parameters)
at SampleClient.Ev entService.Even tService.subscr ibe(String p0) in
D:\Users\KASI\S andboxes\Compos e_ScenarioMgt\S ubsystems\Scena rioMgt\C#\Sampl eClient\Web
References\Even tService\Refere nce.cs:line 121
at AppMain.testEve ntService() in
d:\users\kasi\s andboxes\compos e_scenariomgt\s ubsystems\scena riomgt\c#\sampl eclient\appmain .cs:line
34
System.Net.WebE xception: The underlying connection was closed: The
proxy name could not be resolved, verify correct proxy configuration.
at System.Net.Http WebRequest.Chec kFinalStatus()
at System.Net.Http WebRequest.EndG etRequestStream (IAsyncResult
asyncResult)
at System.Net.Http WebRequest.GetR equestStream()
at
System.Web.Serv ices.Protocols. SoapHttpClientP rotocol.Invoke( String
methodName, Object[] parameters)
at SampleClient.Ev entService.Even tService.getNex tEvent() in
D:\Users\KASI\S andboxes\Compos e_ScenarioMgt\S ubsystems\Scena rioMgt\C#\Sampl eClient\Web
References\Even tService\Refere nce.cs:line 68
at AppMain.testEve ntService() in
d:\users\kasi\s andboxes\compos e_scenariomgt\s ubsystems\scena riomgt\c#\sampl eclient\appmain .cs:line
58
The program '[1744] SampleClient.ex e' has exited with code 0 (0x0).

Regards,
Kapil

--
singhalkapil
------------------------------------------------------------------------
Posted via http://www.mcse.ms
------------------------------------------------------------------------
View this thread: http://www.mcse.ms/message1448629.html

Nov 23 '05 #6
zmbharmal
4 New Member
Did you find a solution to the problem of a .NET client not been able to access a Axis/Java web service. I am also getting NULL in the response though the Java webservice is returning the correct object. I am writing the .NET client
Jul 18 '06 #7
zmbharmal
4 New Member
Did you find a solution to the problem of a .NET client not been able to access a Axis/Java web service. I am also getting NULL in the response though the Java webservice is returning the correct object. I am writing the .NET client

My email ID is zmbharmal@hotma il.com
My desk # in USA is 214 540 8970 extn 175.
Jul 18 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2503
by: umhlali | last post by:
I get the following exception when my VB.NET app calls a Java web service that returns an array of objects. The same call works for a single object though. So looks like there is no problem serializing the object but there seems to be a problem serializing an array of objects. Any help will be appreciated "Cannot assign object of type System.Object to an object of type ElectronicWallet.C2PTest.PaymentItem." :...
4
6318
by: JLJ | last post by:
I have a very simple webservice written in Java/Axis. It takes in a complexType with 2 string elements, userid and password. The response is a complexType containing two complexTypes each having 2 strings <wsdl:portType name=SecurityLoginService"> <wsdl:operation name="login"> <wsdl:input message="tns:loginRequest" name="loginRequest"/> <wsdl:output message="tns:loginResponse" name="loginResponse"/> </wsdl:operation> </wsdl:portType>
0
1434
by: Jamie Phillips | last post by:
I'm sure this topic has been "around the block" a few times, but I have not been able to find ANY solutin that fits this particular problem. I have written a Java Axis web service that has a method which returns an object with the following characteristics: public class MMPerson { public string firstName; public string surname; public int age; public MMAddress address;
3
6958
by: Tom_B | last post by:
Trying to consume with a VB.Net client a Java Axis web service that returns a DataHandler type. After much searching on the internet -- no clues found. Any ideas on how to do this? Thanks. TomB
0
1410
by: dynoweb | last post by:
We have a return object that has a super class called SoapReturnResponse. There are several implementing classes like User, Card, DataTable (not the .net one). When we add the reference in VS 2003 and VS 2005 B2, VS is not able to type cast the more general type SoapReturnResponse into it's actual type of User, Card etc.. For example: SoapReturn soapReturn = billing.getUser(email); if (soapReturn.returnStatus == 2) // expected...
1
2073
by: John Smith | last post by:
I'm expiriencing the same problem as someone posted one year ago: http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet.webservices/browse_thread/thread/26ce783f764a8de8/2480c84619bf4244?lnk=st&q=return+xmldocument+webservice+null&rnum=9&hl=sl#2480c84619bf4244 Unfortunatelly, there wasn't an answer posted, too. I've searched the web, but couldn't find even one similar topic to this one. :(
0
1260
by: stephenmoore | last post by:
Hi, I'm having some dramas talking to a Java (Axis) web service. The 2 main road blocks are: a. the web service request must be signed with a certificate. b. the response includes SwA attachments in a multi-part MIME message. the first point can be fixed by setting a policy on the Microsoft.Web.Services3.Messaging.SoapClient proxy.
0
5020
by: Ed | last post by:
Hi Guys, Opentext.com has implemented web services for their Livelink software, and many of its customers such as Philips and so on, are using them, for integration. Philips has published them, on the internet in the following link: http://incenter.medical.philips.com/LiveServices/DocMan.asmx My question is: Is there anyone who has any java/axis "web service
0
1458
by: ajay p | last post by:
Hi, I have web service which is .NET 2.0. My client is having web service Java AXIs web service. I am able to invoke web method of client web service by passing SOAP Header. Now i facing problem to retrieve value from SOAP header which comes in SOAP response. In following format I am receiving response. <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"...
0
9425
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10228
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10002
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9869
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7415
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6676
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5312
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3575
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2816
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.