Sto cercando di utilizzare un servizio che demo url è come seguireNo WS-Security ha trovato
[https://demo.unicommerce.com/services/soap/uniware13.wsdl?facility=01] [ 1]
quando aggiungo questo servizio e cercare di utilizzare questo nel mio codice come seguire
using abc;
public partial class unicommerce : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
unicommerce u = new unicommerce();
UnicommerceClient us = new UnicommerceClient();
Customer c=new Customer();
PartyAddress pa=new PartyAddress();
pa.StateCode="25";
pa.Pincode="302017";
c.BillingAddress=pa;
PartyContact p=new PartyContact();
c.Contact=p;
c.CSTNumber="123";
c.CustomerCode="ABC";
c.Name="example";
c.PAN="CYKPS7842";
c.Website="http://mywebsite.in";
CreateCustomerRequest cr = new CreateCustomerRequest();
cr.Customer = c;
us.CreateCustomer(cr);
}
}
il suo errore di lancio
No WS-Security header found
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ServiceModel.FaultException: No WS-Security header found
[1]: https://demo.unicommerce.com/services/soap/uniware13.wsdl?facility=01
Ho chiesto alla persona che ha effettuato questo servizio per quanto riguarda questo, mi ha detto che questo servizio è stato creato in fretta con il codice java.
Finora ho idea che questo errore è legato al nome utente e password (autenticazione), ma non ottenere dove devo passare quelle credenziali.
ottenendo lo stesso errore durante il tentativo di fare integrazione Unicommerce. Hai capito il problema ???? –
è possibile passare le credenziali a us.ClientCredentials.UserName.username = "username"; us.ClientCredentials.UserName.Password = "password"; –