tags:

views:

669

answers:

2
+1  A: 

When you use addProperty this automatically adds it to the soap body, so thats wrong in your sample.

If you want to set up a username/password security header you have to build up the necessary Element[] and set it with as headerOut on your envelope.

SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.headerOut = security;
Manfred Moser
A: 

Isn't the fact that the webservice wants:

soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"     xmlns:xsd="http://www.w3.org/2001/XMLSchema"     xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt;

and it gets:

<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/"&gt;
    <v:Header />

Same at:

<checkBarcode xmlns="http://tempuri.org/"&gt;

AND

<checkBarcode xmlns="http://tempuri.org" id="o0" c:root="1">

Do you have any idea how to solve this? I have the same problem, with a webservice that sends an image, but what I get is a blank image, probably because of this....

Balazs Kelemen