Create WebServices with Word

F

Federico

Hi I want to create a Web Services where I receive a Template DOT word

a file XML and with these I create a Document that a I'll Send as Dime
Attachment.

<WebMethod()> _
Public Function CreateDimeWord(ByVal DotName As String, ByVal
sXML As String) As String
Dim respContext As SoapContext =
ResponseSoapContext.Current


Try
Dim wrdAPP As Object
Dim oWordDoc As Object
Dim strdocPath As String
Dim sr As System.IO.Stream
Dim i As Integer
Dim DocumentName As String
Dim sFileName As String


If respContext.Attachments.Count = 1 Then
sr = respContext.Attachments(0).Stream
DocumentName =
respContext.Attachments(0).Id.ToString.Split(":").GetValue(1).ToString


strdocPath = Application("UploadPath") +
DocumentName


Dim objfilestream = New
System.IO.FileStream(strdocPath, System.IO.FileMode.Create)
Dim buf(sr.Length) As Byte


While ((i =
respContext.Attachments(0).Stream.Read(buf, 0, buf.Length)) > 0)
objfilestream.Write(buf, 0, i)
End While
sFileName = "c:\temp\" & DotName & ".doc"


wrdAPP = CreateObject("Word.Application")
oWordDoc = wrdAPP.Documents.Open(strdocPath, ,
True)
oWordDoc.SaveAs(sFileName)


wrdAPP.Run("WordHelper.Run", sXML)
oWordDoc.Save()
oWordDoc.Close()
oWordDoc = Nothing


Dim dimeAttach As New
DimeAttachment("application/msword", TypeFormat.MediaType, sFileName)
respContext.Attachments.Add(dimeAttach)


Return "1"
Else
Return "0"
End If


Catch ex As FieldAccessException
Return ex.ToString


End Try


End Function


this is the client...in VB6


Private Sub Command1_Click()
On Error GoTo errcode
Dim SOAPReader As MSSOAPLib30.SoapReader30
Dim SOAPSerializer As MSSOAPLib30.SoapSerializer30
Dim SOAPConnector As MSSOAPLib30.SoapConnector30
Dim SOAPParser As DimeParser30
Dim SOAPRcvdAttachments As MSSOAPLib30.IReceivedAttachment
Dim SOAPComposer As DimeComposer30
Dim DownLoadFile As String
Dim SOAPFileAttachment As FileAttachment30
Dim sNomeAllegato As String
Dim allegato As String
Set SOAPConnector = New MSSOAPLib30.HttpConnector30
SOAPConnector.Property("EndPointURL") =
"http://ibcl14/GestioneModelliWS/GestModelli.asmx"
SOAPConnector.Connect


' Set Method Call


SOAPConnector.Property("SoapAction") =
"http://tempuri.org/GestioneModelliWS/GestModelli/CreateDimeWord"


allegato = "E:\COM.dot"
Set SOAPFileAttachment = CreateObject("MSSOAP.FileAttachment30")
SOAPFileAttachment.FileName = allegato
SOAPFileAttachment.DeleteAfterSending = False
'For j = 3 To Len(allegato)
' strTestChar = Mid(allegato, Len(allegato) - j, 1)
' If strTestChar = "\" Then
' sNomeAllegato = Right(allegato, j)
' Exit For
' End If
'Next


SOAPConnector.BeginMessage
' Create DIME composer and serializer objects, then initialize the
' serializer with the composer.
Set SOAPComposer = CreateObject("MSSOAP.DimeComposer30")
Set SOAPSerializer = CreateObject("MSSOAP.SoapSerializer30")
SOAPSerializer.InitWithComposer SOAPConnector.InputStream,
SOAPComposer
' Serializer.Init Connector.InputStream
' Write out the SOAP Envelope and Body start tags.
SOAPSerializer.StartEnvelope
SOAPSerializer.StartBody


