You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Frank Starsinic <fs...@apengines.com> on 2001/01/11 19:07:34 UTC

Drawbacks to not using the SOAP-API

What pitfalls am i presented with if we decide not to 
use apache soap and just use striaght HHTP via a servlet
or jsp and parse the xml (soap envelope) ourselves.

encoding?
dealing with arrays?

just wondering %-)


frank


Re: Problems with SOAP client AGAIN..

Posted by Javier Galindo <hg...@engineer.com>.
Sorry, i mean not using in the server IBM SOAP, using Microsoft on the server and
apache soap in the client.

Javier Galindo wrote:

> Hi,
>
> any of you has made function properly a soap client not using IBM SOAP? i mean
> using Microsoft?
>
> I'm getting the following error trying to do that:
>
> this is the code:
>
>     String encodingStyleURI = Constants.NS_URI_SOAP_ENC;
>     URL url = new URL ("http://sfcbdesarrollo1/ICRM/integ/services.asp");
>     // Build the call.
>     Call call = new Call ();
>     call.setTargetObjectURI ("RutinasSuite");
>     call.setMethodName ("PruebaObtHora");
>     call.setEncodingStyleURI(encodingStyleURI);
>     Vector params = new Vector ();
>     Parameter pTemp = new Parameter("parametro", String.class, "hola",
> Constants.ATTR_ENCODING_STYLE);
> //    pTemp.setEncodingStyleURI("http://schemas.xmlsoap.org/soap/encoding/");
>     params.addElement (pTemp);
>     call.setParams (params);
>
>     // make the call: note that the action URI is empty because the
>     // XML-SOAP rpc router does not need this. This may change in the
>     // future.
>     Response resp = null;
>     resp = call.invoke (/* router URL */ url, /* actionURI */ "" );
>     // Check the response.
>     if (resp.generatedFault ()) {
>       Fault fault = resp.getFault ();
>       System.out.println ("Ouch, the call failed: ");
>       System.out.println ("  Fault Code   = " + fault.getFaultCode ());
>       System.out.println ("  Fault String = " + fault.getFaultString ());
>       System.out.println ("  Fault Actor URI = " + fault.getFaultActorURI());
>       System.out.println ("  Fault Entries = " + fault.getFaultEntries());
>       System.out.println ("  Fault toString = " + fault.toString());
>     } else {
>       Parameter result = resp.getReturnValue ();
>       System.out.println (result.getValue ());
>     }
>
> this is the error:
>
> [SOAPException: faultCode=SOAP-ENV:Client; msg=No Serializer found to serialize
> a 'org.apache.soap.rpc.Parameter' using encoding style 'encodingStyle'.;
> targetException=java.lang.IllegalArgumentException: No Serializer found to
> serialize a 'org.apache.soap.rpc.Parameter' using encoding style
> 'encodingStyle'.]
>  at
> org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnection.java:115)
>
>  at org.apache.soap.rpc.Call.invoke(Call.java:145)
>  at samples.stockquote.GetQuote.main(GetQuote.java:116)
> Exception in thread "main"
>
> Thanks in advance..
>
> Javier

Problems with SOAP client

Posted by Javier Galindo <hg...@engineer.com>.
Hi,

any of you has made function properly a soap client not using IBM SOAP? i mean
using Microsoft?

I'm getting the following error trying to do that:

