Link to home
Start Free TrialLog in
Avatar of RGuillermo
RGuillermoFlag for United States of America

asked on

Example on how to use Web Services to send a zip file

Hello Experts,
This is the first time I am going to use WEB SERVICES
I have to send one or more XML files inside a folder that is zipped.

and I have a URL address... a username and a password.

also got a Digital certificate and the public key is already uploaded and properly registered.

Can you send me a simple example source code in
visual basic or visual c# on how to do this?

Regards!
Avatar of kaufmed
kaufmed
Flag of United States of America image

That's not enough information for anyone to craft an example. The web service should have documentation that describes how to consume the service--even better, it should have examples of how to call the service. Not all web services are created equal, and not everyone designs their web services to a particular standard.
ASKER CERTIFIED SOLUTION
Avatar of Ashok
Ashok
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of RGuillermo

ASKER

AShok we are testing your example will come back on that.

käµfm³d 👽, this is the info you request, so if possible you can help us.

beta server to test: https://e-factura.sunat.gob.pe/ol-ti-itcpfegem/billService?wsdl

ZIP file name must be: 20100066603-01-F001-1.ZIP
inside XML file name must be: 20100066603-01-F001-1.XML

the site returns a small zip with xml inside stating if file was accepted or not.
If possible for you experts to test.
Regards,
this is the example I can provide
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ser="http://service.sunat.gob.pe" xmlns:wsse="http://docs.oasisopen.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<soapenv:Header>
<wsse:Security>
<wsse:UsernameToken>
<wsse:Username>20100066603MODDATOS</wsse:Username>
<wsse:Password>moddatos</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<ser:sendBill>
<fileName>20100066603-01-F001-1.zip</fileName>
<contentFile>cid:20100066603-01-F001-1.zip</contentFile>
</ser:sendBill>
</soapenv:Body>
</soapenv:Envelope>
Ashok,
Can you please send us the same example with complete code... like it is we cant make it work.
Regards,
Ashok, some libraries are missing I guess,
see attachment, please.
screen.jpg