' Start the method element.
SOAPSerializer.StartElement "CreateDimeWord",
"http://tempuri.org/"


SOAPSerializer.StartElement "DotName"
SOAPSerializer.WriteString "Prova"
SOAPSerializer.EndElement


SOAPSerializer.StartElement "sXML"
SOAPSerializer.WriteString
"LIBRANET><COMUNICAZIONI><RECORDS><RECORD><id_Comunicazione>62</id_Comunica­zione><id_Installazione>111111</id_Installazione><c_TipoDelibera>DG

</c_TipoDelibera></RECORD></RECORDS></COMUNICAZIONI></LIBRANET>"
SOAPSerializer.EndElement


SOAPSerializer.AddAttachment SOAPFileAttachment
SOAPSerializer.EndElement


' Write out the SOAP Envelope and Body end tags.
SOAPSerializer.EndBody
SOAPSerializer.EndEnvelope


' Tell the serializer that we are finished providing all message
' content (both the SOAP envelope and all attachments).
SOAPSerializer.Finished
SOAPConnector.EndMessage


''''SOAPConnector.BeginMessage
''''
''''Set SOAPComposer = CreateObject("MSSOAP.DimeComposer30")
''''Set SOAPSerializer = New MSSOAPLib30.SoapSerializer30
''''SOAPSerializer.InitWithComposer SOAPConnector.InputStream,
SOAPComposer
''''
''''' Create/Send SOAP Message with Parameter "Number"
''''
''''SOAPSerializer.StartEnvelope
'''' SOAPSerializer.StartBody
'''' SOAPSerializer.StartElement "DownloadFile",
"http://tempuri.org/"
'''' SOAPSerializer.StartElement "DocumentName"
'''' SOAPSerializer.WriteString sNomeAllegato
'''' SOAPSerializer.EndElement
''''' SOAPSerializer.StartElement "sXML"
''''' SOAPSerializer.WriteString "XX"
''''' SOAPSerializer.EndElement
'''' SOAPSerializer.AddAttachment SOAPFileAttachment
'''' SOAPSerializer.EndElement
'''' SOAPSerializer.EndBody
''''SOAPSerializer.EndEnvelope
''''
''''SOAPConnector.EndMessage


Set SOAPReader = New SoapReader30
SOAPReader.Load SOAPConnector.OutputStream
If Not SOAPReader.Fault Is Nothing Then
DownLoadFile = "0"
Else
DownLoadFile = "1"
End If
'Set SOAPReader = New SoapReader30
'Set SOAPParser = New DimeParser30
'If SOAPReader.LoadWithParser(SOAPConnector.OutputStream, SOAPParser)
Then
' Set SOAPRcvdAttachments = SOAPReader.Attachments.Item(0)
' SOAPRcvdAttachments.SaveToFile "C:\downloaded.doc"
' DownLoadFile = "OK"
'Else
' DownLoadFile = "no attachment"
'End If
'MsgBox DownLoadFile
Exit Sub


errcode:
MsgBox Err.Description
Unload Me
End Sub


The Web Services don't work
Why? Thanks a Lot
 
M

Marina Levit [MVP]

I see several problems with this post:

1. It has nothing to do with ADO, and so does not belong in this newsgroup
2. The problem is not clearly stated: what are you trying to do? What is
actually happening? 'Does not work' is meaningless
3. If there are any error messages - what are they? Otherwise, what is
happening and what do you expect to happen?

Is all the code posted relevent to the problem? It seems like a bit much. If
there is an exception, you should only post the code snippets where the
exception is thrown.

I recommend you start from scratch, write a clear post that tells people
what you are trying to do, how you are trying to do, and exactly what
happens vs what you expect to happen. Then post in a more appropriate
newsgroup.

Hi I want to create a Web Services where I receive a Template DOT word

a file XML and with these I create a Document that a I'll Send as Dime
Attachment.

<WebMethod()> _
Public Function CreateDimeWord(ByVal DotName As String, ByVal
sXML As String) As String
Dim respContext As SoapContext =
ResponseSoapContext.Current


Try
Dim wrdAPP As Object
Dim oWordDoc As Object
Dim strdocPath As String
Dim sr As System.IO.Stream
Dim i As Integer
Dim DocumentName As String
Dim sFileName As String


If respContext.Attachments.Count = 1 Then
sr = respContext.Attachments(0).Stream
DocumentName =
respContext.Attachments(0).Id.ToString.Split(":").GetValue(1).ToString


strdocPath = Application("UploadPath") +
DocumentName


Dim objfilestream = New
System.IO.FileStream(strdocPath, System.IO.FileMode.Create)
Dim buf(sr.Length) As Byte


While ((i =
respContext.Attachments(0).Stream.Read(buf, 0, buf.Length)) > 0)
objfilestream.Write(buf, 0, i)
End While
sFileName = "c:\temp\" & DotName & ".doc"


wrdAPP = CreateObject("Word.Application")
oWordDoc = wrdAPP.Documents.Open(strdocPath, ,
True)
oWordDoc.SaveAs(sFileName)


wrdAPP.Run("WordHelper.Run", sXML)
oWordDoc.Save()
oWordDoc.Close()
oWordDoc = Nothing


Dim dimeAttach As New
DimeAttachment("application/msword", TypeFormat.MediaType, sFileName)
respContext.Attachments.Add(dimeAttach)


Return "1"
Else
Return "0"
End If


Catch ex As FieldAccessException
Return ex.ToString


End Try


End Function


this is the client...in VB6


Private Sub Command1_Click()
On Error GoTo errcode
Dim SOAPReader As MSSOAPLib30.SoapReader30
Dim SOAPSerializer As MSSOAPLib30.SoapSerializer30
Dim SOAPConnector As MSSOAPLib30.SoapConnector30
Dim SOAPParser As DimeParser30
Dim SOAPRcvdAttachments As MSSOAPLib30.IReceivedAttachment
Dim SOAPComposer As DimeComposer30
Dim DownLoadFile As String
Dim SOAPFileAttachment As FileAttachment30
Dim sNomeAllegato As String
Dim allegato As String
Set SOAPConnector = New MSSOAPLib30.HttpConnector30
SOAPConnector.Property("EndPointURL") =
"http://ibcl14/GestioneModelliWS/GestModelli.asmx"
SOAPConnector.Connect


' Set Method Call


SOAPConnector.Property("SoapAction") =
"http://tempuri.org/GestioneModelliWS/GestModelli/CreateDimeWord"


allegato = "E:\COM.dot"
Set SOAPFileAttachment = CreateObject("MSSOAP.FileAttachment30")
SOAPFileAttachment.FileName = allegato
SOAPFileAttachment.DeleteAfterSending = False
'For j = 3 To Len(allegato)
' strTestChar = Mid(allegato, Len(allegato) - j, 1)
' If strTestChar = "\" Then
' sNomeAllegato = Right(allegato, j)
' Exit For
' End If
'Next


SOAPConnector.BeginMessage
' Create DIME composer and serializer objects, then initialize the
' serializer with the composer.
Set SOAPComposer = CreateObject("MSSOAP.DimeComposer30")
Set SOAPSerializer = CreateObject("MSSOAP.SoapSerializer30")
SOAPSerializer.InitWithComposer SOAPConnector.InputStream,
SOAPComposer
' Serializer.Init Connector.InputStream
' Write out the SOAP Envelope and Body start tags.
SOAPSerializer.StartEnvelope
SOAPSerializer.StartBody


' Start the method element.
SOAPSerializer.StartElement "CreateDimeWord",
"http://tempuri.org/"


SOAPSerializer.StartElement "DotName"
SOAPSerializer.WriteString "Prova"
SOAPSerializer.EndElement


SOAPSerializer.StartElement "sXML"
SOAPSerializer.WriteString
"LIBRANET><COMUNICAZIONI><RECORDS><RECORD><id_Comunicazione>62</id_Comunica­zione><id_Installazione>111111</id_Installazione><c_TipoDelibera>DG

</c_TipoDelibera></RECORD></RECORDS></COMUNICAZIONI></LIBRANET>"
SOAPSerializer.EndElement


SOAPSerializer.AddAttachment SOAPFileAttachment
SOAPSerializer.EndElement


' Write out the SOAP Envelope and Body end tags.
SOAPSerializer.EndBody
SOAPSerializer.EndEnvelope


' Tell the serializer that we are finished providing all message
' content (both the SOAP envelope and all attachments).
SOAPSerializer.Finished
SOAPConnector.EndMessage


''''SOAPConnector.BeginMessage
''''
''''Set SOAPComposer = CreateObject("MSSOAP.DimeComposer30")
''''Set SOAPSerializer = New MSSOAPLib30.SoapSerializer30
''''SOAPSerializer.InitWithComposer SOAPConnector.InputStream,
SOAPComposer
''''
''''' Create/Send SOAP Message with Parameter "Number"
''''
''''SOAPSerializer.StartEnvelope
'''' SOAPSerializer.StartBody
'''' SOAPSerializer.StartElement "DownloadFile",
"http://tempuri.org/"
'''' SOAPSerializer.StartElement "DocumentName"
'''' SOAPSerializer.WriteString sNomeAllegato
'''' SOAPSerializer.EndElement
''''' SOAPSerializer.StartElement "sXML"
''''' SOAPSerializer.WriteString "XX"
''''' SOAPSerializer.EndElement
'''' SOAPSerializer.AddAttachment SOAPFileAttachment
'''' SOAPSerializer.EndElement
'''' SOAPSerializer.EndBody
''''SOAPSerializer.EndEnvelope
''''
''''SOAPConnector.EndMessage


