Wrox Programmer Forums
|
.NET Web Services Discussions about .NET XML Web Service technologies including ASMX files, WSDL and SOAP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Web Services section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 9th, 2006, 04:52 AM
Registered User
 
Join Date: May 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default VB 6 and WSE 2.0

Hi Everyone
I need some help getting an attachment out of a SOAP request in VB6.

My code is :
Function UseSOAPClient(ByVal Method As String, _
                            Optional DocKey As String) As String

    Dim SoapClient As SoapClient30
    Dim Serializer As SoapSerializer30
    Dim Reader As SoapReader30
    Dim Parser As DimeParser30
    Dim ResultElm As IXMLDOMElement
    Dim FaultElm As IXMLDOMElement
    Dim Connector As SoapConnector30
    Dim strOutputXML As String

    Const SoapAction = "getFileNamed"
    Const END_POINT_URL = "http://axjcudft99:9081/DocRetrieval/services/GetDocService"
    Const LIST_NAMESPACE = "http://presentment.docucorp.ib.metlife.com"
    Const ENC = "http://schemas.xmlsoap.org/soap/encoding/"
    Const env = "http://schemas.xmlsoap.org/soap/envelope/"
    Const XSI = "http://www.w3.org/2001/XMLSchema-instance"
    Const XSD = "http://www.w3.org/2001/XMLSchema"

    Set Connector = New HttpConnector30
    Connector.Property("EndPointURL") = END_POINT_URL
    Connector.Connect

    ' binding/operation/soapoperation
    Connector.Property("SoapAction") = SoapAction
    Connector.BeginMessage

    Set Serializer = New SoapSerializer30
    With Serializer
        .Init Connector.InputStream

        .StartEnvelope , env
        .SoapNamespace "xsi", XSI
        .SoapNamespace "xsd", XSD
        .SoapNamespace "SOAP-ENC", ENC
        .StartBody
        .startElement SoapAction, LIST_NAMESPACE

            'begin writing XML for the request
            .startElement "getDocKey"
            .WriteString DocKey
            .endElement

        .endElement 'soapaction
        .EndBody
        .EndEnvelope

    End With

    Connector.EndMessage

    Set Reader = New SoapReader30
    Reader.LoadWithParser Connector.OutputStream, Parser 'the error is here.
    If Not Reader.Fault Is Nothing Then
        MsgBox Reader.FaultString.Text & vbCrLf & Reader.Fault.Text, vbExclamation
    Else
        Set ResultElm = Reader.Dom
    End If

    'Debug.Print Reader.RpcResult

End Function

The problem I'm having is on the line described. The error returned is "Invalid Procedure Call or Argument". Could someone shed some light on why this is?







Similar Threads
Thread Thread Starter Forum Replies Last Post
How to implement WSE 3.0 with code only nitinp .NET Web Services 0 October 24th, 2007 01:53 AM
DIME Attachments with WSE 2.0 ZAnglin .NET Web Services 1 August 5th, 2007 04:27 PM
WSE 2.0 sabansingh .NET Web Services 0 May 15th, 2006 02:19 AM
WSE 2.0 trouble sabansingh C# 0 February 21st, 2006 07:54 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.