Nope. i made no such assumption :) Please read the url carefully. note the package names.
-- dims On 5/11/06, Axel Bock <[EMAIL PROTECTED]> wrote:
Oh, sorry - I didn't mention. I guess you're assuming I'm using Axis 2. I'm not :) And my call does not have an addHeader() method, as much as I wish for it :)) Greetinsg & thanks, Axel. On 5/11/06, Davanum Srinivas <[EMAIL PROTECTED]> wrote: > use call's addHeader > (http://www-128.ibm.com/developerworks/xml/library/x-tipsoap.html) > > -- dims > > On 5/11/06, Axel Bock < [EMAIL PROTECTED]> wrote: > > 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 = " > > http://localhost/webservice/services/SessionManagement "; > > Service service = new Service(); > > Call call = (Call) service.createCall(); > > call.setTargetEndpointAddress(endpoint); > > call.setOperationName (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=" > > http://schemas.xmlsoap.org/soap/envelope/" > > xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi=" > > http://www.w3.org/2001/XMLSchema-instance"> > > <soapenv:Body> > > <ns1:openSession soapenv:encodingStyle=" > > http://schemas.xmlsoap.org/soap/encoding/ " > > xmlns:ns1="http://my.namespace.setting" /> > > </soapenv:Body> > > </soapenv:Envelope> > > > > ... but I need something like this (this is actually working): > > > > <SOAP-ENV:Envelope > > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" > > xmlns:SOAP-ENC=" http://schemas.xmlsoap.org/soap/encoding/" > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > > xmlns:xsd=" http://www.w3.org/2001/XMLSchema"> > > <SOAP-ENV:Header> > > <username>vdbvdb</username> > > <password>vdbvdbvdb</password> > > </SOAP-ENV:Header> > > <SOAP-ENV:Body> > > <m:openSession xmlns:m="http://my.namespace.setting" > > SOAP-ENV:encodingStyle=" http://schemas.xmlsoap.org/soap/encoding/ > > " /> > > </SOAP-ENV:Body> > > </SOAP-ENV:Envelope> > > > > > > > > can you maybe (pretty please :) help me out? > > > > > > Greetings & thanks in advance, > > Axel. > > > > > -- > Davanum Srinivas : http://wso2.com/blogs/ >
-- Davanum Srinivas : http://wso2.com/blogs/