Set SOAPReader = New SoapReader30
SOAPReader.Load SOAPConnector.OutputStream
If Not SOAPReader.Fault Is Nothing Then
DownLoadFile = "0"
Else
DownLoadFile = "1"
End If
'Set SOAPReader = New SoapReader30
'Set SOAPParser = New DimeParser30
'If SOAPReader.LoadWithParser(SOAPConnector.OutputStream, SOAPParser)
Then
' Set SOAPRcvdAttachments = SOAPReader.Attachments.Item(0)
' SOAPRcvdAttachments.SaveToFile "C:\downloaded.doc"
' DownLoadFile = "OK"
'Else
' DownLoadFile = "no attachment"
'End If
'MsgBox DownLoadFile
Exit Sub


errcode:
MsgBox Err.Description
Unload Me
End Sub


The Web Services don't work
Why? Thanks a Lot
 
W

W.G. Ryan - MVP

Federico:

I don't know VB6 anymore so I can't help you with the client. But up to the
point where you do the attachment, are you attaching correctly? Is the
problem with the client or the server? I'll be home in a little while and
will try to replicate it from there.

Bill
Hi I want to create a Web Services where I receive a Template DOT word

a file XML and with these I create a Document that a I'll Send as Dime
Attachment.

<WebMethod()> _
Public Function CreateDimeWord(ByVal DotName As String, ByVal
sXML As String) As String
Dim respContext As SoapContext =
ResponseSoapContext.Current


