c# - How to send custom object to web service & Convert it to custom object -


i new webservice
have webservice. need send custom object(tbatch) object webservice & webservice need convert object custom object(tbatch).
how achieve getting following error.
there error genreating xml document.
please find following code:
web service

[webmethod] public string splitbatchobj(object batchobj, string scanstationid) {     string s = "test";     tbatch m_ctbatch = (tbatch)batchobj;     return s; } 


calling web service

public int callservice(tbatch obj) {      object objbat = (tbatch)obj;      //call service method;      string s = srv.splitbatchobj(objbat, "test string"); } 

your original assumption incorrect. don't have send tbatch instance object. following instead: define tbatch class in separate dll (class library). reference library in client , server projects. can change web service signature argument of type tbatch


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -