Posted By:
mima_mima
Posted On:
Friday, October 22, 2004 12:22 PM
Hello! I have tried to figure it out how to use SOAP in combination with JAVA but I'm really really lost for the moment. (I have installed AXIS and Xerces) What I want to do is like I do in PHP I have an array with some values in PHP I just have to do like: $theParameters = array( //my parameters 'SessionId' => "$theSessionId", 'FirstName' => $_SESSION['FirstName'], 'LastName' => $_SESSION['LastName'], 'StreetAddress' => $_SESSION['StreetAddress'], 'ZipCode' => $_SESSION['ZipCode'], 'Town' => $_SESSION['Town'], 'Country' => $_SESSION["Country"],
More>>
Hello!
I have tried to figure it out how to use SOAP in combination with JAVA but I'm really really lost for the moment.
(I have installed AXIS and Xerces)
What I want to do is like I do in PHP I have an array with some values in PHP I just have to do like:
$theParameters = array( //my parameters
'SessionId' => "$theSessionId",
'FirstName' => $_SESSION['FirstName'],
'LastName' => $_SESSION['LastName'],
'StreetAddress' => $_SESSION['StreetAddress'],
'ZipCode' => $_SESSION['ZipCode'],
'Town' => $_SESSION['Town'],
'Country' => $_SESSION["Country"],
'CardType' => 0+$_SESSION['CardType'],
'CardNumber' => $_SESSION['**CardNumber'],
'CvcCode' => $_SESSION['**CVCcode'],
'ExpiryMonth' => $_SESSION['ExpiryMonth'],
'ExpiryYear' => $_SESSION['ExpiryYear'],
'Email' => $_SESSION['Email'],
'ClientIp' => $_SERVER["REMOTE_ADDR"],
'Description' => 'Kreditkortsköp',
'Cost' => $_SESSION["PayReadDebt"],
'Vat' => $Vat,
'Currency' => $_SESSION["Currency"],
'CustomerTransactionId' =>
$CustomerTransactionID,'Options' => "Test=$TestFlag;HttpAllowed=1"
);
$transid = $theSoapclient->call("SimpleCreditCardDebit", $theParameters); //makes the "soapcall"
I have been looking around, A LOT, on the webb but haven't found any good material.
I have tried to do like:
----------------------------------------------------------
SOAPMessage message = factory.createMessage();
SOAPPart soapPart = message.getSOAPPart();
SOAPEnvelope envelope = soapPart.getEnvelope();
SOAPHeader header = envelope.getHeader();
SOAPBody body = envelope.getBody();
SOAPConnectionFactory soapConnectionFactory =
SOAPConnectionFactory.newInstance();
SOAPConnection connection = soapConnectionFactory.createConnection();
connection.call(message,endpoint);
-----------------------------------------------------------
But I dont know how I can pass my parameters in a nice way?
I will be REALLY REALLY glad if anyone could help me to give me some hints how to achieve this.
Thanks in advance!
//MiMa
<<Less