Re: Writing Java Webservice for a given .NET client



In comp.lang.java.advocacy, Oliver Wong
<owong@xxxxxxxxxxxxxx>
wrote
on Mon, 29 May 2006 18:21:04 GMT
<kYGeg.2547$sK6.259@edtnps90>:

"VJ" <contactvictorj@xxxxxxxxx> wrote in message
news:1148690430.611071.216450@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I have code for a .net webservice and a .net client for it that work
fine. I want to write a Java webservice that could be consumed by the
same client w/o changing any code (just the url). The problem is that
the c# service exposes a function which takes an out parameter. Since
Java doesn't have out parameters does anyone know how I would write a
Java function such that when I pass to java2wsdl or a similar tool it
would generate the correct wsdl?

I.e. the section of the wsdl that I'm concerned about is:

<s:element name="FunctionResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="FunctionResult"
type="s:boolean" />
<s:element minOccurs="0" maxOccurs="1" name="outParameter"
type="s:string" />
</s:sequence>
</s:complexType>
</s:element>

there needs to be 2 elements in the response, the return value and the
out parameter.

Any input appriciated.

I'm not familiar with the .NET architecture, but since you're writing a
webservice, essentially what's happening is that the client makes an HTTP
request, and the server sends an XML document in response, right?

So just have your Java program/servlet/JSP script/whatever produce an
XML document in the same format.

- Oliver


And there are a fair number of methods by which
one can accomplish that. AFAICT, a popular one is
a JBoss/Struts/StrutsCX combination, for example.
Castor is a nice addition but their download area is
slightly unreliable right now.

http://www.jboss.org/
http://struts.apache.org/index.html
http://it.cappuccinonet.com/strutscx/index.php
http://www.castor.org/

--
#191, ewill3@xxxxxxxxxxxxx
Windows Vista. Because it's time to refresh your hardware. Trust us.
.



Relevant Pages

  • Re: How can i send a Data Type to a Java WebService?
    ... Pablo wrote: ... How can i send a DATA Type to a Java WebService? ... In .NET we have only a DataTime that is incompatible with the Data ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Writing Java Webservice for a given .NET client
    ... I want to write a Java webservice that could be consumed by the ... same client w/o changing any code. ... So just have your Java program/servlet/JSP script/whatever produce an XML document in the same format. ...
    (comp.lang.java.advocacy)
  • Alternating between calling webservice in Java and in .Net.
    ... I have given a WSDL file to a bunch of Java and C# developers and wants to ... access theire services by just changing the URL on the webservice object. ... //Call a Java webservice ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: .NET Client calling Java webservices. Slow Performance
    ... I was able to achive performace from .NET Client to Java ... at the same level as Java Client to Java webservice. ...
    (microsoft.public.dotnet.framework.interop)
  • Re: Java compatibility issues (WAS: MF having issues?)
    ... Oliver Wong wrote: ... we see the time frame from the designations. ... can you take the Java Version Numbers you quoted and give us a year for each so that we can see the time spans between? ... Having used DECLARATIVES in RM/COBOL I took that across to the M/F DOS version. ...
    (comp.lang.cobol)