Click here to Skip to main content
15,897,187 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Need Help Pin
leckey27-Dec-07 4:51
leckey27-Dec-07 4:51 
GeneralRe: Need Help Pin
Benny_Lava27-Dec-07 22:45
Benny_Lava27-Dec-07 22:45 
GeneralRe: Need Help Pin
TomGarth28-Dec-07 8:53
TomGarth28-Dec-07 8:53 
GeneralLoading Resources in VB 6.0 Pin
anu_sam77726-Dec-07 20:01
anu_sam77726-Dec-07 20:01 
GeneralRe: Loading Resources in VB 6.0 Pin
Dave Kreskowiak27-Dec-07 12:41
mveDave Kreskowiak27-Dec-07 12:41 
QuestionUsing Crystal Control in VB.net As VB6 Pin
Meenge26-Dec-07 17:29
Meenge26-Dec-07 17:29 
GeneralRe: Using Crystal Control in VB.net As VB6 Pin
Paul Conrad30-Dec-07 10:44
professionalPaul Conrad30-Dec-07 10:44 
QuestionVB.net, Web Services and Soap Pin
Brit the Brut26-Dec-07 16:52
Brit the Brut26-Dec-07 16:52 
Hi there

I've started using web services in VB.net, and it works great; I'm actually not creating the web services themselves, rather calling them from my Windows Form application. I use the "add web reference" function, and everything works great for simple services which take parameters such as string, double, datetime etc. and return a string. I now need to use a bunch of services which take a "MAP" as parameter, which from what I understand is an array of string parameters. The MAP class has only two properties, Key and Item.

I haven't managed to input the parameters, cauz I don't know where to start. I've tried as follows

        Dim Map As New WebServices.WebServicePerformance1.Map<br />
<br />
        Map.item(0).value = ptfCode<br />
        Map.item(1).value = "VL_BASE100_DTD"<br />
        Map.item(2).value = "codeTypePart"<br />
        Map.item(3).value = "PTF_INDICES"<br />
        Map.item(4).value = "0"<br />
<br />
        Dim Res As String = Perf.calculReportMultiDevise(Map)<br />
<br />
        Return Res



I have a working sample in Excel VBA, which goes as follows:


Sub getValorisationPtf_bench(codeTypePart As String, ptfCode As String, typeindices As String, deviseCalcul As String, periodicite As String, startDate As String, endDate As String, colonneAffiche As String, startRowIndex As Integer, startColIndex As Integer)<br />
    <br />
    Dim Connector As SoapConnector<br />
    Dim Serializer As SoapSerializer<br />
    Dim Reader As SoapReader<br />
   <br />
 <br />
    Set Connector = New HttpConnector<br />
    Set Serializer = New SoapSerializer<br />
    Set Reader = New SoapReader<br />
' construction du message Soap<br />
    Connector.Property("EndPointURL") = URL<br />
'   Connector.Property("ConnectTimeout") = 120000<br />
    Connector.Property("Timeout") = 300000<br />
    Call Connector.Connect<br />
    Connector.Property("SoapAction") = URIPERF & "#" & "calculReportMultiDevise"<br />
    Call Connector.BeginMessage<br />
<br />
    Serializer.Init Connector.InputStream<br />
<br />
    Serializer.StartEnvelope , ENC<br />
    Serializer.SoapNamespace "xsi", XSI<br />
    Serializer.SoapNamespace "SOAP-ENC", ENC<br />
    Serializer.SoapNamespace "xsd", XSD<br />
<br />
 ' Construction des paramètres d''appel<br />
    Serializer.StartBody<br />
    Serializer.StartElement "calculReportMultiDevise", URIPERF, , "ns1"<br />
    Serializer.SoapAttribute "EncodingStyle", , "http://schemas.xmlsoap.org/soap/encoding/", "SOAP-ENV"<br />
    Serializer.StartElement "Code", "http://xml.apache.org/xml-soap", , "ns2"<br />
    Serializer.SoapAttribute "type", , "ns2:Map", "xsi"<br />
    addMessageEntry Serializer, "codeActif", ptfCode, "xsd:string"<br />
    addMessageEntry Serializer, "codereq", "VL_BASE100_DTD", "xsd:string"<br />
    addMessageEntry Serializer, "typepart", codeTypePart, "xsd:string"<br />
    addMessageEntry Serializer, "typecalcul", "PTF_INDICES", "xsd:string"<br />
    <br />
    Serializer.EndElement<br />
    <br />
    Serializer.StartElement "colonneAffiche"<br />
    Serializer.SoapAttribute "type", , "xsd:string", "xsi"<br />
    Serializer.WriteString colonneAffiche<br />
    Serializer.EndElement<br />
        <br />
    Serializer.EndElement<br />
    Serializer.EndBody<br />
    Serializer.EndEnvelope<br />
  <br />
    Connector.EndMessage<br />
