0
votes

I need to connect to a .net application via it's SOAP Web Service but can't get it working from Domino. Using XPages I want to connect to the web service to return data to the xpage. I tried creating an agent to make the call, but that hasn't worked. I receive the following java StackTrace when I run the agent:

WebServiceEngineFault
 faultCode: {http://www.lotus.com/domino/ws/}HTTP
 faultSubcode:
 faultString: (401) Unauthorized
 faultActor:
 faultNode:
 faultDetail:
        {}string:

(401) Unauthorized
        at lotus.domino.axis.transport.http.HTTPSender.readFromSocket(Unknown Source)
        at lotus.domino.axis.transport.http.HTTPSender.invoke(Unknown Source)
        at lotus.domino.axis.strategies.InvocationStrategy.visit(Unknown Source)
        at lotus.domino.axis.SimpleChain.doVisiting(Unknown Source)
        at lotus.domino.axis.SimpleChain.invoke(Unknown Source)
        at lotus.domino.axis.client.AxisClient.invoke(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 com.imanage.worksite.IWOVServicesSoapStub.getFolders(Unknown Source)
        at JavaAgent.NotesMain(Unknown Source)
        at lotus.domino.AgentBase.runNotes(Unknown Source)
        at lotus.domino.NotesThread.run(Unknown Source)

I am able to call it successfully from soapUI passing in the user id, password and domain credentials.

I set credentials in the agent that consumes the web service:

                            String arg0 = "DOMAINNAME\\USERID";
                            String arg1 = "PASSWORD";
                            stub.setCredentials(arg0, arg1);

and also in the web service consumer itself (in the SoapStub class - within the getFolders call):

                    _call.setUsername("DOMAINNAME\\USERID");
                    _call.setPassword("PASSWORD");

I'm new to XPages and Java. Does anyone have any ideas what I might be missing or should check for?

(I can't use Lotusscript for the web service consumer as the variable names generated by the WSDL are too long, so I have to use java in this case).

2

2 Answers

0
votes

In these situations to help narrow down it is better to let SOAPUI do the full testing.

So do the following.

  1. Create a mock service in SOAPUI from the WSDL of the provider.

  2. Point your agent to the mock service so that you can capture what is being sent from your agent. (ie. Capture the SOAP request).

  3. Using that same SOAP request send it via SOAPUI to the .NET server. It should reproduce the issue and give you back some more information as to what is failing.

The following wiki article explains how to do this.

http://www-10.lotus.com/ldd/ddwiki.nsf/dx/Testing_your_Domino_web_service_provider_and_consumer_using_SoapUI._

0
votes

I would use CXF, it seems better supported in XPages. What authentication are you using? I found that a digest authentication might not work with some services in .net (Sharepoint data being one) and you need to call another end-point to get a digest token. I use TCPMon (Cross platform) or Fiddler to see what is on the wire (You configure these tools as proxy, so you can watch) AD107 might have additional information, have a look.