Hello, so im trying to send an metod that takes a class as input parameter with a bunch of variables.
I want to write in some textboxes in my php side of the program send them with my class and into a database.
but the database part is no problem i just need help sending the text from textboxes-->class-->thru Wcf -->c# program
*
Service1.cs
public class Service1 : IService1
{
public string KundGrunduppgifter(Variables.Kunder Kund)
{
//kund.customerNumber to database
//kund.customerDeliveryAdress to database
//and etc etc...
//check is input is wrong
//write errortext
return errortext;
}
}
*
*
*
*
IService1.cs
[ServiceContract]
public interface IService1
{
[OperationContract]
string KundGrunduppgifter(Variables.Kunder Kund);
}
[DataContract]
public class Variables
{
public class Kunder
{
[DataMember]
//Kund Grunduppgifter variablar
public string KundNummer, KundOrgNummer, KundNamn, PostAdr,
PostAdr2, GLN, BesokAdr, Postnr, Ort, LandKod, Land, VATnr,
Telefon, Telefon2,
public string Epost, Kundkat, Distrikt, Saljare, notes;
public int cbKundSms, cbKundEpost;
//Kund Fler Uppgifter variablar
public string FuBetalningsVillk, FuLeveransVillk,
FuLeveransSatt, FuSpeditor, FuSprak, FuValuta, FuResenh, FuProjekt,
public double FuFakturaRab, FuRadRab, FuKreditGrans;
public int FuCb1Export, FuCb2EUkundMedVATnr, FuCb3Rantefakturering,
FuCb4Kravbrev, FuCb5KravAvgift, FuCb6RestnoteraEj,
FuCb7ExpeditionsAvgift, FuCb8Frakt, FuCb9Samlingsfakturering,
FuCb10overforAdressTillBestallning;
}
}
so my questions
1. Can i access my class directly or do i need to make an equal class with all the variables in php?
2. how do you make textboxes? in php/html
*
*
*
<html>
<head>
<title>My First PHP Page</title>
</head>
<body>
<?php
$client = new SoapClient("http://localhost:8731/phpwcf/?wsdl");
class Customer
{
$CustomerNumber = textbox1.text
$CustomerPhone = textbox2.text
$CustomerName = textbox3.text
$CustomerAdress = textbox4.text
}
$client->KundGrunduppgifter(Customer);
?>
</body>
</html>
my php code so far (Dont laugh! xD)