<br />
   Reader.Load Connector.OutputStream<br />
<br />
    If Not Reader.Fault Is Nothing Then<br />
        MsgBox Reader.FaultString.text + " not reader ", vbExclamation<br />
    Else<br />
        'parseDom Reader.Dom, startRowIndex, startColIndex<br />
        displayValoPtfbench Reader.Dom.text, colonneAffiche, startRowIndex, startColIndex<br />
    End If<br />
<br />
    If Not Reader.Fault Is Nothing Then<br />
        MsgBox Reader.FaultString.text, vbExclamation<br />
    End If<br />
    <br />
End Sub


From my poor understanding it's serializing an XML file, but I do not know how to do that in .net. I'm pretty sure there is a simple way in .net than in VBA, without calling the connection, data reader etc., as I already have the proxy classes automatically generated.

Anybody capable of helping me get that up and running in .net??

Many Thanks in advance...

JM
GeneralRe: VB.net, Web Services and Soap Pin
Dave Kreskowiak27-Dec-07 12:38
mveDave Kreskowiak27-Dec-07 12:38 
Generalneed help selecting rows in a DataGridView Pin
Shimmy Weitzhandler26-Dec-07 15:42
Shimmy Weitzhandler26-Dec-07 15:42 
GeneralRe: need help selecting rows in a DataGridView Pin
helelark12326-Dec-07 19:27
helelark12326-Dec-07 19:27 
GeneralRe: need help selecting rows in a DataGridView Pin
Shimmy Weitzhandler29-Dec-07 7:49
Shimmy Weitzhandler29-Dec-07 7:49 
AnswerRe: need help selecting rows in a DataGridView [modified] Pin
Shimmy Weitzhandler30-Dec-07 13:53
Shimmy Weitzhandler30-Dec-07 13:53 
QuestionWriting to and reading from a text file Pin
Hedo26-Dec-07 15:12
Hedo26-Dec-07 15:12 
GeneralRe: Writing to and reading from a text file Pin
helelark12326-Dec-07 19:44
helelark12326-Dec-07 19:44 
GeneralRe: Writing to and reading from a text file Pin
Hedo27-Dec-07 16:55
Hedo27-Dec-07 16:55 
QuestionMouse Movement in VB 6.0 Pin
zawpai26-Dec-07 14:59
zawpai26-Dec-07 14:59 
GeneralRe: Mouse Movement in VB 6.0 Pin
Dave Kreskowiak27-Dec-07 12:27
mveDave Kreskowiak27-Dec-07 12:27 
Question[Message Deleted] Pin
ciconte26-Dec-07 14:28
ciconte26-Dec-07 14:28 
GeneralRe: Terms of use and e-mail subscription Pin
Dave Kreskowiak27-Dec-07 12:21
mveDave Kreskowiak27-Dec-07 12:21 
GeneralRe: [Message Deleted] Pin
Paul Conrad30-Dec-07 10:45
professionalPaul Conrad30-Dec-07 10:45 
GeneralExport Excel Sheet to Textfile (vb.net) Pin
Member 375080126-Dec-07 13:45
Member 375080126-Dec-07 13:45 
GeneralRe: Export Excel Sheet to Textfile (vb.net) Pin
Paul Conrad30-Dec-07 10:46
professionalPaul Conrad30-Dec-07 10:46 
QuestionRe: Export Excel Sheet to Textfile (vb.net) Pin
Member 37508012-Jan-08 7:08
Member 37508012-Jan-08 7:08 
GeneralBetter way of connecting to SQL 2005 Pin
svanwass26-Dec-07 13:31
svanwass26-Dec-07 13:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.