Try
Dim wrdAPP As Object
Dim oWordDoc As Object
Dim strdocPath As String
Dim sr As System.IO.Stream
Dim i As Integer
Dim DocumentName As String
Dim sFileName As String


If respContext.Attachments.Count = 1 Then
sr = respContext.Attachments(0).Stream
DocumentName =
respContext.Attachments(0).Id.ToString.Split(":").GetValue(1).ToString


strdocPath = Application("UploadPath") +
DocumentName


Dim objfilestream = New
System.IO.FileStream(strdocPath, System.IO.FileMode.Create)
Dim buf(sr.Length) As Byte


While ((i =
respContext.Attachments(0).Stream.Read(buf, 0, buf.Length)) > 0)
objfilestream.Write(buf, 0, i)
End While
sFileName = "c:\temp\" & DotName & ".doc"


wrdAPP = CreateObject("Word.Application")
oWordDoc = wrdAPP.Documents.Open(strdocPath, ,
True)
oWordDoc.SaveAs(sFileName)


wrdAPP.Run("WordHelper.Run", sXML)
oWordDoc.Save()
oWordDoc.Close()
oWordDoc = Nothing


Dim dimeAttach As New
DimeAttachment("application/msword", TypeFormat.MediaType, sFileName)
respContext.Attachments.Add(dimeAttach)


