Anyone using a Java agent to consume a web service that requires authentication?

I am currently in the middle of a project that requires me to consume a .NET web service on an IIS server. I have successfully created VERY basic Java and LotusScript agents to consume VERY basic web services that do not require authentication. However, in this case, I must authenticate to the Web Service.

I am using a Java agent because I cannot import the WSDL into a LotusScript library – I receive an error when importing, saying the WSDL’s class names are too long. The developer of the web service has already exposed the WS to the public, so I can’t ask him to change the class names. (I am not adverse to using Java for this… just let it be known, I am not as well versed in Java as I am LotusScript!!)

My problem:

I am getting security errors. I believe I have verified that I am setting the username/pwd correctly using the following:

_call.setUsername(“xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”);

System.out.println(“Username:” + _call.getUsername());

_call.setPassword(“xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”);

System.out.println(“Pwd:” + _call.getPassword());

I have done a TON of searching on the web, and there is not much out there. It makes a person wonder if anyone has done this successfully… but they must have! I did view the “JMP207 - XML and Web Services Jumpstart” presentation from Lotusphere, which did indeed give me a jumpstart. :slight_smile: He shows how to pass credentials in this presentation too… but apparently I must still be missing something.

Is anyone doing this today that could give me a little direction? Below is the error I am receiving whether I run this scheduled or on my client:

WebServiceEngineFault

faultCode: {http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}InvalidSecurity

faultSubcode:

faultString: An error occurred when verifying security for the message.

faultActor:

faultNode:

faultDetail:

An error occurred when verifying security for the message.

at lotus.domino.axis.message.SOAPFaultBuilder.createFault(Unknown Source)

at lotus.domino.axis.message.SOAPFaultBuilder.endElement(Unknown Source)

at lotus.domino.axis.encoding.DeserializationContextImpl.endElement(Unknown Source)

at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)

at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)

at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)

at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)

at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)

at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)

at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)

at lotus.domino.axis.encoding.DeserializationContextImpl.parse(Unknown Source)

at lotus.domino.axis.SOAPPart.getAsSOAPEnvelope(Unknown Source)

at lotus.domino.axis.Message.getSOAPEnvelope(Unknown Source)

at lotus.domino.axis.client.Call.invokeEngine(Unknown Source)

at lotus.domino.axis.client.Call.invoke(Unknown Source)

at lotus.domino.axis.client.Call.invoke(Unknown Source)

at lotus.domino.axis.client.Call.invoke(Unknown Source)

at lotus.domino.axis.client.Call.invoke(Unknown Source)

at lotus.domino.websvc.client.Call.invoke(Unknown Source)

at org.tempuri.Soap11EndpointStub.testWebService(Soap11EndpointStub.java:15)

at JavaAgent.NotesMain(JavaAgent.java:17)

at lotus.domino.AgentBase.runNotes(Unknown Source)

at lotus.domino.NotesThread.run(Unknown Source)

Thanks!!!

Subject: _call.setUsername() & _call.setPassword()

  1. I used Domino 8.2 to generate java proxy to consume .net web service. works fine, but when I try to use these two methods (you apparently made it work), I received error saying symbol not found. Apparently these two methods are not in this class. How did you get it to work?

extends lotus.domino.websvc.client.Stub

  1. If these can be successfully set, are they for SOAP header authenticaion or for Integrated window authentication? I think it is for the former. Am I right?

Thanks