this is the code:

    String encodingStyleURI = Constants.NS_URI_SOAP_ENC;
    URL url = new URL ("http://sfcbdesarrollo1/ICRM/integ/services.asp");
    // Build the call.
    Call call = new Call ();
    call.setTargetObjectURI ("RutinasSuite");
    call.setMethodName ("PruebaObtHora");
    call.setEncodingStyleURI(encodingStyleURI);
    Vector params = new Vector ();
    Parameter pTemp = new Parameter("parametro", String.class, "hola",
Constants.ATTR_ENCODING_STYLE);
//    pTemp.setEncodingStyleURI("http://schemas.xmlsoap.org/soap/encoding/");
    params.addElement (pTemp);
    call.setParams (params);

    // make the call: note that the action URI is empty because the
    // XML-SOAP rpc router does not need this. This may change in the
    // future.
    Response resp = null;
    resp = call.invoke (/* router URL */ url, /* actionURI */ "" );
    // Check the response.
    if (resp.generatedFault ()) {
      Fault fault = resp.getFault ();
      System.out.println ("Ouch, the call failed: ");
      System.out.println ("  Fault Code   = " + fault.getFaultCode ());
      System.out.println ("  Fault String = " + fault.getFaultString ());
      System.out.println ("  Fault Actor URI = " + fault.getFaultActorURI());
      System.out.println ("  Fault Entries = " + fault.getFaultEntries());
      System.out.println ("  Fault toString = " + fault.toString());
    } else {
      Parameter result = resp.getReturnValue ();
      System.out.println (result.getValue ());
    }


this is the error:

[SOAPException: faultCode=SOAP-ENV:Client; msg=No Serializer found to serialize
a 'org.apache.soap.rpc.Parameter' using encoding style 'encodingStyle'.;
targetException=java.lang.IllegalArgumentException: No Serializer found to
serialize a 'org.apache.soap.rpc.Parameter' using encoding style
'encodingStyle'.]
 at
org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnection.java:115)

 at org.apache.soap.rpc.Call.invoke(Call.java:145)
 at samples.stockquote.GetQuote.main(GetQuote.java:116)
Exception in thread "main"


Thanks in advance..


Javier

Re: Drawbacks to not using the SOAP-API

Posted by Benoit Doreau <be...@inexbee.com>.
Probably, but maybe also dependance to HTTP...

HTTP is one of the possible protocol to transport SOAP messages.
SMTP is another one, that could become valuable if you need to introduce
asynchronism in the processing chain at some point.

Benoit

----- Original Message -----
From: Frank Starsinic <fs...@apengines.com>
To: <so...@xml.apache.org>; <so...@xml.apache.org>
Sent: Thursday, January 11, 2001 7:07 PM
Subject: Drawbacks to not using the SOAP-API


> What pitfalls am i presented with if we decide not to
> use apache soap and just use striaght HHTP via a servlet
> or jsp and parse the xml (soap envelope) ourselves.
>
> encoding?
> dealing with arrays?
>
> just wondering %-)
>
>
> frank
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org
>


Re: Drawbacks to not using the SOAP-API

Posted by Benoit Doreau <be...@inexbee.com>.
Probably, but maybe also dependance to HTTP...

HTTP is one of the possible protocol to transport SOAP messages.
SMTP is another one, that could become valuable if you need to introduce
asynchronism in the processing chain at some point.

Benoit

----- Original Message -----
From: Frank Starsinic <fs...@apengines.com>
To: <so...@xml.apache.org>; <so...@xml.apache.org>
Sent: Thursday, January 11, 2001 7:07 PM
Subject: Drawbacks to not using the SOAP-API


> What pitfalls am i presented with if we decide not to
> use apache soap and just use striaght HHTP via a servlet
> or jsp and parse the xml (soap envelope) ourselves.
>
> encoding?
> dealing with arrays?
>
> just wondering %-)
>
>
> frank
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org
>


Re: Drawbacks to not using the SOAP-API

Posted by Benoit Doreau <be...@inexbee.com>.
Probably, but maybe also dependance to HTTP...

HTTP is one of the possible protocol to transport SOAP messages.
SMTP is another one, that could become valuable if you need to introduce
asynchronism in the processing chain at some point.

Benoit

----- Original Message -----
From: Frank Starsinic <fs...@apengines.com>
To: <so...@xml.apache.org>; <so...@xml.apache.org>
Sent: Thursday, January 11, 2001 7:07 PM
Subject: Drawbacks to not using the SOAP-API


> What pitfalls am i presented with if we decide not to
> use apache soap and just use striaght HHTP via a servlet
> or jsp and parse the xml (soap envelope) ourselves.
>
> encoding?
> dealing with arrays?
>
> just wondering %-)
>
>
> frank
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org
>