Return "1"
Else
Return "0"
End If


Catch ex As FieldAccessException
Return ex.ToString


End Try


End Function


this is the client...in VB6


Private Sub Command1_Click()
On Error GoTo errcode
Dim SOAPReader As MSSOAPLib30.SoapReader30
Dim SOAPSerializer As MSSOAPLib30.SoapSerializer30
Dim SOAPConnector As MSSOAPLib30.SoapConnector30
Dim SOAPParser As DimeParser30
Dim SOAPRcvdAttachments As MSSOAPLib30.IReceivedAttachment
Dim SOAPComposer As DimeComposer30
Dim DownLoadFile As String
Dim SOAPFileAttachment As FileAttachment30
Dim sNomeAllegato As String
Dim allegato As String
Set SOAPConnector = New MSSOAPLib30.HttpConnector30
SOAPConnector.Property("EndPointURL") =
"http://ibcl14/GestioneModelliWS/GestModelli.asmx"
SOAPConnector.Connect


' Set Method Call


SOAPConnector.Property("SoapAction") =
"http://tempuri.org/GestioneModelliWS/GestModelli/CreateDimeWord"


allegato = "E:\COM.dot"
Set SOAPFileAttachment = CreateObject("MSSOAP.FileAttachment30")
SOAPFileAttachment.FileName = allegato
SOAPFileAttachment.DeleteAfterSending = False
'For j = 3 To Len(allegato)
' strTestChar = Mid(allegato, Len(allegato) - j, 1)
' If strTestChar = "\" Then
' sNomeAllegato = Right(allegato, j)
' Exit For
' End If
'Next


SOAPConnector.BeginMessage
' Create DIME composer and serializer objects, then initialize the
' serializer with the composer.
Set SOAPComposer = CreateObject("MSSOAP.DimeComposer30")
Set SOAPSerializer = CreateObject("MSSOAP.SoapSerializer30")
SOAPSerializer.InitWithComposer SOAPConnector.InputStream,
SOAPComposer
' Serializer.Init Connector.InputStream
' Write out the SOAP Envelope and Body start tags.
SOAPSerializer.StartEnvelope
SOAPSerializer.StartBody


' Start the method element.
SOAPSerializer.StartElement "CreateDimeWord",
"http://tempuri.org/"


SOAPSerializer.StartElement "DotName"
SOAPSerializer.WriteString "Prova"
SOAPSerializer.EndElement


SOAPSerializer.StartElement "sXML"
SOAPSerializer.WriteString
"LIBRANET><COMUNICAZIONI><RECORDS><RECORD><id_Comunicazione>62</id_Comunica­zione><id_Installazione>111111</id_Installazione><c_TipoDelibera>DG

</c_TipoDelibera></RECORD></RECORDS></COMUNICAZIONI></LIBRANET>"
SOAPSerializer.EndElement


SOAPSerializer.AddAttachment SOAPFileAttachment
SOAPSerializer.EndElement


' Write out the SOAP Envelope and Body end tags.
SOAPSerializer.EndBody
SOAPSerializer.EndEnvelope


