manish-kukreja / ksoap2-android

Automatically exported from code.google.com/p/ksoap2-android
0 stars 0 forks source link

ActionNotSupported SoapFault with WSDL #62

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use ksoap2genstub to create the java stub classes 
(https://ksoap2genstub.svn.sourceforge.net/)
2. Use ksoap2 to access the WSDL (BasicHttpBinding)
3.

What is the expected output? What do you see instead?
As _envelope.bodyIn I get a SoapFault:

"SoapFault - faultcode: 'a:ActionNotSupported' faultstring: 'The message with 
Action '' cannot be processed at the receiver, due to a ContractFilter mismatch 
at the EndpointDispatcher. This may be because of either a contract mismatch 
(mismatched Actions between sender and receiver) or a binding/security mismatch 
between the sender and the receiver.  Check that sender and receiver have the 
same contract and the same binding (including security requirements, e.g. 
Message, Transport, None).' faultactor: 'null' detail: null"

Furthermore, I cannot see any kind of plain text response other than this.
Of course, I expect a proper output.

What version of the product are you using? On what operating system?
I'm using ksoap2-android-assembly-2.5.6-jar-with-dependencies.jar on Windows 7 
x64 and Android Honeycomb 3.1 on a real device.

Please provide any additional information below.
If I create a WSDL Client in Eclipse, the web service works properly.
Also, the URL I connect to is correct, as if I change it, I get a XMLParsing 
exception, because the response is not valid, I guess.

What can be the issue? Do I need to change the binding settings on the server 
side? Can it be the ksoap2-stubgen that makes bad classes?
Thank you.

Original issue reported on code.google.com by francesc...@gmail.com on 24 Jun 2011 at 11:08

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
One more thing: by passing the WSDL over to soapUI, it creates this schema:
<soapenv:Envelope
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope
    xmlns:tem="http://tempuri.org/"
    xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:d="http://www.w3.org/2001/XMLSchema"
    xmlns:c="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:v="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Header/>
    <soapenv:Body>
        <tem:ConvalidaLogin>
                <!--Optional:-->
                <tem:Username>?</tem:Username>
                <!--Optional:-->
                <tem:password>?</tem:password>
            </tem:ConvalidaLogin>
    </soapenv:Body>
</soapenv:Envelope>

Instead, the RequestDump was:
<v:Envelope
    xmlns:i="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:d="http://www.w3.org/2001/XMLSchema"
    xmlns:c="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:v="http://schemas.xmlsoap.org/soap/envelope/">
    <v:Header />
    <v:Body>
        <convalidaLogin id="o0" c:root="1">
            <username i:type="d:string">?</username>
            <password i:type="d:string">?</password>
        </convalidaLogin>
    </v:Body>
</v:Envelope>

I'm pretty sure this is the problem, but how can I solve it? The SOAP version 
on the server-side is 1.1, and I have set the envelope as 11:
SoapSerializationEnvelope _envelope = new 
SoapSerializationEnvelope(SoapEnvelope.VER11);

Original comment by francesc...@gmail.com on 24 Jun 2011 at 1:16

GoogleCodeExporter commented 9 years ago
you might want to look at wsdl2ksoap instead. Seems a more maintained project.

Original comment by mosa...@gmail.com on 5 Jul 2011 at 6:08

GoogleCodeExporter commented 9 years ago
Close as invalid since it is a generator problem and not a ksoap problem from 
what I can tell.

Original comment by mosa...@gmail.com on 5 Aug 2011 at 6:05