Hi,
I am writing the following code in LS for invoking a web service. I am passing the End Point, Namespace, Method Name and Arguments to the web service. I need to convert this code to Java, and I am afraid I have no idea about Java whatsoever. Would appreciate if someone can help me with it.
Dim session As New NotesSession
Dim db As NotesDatabase
Dim document As NotesDocument
Dim myArgs(1) As Variant
Dim view As NotesView
Dim mycode As String
Dim fn1, fn, ln1, ln, mnumber1, mnumber As String
Dim cid As String
Dim index As Variant
Dim value1, value2 As Variant
Dim item As NotesItem
Set db=session.CurrentDatabase
Set document=session.DocumentContext
Set view=db.GetView("Names")
'-------------------------------------------------------
'Declaring the SOAPClient object by specifying the service Endpoint
'-------------------------------------------------------
Dim bn As New SOAPClient("http://capdev031:7001/internalws/customerprofilemanager/GetCustomerSummaryServiceV1")
'--------------------------------------------------------
'Setting the Argument values. Within the static argument tags, I am passing the value of the field CID
'--------------------------------------------------------
myArgs(0)= "<GetCustomerSummaryRequest xmlns='http://www.ba.com/schema/tGetCustomerSummaryV1'><MessageHeader xmlns=''><MessageCreationDate>2005-10-19</MessageCreationDate><MessageCreationTime>11:52:43</MessageCreationTime>"&_
"<OriginatingSystem>BA</OriginatingSystem><OriginatingUser>User9</OriginatingUser></MessageHeader><CAPHeader xmlns=''><SessionID>7657573242</SessionID></CAPHeader><CustomerID xmlns=''>"+document.CID(0)+"</CustomerID></GetCustomerSummaryRequest>"
myArgs(1)="<mCredentialsAndProperties xmlns='http://www.ba.com/schema/mCredentialsAndPropertiesV1'><Properties xmlns=''><ParameterName>Agent</ParameterName><ParameterValue>GlobalServiceRecoveryAgent</ParameterValue></Properties></mCredentialsAndProperties>"
'-------------------------------------------------------
'Invoking the web service call by passing the invoke Function to the service endpoint and Namespace, Method and arguments are passed as parameters to the function
'-------------------------------------------------------
mycode=bn.invoke("urn:http://www.ba.com/wsdl/GetCustomerSummaryServiceV1", "getCustomerSummary", myArgs)
'Msgbox(mycode)
fn1=Strleft(mycode,"</FirstName>")
fn=Strright(fn1,"<FirstName>")
ln1=Strleft(mycode,"</LastName>")
ln=Strright(ln1,"<LastName>")
mnumber1=Strleft(mycode,"</MembershipCardNumber>")
mnumber=Strright(mnumber1,"<MembershipCardNumber>")
document.FirstName=fn
document.LastName=ln
document.MembershipCardNumber=mnumber
Set item=document.AppendItemValue("Form","Get Name")
Call document.Save(False,True)
Call view.Refresh