' Tell the serializer that we are finished providing all message
' content (both the SOAP envelope and all attachments).
SOAPSerializer.Finished
SOAPConnector.EndMessage


''''SOAPConnector.BeginMessage
''''
''''Set SOAPComposer = CreateObject("MSSOAP.DimeComposer30")
''''Set SOAPSerializer = New MSSOAPLib30.SoapSerializer30
''''SOAPSerializer.InitWithComposer SOAPConnector.InputStream,
SOAPComposer
''''
''''' Create/Send SOAP Message with Parameter "Number"
''''
''''SOAPSerializer.StartEnvelope
'''' SOAPSerializer.StartBody
'''' SOAPSerializer.StartElement "DownloadFile",
"http://tempuri.org/"
'''' SOAPSerializer.StartElement "DocumentName"
'''' SOAPSerializer.WriteString sNomeAllegato
'''' SOAPSerializer.EndElement
''''' SOAPSerializer.StartElement "sXML"
''''' SOAPSerializer.WriteString "XX"
''''' SOAPSerializer.EndElement
'''' SOAPSerializer.AddAttachment SOAPFileAttachment
'''' SOAPSerializer.EndElement
'''' SOAPSerializer.EndBody
''''SOAPSerializer.EndEnvelope
''''
''''SOAPConnector.EndMessage


Set SOAPReader = New SoapReader30
SOAPReader.Load SOAPConnector.OutputStream
If Not SOAPReader.Fault Is Nothing Then
DownLoadFile = "0"
Else
DownLoadFile = "1"
End If
'Set SOAPReader = New SoapReader30
'Set SOAPParser = New DimeParser30
'If SOAPReader.LoadWithParser(SOAPConnector.OutputStream, SOAPParser)
Then
' Set SOAPRcvdAttachments = SOAPReader.Attachments.Item(0)
' SOAPRcvdAttachments.SaveToFile "C:\downloaded.doc"
' DownLoadFile = "OK"
'Else
' DownLoadFile = "no attachment"
'End If
'MsgBox DownLoadFile
Exit Sub


errcode:
MsgBox Err.Description
Unload Me
End Sub


The Web Services don't work
Why? Thanks a Lot
 
C

Cor Ligthert [MVP]

Federico,

What you transport with a webservice is not so important. I agree with
Marina that your question is very vague and clearing that up will help to
help you better.

In Net is the webservice build in and you don't need so much code.

Have a look at these walkthroughs, it does of course not matter what kind of
information you support with a webservice, if that is a simple "Hello World"
or a complete Word document.

This is what I have forever told in my opinion the best Walkthrough there is
on MSDN
http://msdn.microsoft.com/library/d...atingDistributedWebApplicationWalkthrough.asp

This one for 2005 has some improvements, but it contains as well an
impossibility.
http://msdn2.microsoft.com/en-us/library/1as0t7ff.aspx

I hope this helps,

Cor
 
W

W.G. Ryan - MVP

You and Marina both have a point that this is a pretty tricky question he's
asking about so the more detail the better. This isn't a standard web
service question though, he's using Web Service Enhancement (WSE) to
transport the documents as DIME attachments. I think this is pretty sound
methodology b/c WSE is a lot more efficient in many cases than sending stuff
over a standard web service.

I think you know Vb6 though don't you? I used to but haven't used it for so
long that I really can't help him on that part of it. The Server side piece
of the code where he's creating the DIME attachments all looks good, I think
the problem is in the client code (the VB6 stuff) but unfortunateluy, I
can't be of much help there.
 
F

Federico Mori

I made a test with xmlspy mine webserver

<WebMethod()> _
Public Function CreateDimeWord2(ByVal DotName As String, ByVal
sXML As String) As String
Dim respContext As SoapContext =
ResponseSoapContext.Current

Try
Dim wrdAPP As Object
Dim oWordDoc As Object
Dim strdocPath As String
Dim sr As System.IO.FileStream
Dim i As Integer
Dim DocumentName As String
Dim sFileName As String
Dim Path_Info As String


'If respContext.Attachments.Count = 1 Then
'sr = respContext.Attachments(0).Stream
'DocumentName =
respContext.Attachments(0).Id.ToString.Split(":").GetValue(1).ToString

Dim protocol As String
'If
System.Web.HttpContext.Current.Request.ServerVariables("protocol") = ""
Then
' protocol = "http://"
'Else
' protocol = "https://"
'End If
'Path_Info =
LCase(System.Web.HttpContext.Current.Request.ServerVariables("Path_Info"))
'Path_Info = Left(Path_Info, InStrRev(Path_Info, "/"))
'strdocPath = protocol +
LCase(System.Web.HttpContext.Current.Request.ServerVariables("SERVER_NAME"))
+ Path_Info + "Uploads/" + "Com.Dot"

strdocPath =
Me.Context.Request.ServerVariables("APPL_PHYSICAL_PATH") & "Uploads\" +
"Com.Dot"

sr = New System.IO.FileStream(strdocPath,
IO.FileMode.Open)
Dim objfilestream = New
System.IO.FileStream(strdocPath, System.IO.FileMode.Create)
Dim buf(sr.Length) As Byte

While ((i = respContext.Attachments(0).Stream.Read(buf,
0, buf.Length)) > 0)
objfilestream.Write(buf, 0, i)
End While
sFileName = "c:\temp\" & DotName & ".doc"

wrdAPP = CreateObject("Word.Application")
oWordDoc = wrdAPP.Documents.Open(strdocPath, , True)
oWordDoc.SaveAs(sFileName)

wrdAPP.Run("WordHelper.Run", sXML)
oWordDoc.Save()
oWordDoc.Close()
oWordDoc = Nothing

Dim dimeAttach As New
DimeAttachment("application/msword", TypeFormat.MediaType, sFileName)
respContext.Attachments.Add(dimeAttach)
Return "1"
'Else
'Return "0"
'End If


Catch ex As FieldAccessException
Return ex.ToString

End Try

End Function


<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<m:CreateDimeWord2
xmlns:m="http://tempuri.org/GestioneModelliWS/GestModelli">
<m:DotName>aa</m:DotName>
<m:sXML>test</m:sXML>
</m:CreateDimeWord2>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


......

this is the error

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<soap:Header>
<wsa:Action>http://schemas.xmlsoap.org/ws/2004/03/addressing/fault</wsa:Action>
<wsa:MessageID>uuid:f7a369b2-211e-4f54-a5c2-78dbb0158772</wsa:MessageID>
<wsa:To>http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous</wsa:To>
<wsse:Security>
<wsu:Timestamp
wsu:Id="Timestamp-d9db7c77-8f13-477e-9938-18e525e5ac56">
<wsu:Created>2006-03-17T10:26:04Z</wsu:Created>
<wsu:Expires>2006-03-17T10:31:04Z</wsu:Expires>
</wsu:Timestamp>
</wsse:Security>
</soap:Header>
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>System.Web.Services.Protocols.SoapException: Server was
unable to process request. ---&gt; System.IO.IOException: The process
cannot access the file
'c:\inetpub\wwwroot\GestioneModelliWS\Uploads\Com.Dot' because it is
being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String
maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess
access, Int32 rights, Boolean useRights, FileShare share, Int32
bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String
msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode)
at GestioneModelliWS.GestModelli.GestModelli.CreateDimeWord2(String
DotName, String sXML) in
c:\inetpub\wwwroot\GestioneModelliWS\GestModelli.asmx.vb:line 195
--- End of inner exception stack trace ---</faultstring>
<detail/>
</soap:Fault>
</soap:Body>
</soap:Envelope>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Create Web Services 1

Top