Webservice consumer SOAP header

Hi all,

I am importing the WSDL for a .Net webservice into an 8.5.1 consumer.

However when running an agent which attempts to use the webservice I receive an error from .net which relates to the soap header not being set.

If I look through the WSDL file I can see various parts of it which look like they are using the header, and I can see the header element defined with the username and password items that I need to set. However, there doesn’t appear to be any way I can create or include or access this soap header.

I tried using the .SetCredentials(un, pw) method, but this is obviously not making any difference because the same error occurs.

Does anyone have any pointers?

Cheers,

Craig.

Subject: lotus.domino.websvc.client “extends to” lotus.domino.axis.message ?

Hi Craig, I have the same issue – it seems there is no way to get at this Stub class:

// Method descriptor #133 (Llotus/domino/axis/message/SOAPHeaderElement;)V

// Stack: 2, Locals: 2

void setHeader(lotus.domino.axis.message.SOAPHeaderElement arg0);

it is found in the Outline of the Eclipse Java perspective if you search it down (Shift-Ctrl-T).

This is like a typical block from my Web Service Consumer Import :

import lotus.domino.axis.message.*;

public java.lang.String myFavoriteImportedWSDLFunction(java.lang.String someString) throws java.rmi.RemoteException {

    lotus.domino.websvc.client.Call _call = createCall("myFavoriteImportedWSDLFunction");

    java.lang.Object _resp = _call.invoke(new java.lang.Object[] { someString});

    return (java.lang.String) _call.convert(_resp, java.lang.String.class);

}

All is well as long as I don’t care about headers.

So we came up with the idea of inserting the header change while it is available:

public java.lang.String myFavoriteImportedWSDLFunction (java.lang.String someString) throws java.rmi.RemoteException {

    lotus.domino.websvc.client.Call _call = createCall("myFavoriteImportedWSDLFunction ");

    try {

	SOAPHeaderElement pElement;	

	pElement= new SOAPHeaderElement("urn","someParentHeaderField");

	SOAPHeaderElement cElement; 			

	cElement= new SOAPHeaderElement("urn","someChildHeaderField ");	

	cElement.setValue(TheStringValueToBePlacedInHeader);

	pElement.addChild(cElement);

	_call.addHeader(pElement);

	}catch(Exception e){

		System.out.println("dumpTest");

	}

    java.lang.Object _resp = _call.invoke(new java.lang.Object[] {userName});

    return (java.lang.String) _call.convert(_resp, java.lang.String.class);

}

It seems there is no compatible class for modification of the header fields.

I hope I am just missing something and can get this figured out - there seems to be a lot of concern by others in this area.

Subject: SOAP Header missing credentials

We are having the same problem. When calling .SetCredentials(un,pass) the SOAP header does not have the credentials as it should. We have tried both Java and Lotuscript with no luck.

Has anyone managed to solve this problem? Either by getting the SOAP header directly and writing to it, or somehow setting the credentials in the header properly…

We desperately need to solve this problem as it is a major roadblock in our development.

Any help would be greatly appreciated!

Thanks in advance

Eli