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.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jamie Phillips - 25 Feb 2005 10:29 GMT
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.
Signature

Kind regards,

Jamie

Dilip Krishnan - 25 Feb 2005 18:22 GMT
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/MarketManagerWebService

> 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
[quoted text clipped - 68 lines]
> 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.

Signature

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

Jamie Phillips - 28 Feb 2005 17:20 GMT
Dilip,

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

Kind regards,

Jamie

> Jamie,
>      Check if the namespace in the c# proxy uses the same namespace [0]
[quoted text clipped - 74 lines]
> > 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.
Dino Chiesa [Microsoft] - 28 Feb 2005 21:11 GMT
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

> Dilip,
>
[quoted text clipped - 90 lines]
>> > to
>> > the WSDL) OR the WSDL to whoever thinks that they can help me out.
Jamie Phillips - 01 Mar 2005 15:49 GMT
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

> Best way to get interop is to start with thw WSDL, and generate the server
> and client-side stubs from that.
[quoted text clipped - 97 lines]
> >> > to
> >> > the WSDL) OR the WSDL to whoever thinks that they can help me out.
singhalkapil - 07 Mar 2005 10:24 GMT
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(IAsyncResult
asyncResult)
at System.Net.HttpWebRequest.GetRequestStream()
at
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)
at SampleClient.EventService.EventService.subscribe(String p0) in
D:\Users\KASI\Sandboxes\Compose_ScenarioMgt\Subsystems\ScenarioMgt\C#\SampleClient\Web
References\EventService\Reference.cs:line 121
at AppMain.testEventService() in
d:\users\kasi\sandboxes\compose_scenariomgt\subsystems\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(IAsyncResult
asyncResult)
at System.Net.HttpWebRequest.GetRequestStream()
at
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)
at SampleClient.EventService.EventService.getNextEvent() in
D:\Users\KASI\Sandboxes\Compose_ScenarioMgt\Subsystems\ScenarioMgt\C#\SampleClient\Web
References\EventService\Reference.cs:line 68
at AppMain.testEventService() in
d:\users\kasi\sandboxes\compose_scenariomgt\subsystems\scenariomgt\c#\sampleclient\appmain.cs:line
58
The program '[1744] SampleClient.exe' has exited with code 0 (0x0).

Regards,
Kapil

--
singhalkapil


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.