Hi,
I am having BIG problems with a very, very, very simple Axis WS call.
Basically I am trying to get a String back from a web service, which has
only one method without parameters. I managed to generate stubs and call it,
but I would really like to call it without having to build stubs.
problem is, the web service requires (!) a username and a password in the
soap header (I can't do nothing about that). My code so far looks like this:
String endpoint = "";
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress(endpoint);
Name(new QName("http://my.namespace.setting",
"openSession"));
String ret = (String) call.invoke(null);
System.out.println("got: " + ret);
basically that is just fine, but I cannot get access to the soap header. the
XML generated is exactly this:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv=""
xmlns:xsd="" xmlns:xsi="
">
<soapenv:Body>
<ns1:openSession soapenv:encodingStyle="
" xmlns:ns1="
http://my.namespace.setting" />
</soapenv:Body>
</soapenv:Envelope>
but I need something like this (this is actually working):
<SAP-ENV:Envelope xmlns:SAP-ENV=""
xmlns:SAP-ENC="" xmlns:xsi="
" xmlns:xsd="
">
<SAP-ENV:Header>
<username>vdbvdb</username>
<password>vdbvdbvdb</password>
</SAP-ENV:Header>
<SAP-ENV:Body>
<m:openSession xmlns:m="http://my.namespace.setting"
SAP-ENV:encodingStyle="" />
</SAP-ENV:Body>
</SAP-ENV:Envelope>
can you maybe (pretty please :) help me out?
Greetings & thanks in advance,
Axel.