ws-soap-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Nichol" <>
Subject Re: java client for .NET : need SOAPMapping sample code
Date Tue, 05 Mar 2002 13:43:06 GMT
I'm glad to hear you are moving forward, but it's too bad you had to
serialize everything as a string.

I will finally be a machine locally with .NET sometime next week, so at that
time I should have a chance to look at interoperability first hand.

Of the things I discovered during my investigation, I believe the most
promising is the attributes used in the server examples.
I believe these specify the soap/rpc encoding scheme (rather than
doc/literal), which I suspect is the key to interoperability.


----- Original Message -----
From: <>
To: <>
Sent: Tuesday, March 05, 2002 5:46 AM
Subject: Re: java client for .NET : need SOAPMapping sample code

no, i'm still looking for a solution... i saw many other interop exemples,
for simple types, but it's only code sample, i think that i may need an
overall overview to see what's wrong...
for the moment, i make a hard coded SOAP message, into a string buffer,
and send it to .NET and just parse the xml returned.
but it would be really cleaner and better if i could generate this SOAP
with Mapping, marshall and so on...


"Scott Nichol" <>
03/05/2002 05:23 AM
Please respond to soap-dev

        To:     <>
        Subject:        Re: java client for .NET : need SOAPMapping sample


I have not seen anything posted from you in a while.  Have you resolved

Scott Nichol

  ----- Original Message -----
  Sent: Thursday, February 21, 2002 6:43 PM
  Subject: java client for .NET : need SOAPMapping sample code

  i had a code, in the past, to marshall a java object into SOAP before to
send it to a java webservice.
  Now, my java client calls a .NET webservice.
  and the way i connect to the .NET webservice is different (i don't use
Call() class, i do use URL() class, just because taht's the only code i
to connectto a .NET webservice)
  the problem is that my SOAP code doesn't fit any more

  could you post me a sample code, with a connection to a .NETwebservice
a SOAPMapping ?


  Old java code

          Call call = new Call ();
          call.setTargetObjectURI ("urn:liox:Project");
          call.setMethodName ("getProject");
          SOAPMappingRegistry smr = new SOAPMappingRegistry();
          ProjectSerializer beanSer = new ProjectSerializer();
          StringDeserializer sd = new StringDeserializer ();

          smr.mapTypes(Constants.NS_URI_SOAP_ENC, new
"Project"), Project.class, beanSer, beanSer);
          smr.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("", "return"),
Project.class, null, beanSer);
          smr.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("",
"ProjectCode"), null, null, sd);
          smr.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("",
"CompanyName"), null, null, sd);


          Response resp = call.invoke (url, "" );

  New java code

                  byte[] request = marshall();
                  URL endpoint = new
                      URLConnection con = endpoint.openConnection ();
                      con.setDoInput (true);
                      con.setDoOutput (true);
                      con.setUseCaches (false);
                      con.setRequestProperty ("Content-Length",
Integer.toString (request.length));
                      con.setRequestProperty ("Content-Type", "text/xml;
                      con.setRequestProperty ("SOAPAction",
                      OutputStream out = con.getOutputStream ();
                  //HERE SOAPMAPPING ???? HOW ??? it's not urn anymore
                  out.write (request);
                      out.flush ();

  Elise Dupont
  Software developer
  Technology Development Group Europe
  Lionbridge Technologies - France
  Buropolis 1 - 1240 route des Dolines
  06560 Sophia-Antipolis

Do You Yahoo!?
Get your free address at

Do You Yahoo!?
Get your free address at

View raw message