473,322 Members | 1,719 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

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:Envelope xmlns:soap="http://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/MarketManagerWebService">
<Username>guest</Username>
</test_Person>
</soap:Body>
</soap:Envelope>

Response:
---------
<soapenv:Envelope 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_PersonResponse
xmlns="http://localhost:8080/axis/services/MarketManagerWebService">
<test_PersonReturn>
<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_PersonReturn>
</test_PersonResponse>
</soapenv:Body>
</soapenv:Envelope>

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

oPerson.firstName = 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 8870
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:Envelope xmlns:soap="http://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/MarketManagerWebService">
<Username>guest</Username>
</test_Person>
</soap:Body>
</soap:Envelope>

Response:
---------
<soapenv:Envelope 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_PersonResponse
xmlns="http://localhost:8080/axis/services/MarketManagerWebService">
<test_PersonReturn>
<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_PersonReturn>
</test_PersonResponse>
</soapenv:Body>
</soapenv:Envelope>

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

oPerson.firstName = 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:Envelope xmlns:soap="http://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/MarketManagerWebService">
<Username>guest</Username>
</test_Person>
</soap:Body>
</soap:Envelope>

Response:
---------
<soapenv:Envelope 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_PersonResponse
xmlns="http://localhost:8080/axis/services/MarketManagerWebService">
<test_PersonReturn>
<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_PersonReturn>
</test_PersonResponse>
</soapenv:Body>
</soapenv:Envelope>

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

oPerson.firstName = 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.microsoft.com> wrote in message
news:5F**********************************@microsof t.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:Envelope xmlns:soap="http://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/MarketManagerWebService">
> <Username>guest</Username>
> </test_Person>
> </soap:Body>
> </soap:Envelope>
>
> Response:
> ---------
> <soapenv:Envelope
> 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_PersonResponse
> xmlns="http://localhost:8080/axis/services/MarketManagerWebService">
> <test_PersonReturn>
> <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_PersonReturn>
> </test_PersonResponse>
> </soapenv:Body>
> </soapenv:Envelope>
>
> Unfortunately, when the proxy instantiates the relevant class in c#,
> all of
> the parameters (member variables) are un-initialised...
>
> oPerson.firstName = 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.microsoft.com> wrote in message
news:5F**********************************@microsof t.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:Envelope xmlns:soap="http://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/MarketManagerWebService">
> <Username>guest</Username>
> </test_Person>
> </soap:Body>
> </soap:Envelope>
>
> Response:
> ---------
> <soapenv:Envelope
> 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_PersonResponse
> xmlns="http://localhost:8080/axis/services/MarketManagerWebService">
> <test_PersonReturn>
> <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_PersonReturn>
> </test_PersonResponse>
> </soapenv:Body>
> </soapenv:Envelope>
>
> Unfortunately, when the proxy instantiates the relevant class in c#,
> all of
> the parameters (member variables) are un-initialised...
>
> oPerson.firstName = 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.EventService.EventService
Subscribing...
System.Net.WebException: The underlying connection was closed: The
proxy name could not be resolved, verify correct proxy configuration.
at System.Net.HttpWebRequest.CheckFinalStatus()
at System.Net.HttpWebRequest.EndGetRequestStream(IAsy ncResult
asyncResult)
at System.Net.HttpWebRequest.GetRequestStream()
at
System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
methodName, Object[] parameters)
at SampleClient.EventService.EventService.subscribe(S tring p0) in
D:\Users\KASI\Sandboxes\Compose_ScenarioMgt\Subsys tems\ScenarioMgt\C#\SampleClient\Web
References\EventService\Reference.cs:line 121
at AppMain.testEventService() in
d:\users\kasi\sandboxes\compose_scenariomgt\subsys tems\scenariomgt\c#\sampleclient\appmain.cs:line
34
System.Net.WebException: The underlying connection was closed: The
proxy name could not be resolved, verify correct proxy configuration.
at System.Net.HttpWebRequest.CheckFinalStatus()
at System.Net.HttpWebRequest.EndGetRequestStream(IAsy ncResult
asyncResult)
at System.Net.HttpWebRequest.GetRequestStream()
at
System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
methodName, Object[] parameters)
at SampleClient.EventService.EventService.getNextEven t() in
D:\Users\KASI\Sandboxes\Compose_ScenarioMgt\Subsys tems\ScenarioMgt\C#\SampleClient\Web
References\EventService\Reference.cs:line 68
at AppMain.testEventService() in
d:\users\kasi\sandboxes\compose_scenariomgt\subsys tems\scenariomgt\c#\sampleclient\appmain.cs:line
58
The program '[1744] SampleClient.exe' 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
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
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@hotmail.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
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...
4
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...
0
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...
3
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. ...
0
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...
1
by: John Smith | last post by:
I'm expiriencing the same problem as someone posted one year ago: ...
0
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...
0
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...
0
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...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.