You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by Te...@i2.com on 2001/04/04 18:36:14 UTC

RE: Java Client talking to MS Soap Toolkit Beta 2 - Thanks

This worked like a charm. Thanks.


                                                                                                                          
                    Kannan Arun-AKANNA1                                                                                   
                    <Arun_Kannan-AKANNA1@emai        To:     "'soap-user@xml.apache.org'" <so...@xml.apache.org>      
                    l.mot.com>                       cc:                                                                  
                                                     Subject:     RE: Java Client talking to MS Soap Toolkit Beta 2       
                    04/03/01 05:50 PM                                                                                     
                    Please respond to                                                                                     
                    soap-user                                                                                             
                                                                                                                          
                                                                                                                          




This is a post that appeared in this discussion group posted by Silvio and
I got it working , make sure you parameter names are exactly the same as in
the WSDL file.
-Arun
The post...

Yeah, I was getting the same error at first. It really seems like some doc
could be written up to explain this. If there is one already maybe it could
be advertised a bit better.

Anyways, let's say you have a COM object "SOAPTest.TestClass" and you'd
like
to call method "TestMethod" which takes one string as a parameter and
returns a string. Here's what you do (I'm using the 'guidgen' sample as a
basis):

    Vector params = new Vector();
    URL url = new
URL("http://localhost/path_to_wsdl_generated_asp_file.asp");

    // define deserializers for the return things (without xsi:type)
    SOAPMappingRegistry smr = new SOAPMappingRegistry ();
    StringDeserializer sd = new StringDeserializer ();
    smr.mapTypes (Constants.NS_URI_SOAP_ENC, new QName("", "Result"), null,
null, sd);

    // create the transport and set parameters
    SOAPHTTPConnection st = new SOAPHTTPConnection();

    // build the call.
    Call call = new Call ();
    call.setSOAPTransport(st);
    call.setSOAPMappingRegistry (smr);
    call.setTargetObjectURI ("http://tempuri.org/message/");
    call.setMethodName("TestMethod");
    call.setEncodingStyleURI ("http://schemas.xmlsoap.org/soap/encoding/");

    params.addElement(new Parameter("strParam1", String.class, "A", null));
    call.setParams(params);

    // invoke it
    Response resp;
    resp = call.invoke (url,
"http://tempuri.org/action/TestClass.TestMethod");

I think that should do it. I just got it working today. Email me directly
if
you're still having problems (unless the other list members don't mind the
traffic).

Silvio


-----Original Message-----
From: Terry_Truta@i2.com [mailto:Terry_Truta@i2.com]
Sent: Tuesday, April 03, 2001 5:41 PM
To: soap-user@xml.apache.org
Subject: RE: Java Client talking to MS Soap Toolkit Beta 2



Could you please elaborate on this? I recently started trying to get a Java
client talking to MS Soap and I'm not familiar with the "xsi typing
problem". If you could give a quick example of defining a type mapping that
would be great.  BTW, is there anything else one needs to do to get Apache
SOAP working with a MS SOAP server? Thanks in advance.




                    "Hansen, Richard"

                    <Richard.Hansen@west        To:
"'soap-user@xml.apache.org'" <so...@xml.apache.org>
                    group.com>                  cc:

                                                Subject:     RE: Java
Client talking to MS Soap Toolkit Beta 2
                    04/03/01 03:23 PM

                    Please respond to

                    soap-user







With the current Apache build (post 2.1) you can work around the xsi typing
issue by defining type mappings when you deploy the service.

Rick Hansen

The views, opinions, and judgments expressed in this message are solely
those of the author. The message contents have not been reviewed or
approved by West Group.

> -----Original Message-----
> From: Tim Johnson [mailto:Tim.Johnson@Sunquest.com]
> Sent: Tuesday, April 03, 2001 11:10 AM
> To: 'soap-user@xml.apache.org'
> Subject: Java Client talking to MS Soap Toolkit Beta 2
>
>
> On March 12 Adam Leggett wrote:
>
> Does anyone know: With Soap 2.0 is there still the xsi typing
> problem when
> connecting to MS
> SOAP services? If so , is there anyway to turn this 'off' in
> the API. Can i
> now build an MS
> compatible envelope from my java client? Previously, i have
> had to generate
> the envelope
> programmatically to achieve this.
>
> Cheers and thanks in advance,
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org






---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org






---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org