need help with first soap attempt

Bill Bolte <[email protected]> Thu, 27 Feb 2003 09:04:00 -0800
Newsgroups gmane.comp.windows.devel.soap.general
Message-ID <SOAP%[email protected]>
i'm trying to build my first non-tutorial service that calls an active x
exe. the active x works fine with vb and asp. i've done the tutorials and
scoured the web but i'm getting hung up. i ran the wsdl generator on it and
everything seemed fine. here is the error that i'm getting:

"WSDLReader:The operation requested in the Soap message with soapAction
http://tempuri.org/sartpreviewws/action/CreatePreview.CreateGraphics isn't
defined in the WSDL file. This may be because it is in the wrong namespace
or has incorrect case"

now, i've tried a couple of different things to get past this error. here is
my vb code (this is just a test client to make sure i get things to work
before i go to asp with it).
===========================================================
Option Explicit

Dim previewimage As String, imagepath As String
Dim CatID As String, itemno As String, Style As String
Dim colordesc As String, Text1 As String, Text2 As String
Private Const SoapAction =
"http://tempuri.org/sartpreviewws/action/CreatePreview."
Private Const END_POINT_URL =
"http://bolteb/sartpreviewws/SARTPreviewServer/SartPreview.asp"
Private Const CREATE_GRAPHIC =
"http://tempuri.org/SARTPreviewServer/message/"

Private Sub cmdBuild_Click()
CatID = txtCatID.Text
itemno = txtItemNo.Text
Style = txtStyle.Text
colordesc = txtColors.Text
Text1 = txt1.Text
Text2 = txt2.Text

MsgBox GetImage("CreateGraphics", CatID, itemno, Style, colordesc, Text1,
Text2)

End Sub

Private Function GetImage(ByVal Method As String, ByVal CatalogID As String,
ByVal ItemNum As String, _
ByVal TheStyle As String, ByVal ColorDes As String, ByVal TheText1 As
String, ByVal TheText2 As String)

Dim Serializer As SoapSerializer30
Dim Reader As SoapReader30
Dim ResultElm As IXMLDOMElement
Dim FaultElm As IXMLDOMElement
Dim Connector As SoapConnector30

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

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

Set Serializer = New SoapSerializer30
Serializer.Init Connector.InputStream

Serializer.StartEnvelope
Serializer.StartBody
Serializer.StartElement Method, CREATE_GRAPHIC
Serializer.StartElement "strCatID"
Serializer.WriteString CatalogID
Serializer.EndElement
Serializer.StartElement "strItemNo"
Serializer.WriteString ItemNum
Serializer.EndElement
Serializer.StartElement "strStyle"
Serializer.WriteString TheStyle
Serializer.EndElement
Serializer.StartElement "strColorDesc"
Serializer.WriteString ColorDes
Serializer.EndElement
Serializer.StartElement "strText1"
Serializer.WriteString TheText1
Serializer.EndElement
Serializer.StartElement "strText2"
Serializer.WriteString TheText2
Serializer.EndElement
Serializer.EndElement
Serializer.EndBody
Serializer.EndEnvelope

Connector.EndMessage

Set Reader = New SoapReader30
Reader.Load Connector.OutputStream

If Not Reader.Fault Is Nothing Then
MsgBox Reader.FaultString.Text, vbExclamation
Else
GetImage = Reader.RpcResult.Text
End If
End Function
===========================================================
here is the wsdl file:
===========================================================
<?xml version='1.0' encoding='UTF-8' ?>
<!-- Generated 02/19/03 by Microsoft SOAP Toolkit WSDL File
Generator, Version 3.00.1325.0 -->
<definitions
name='sartpreview'
targetNamespace='http://tempuri.org/sartpreview/wsdl/'
xmlns:wsdlns='http://tempuri.org/sartpreview/wsdl/'
xmlns:typens='http://tempuri.org/sartpreview/type/'
xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'
xmlns:stk='http://schemas.microsoft.com/soap-toolkit/wsdl-extension'
xmlns:dime='http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/'
xmlns:ref='http://schemas.xmlsoap.org/ws/2002/04/reference/'
xmlns:content='http://schemas.xmlsoap.org/ws/2002/04/content-type/'
xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
xmlns='http://schemas.xmlsoap.org/wsdl/'>

<types>
<schema
targetNamespace='http://tempuri.org/sartpreview/type/'
xmlns='http://www.w3.org/2001/XMLSchema'
xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/'
xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'
elementFormDefault='qualified'>

<import namespace='http://schemas.xmlsoap.org/soap/encoding/'/>
<import namespace='http://schemas.xmlsoap.org/wsdl/'/>
<import namespace='http://schemas.xmlsoap.org/ws/2002/04/reference/'/>
<import namespace='http://schemas.xmlsoap.org/ws/2002/04/content-type/'/>

</schema>
</types>

<message name='CreatePreview.CreateGraphics'>
<part name='strCatID' type='xsd:anyType'/>
<part name='strItemNo' type='xsd:anyType'/>
<part name='strStyle' type='xsd:anyType'/>
<part name='strColorDesc' type='xsd:anyType'/>
<part name='strText1' type='xsd:anyType'/>
<part name='strText2' type='xsd:anyType'/>
</message>

<message name='CreatePreview.CreateGraphicsResponse'>
<part name='Result' type='xsd:anyType'/>
<part name='strCatID' type='xsd:anyType'/>
<part name='strItemNo' type='xsd:anyType'/>
<part name='strStyle' type='xsd:anyType'/>
<part name='strColorDesc' type='xsd:anyType'/>
<part name='strText1' type='xsd:anyType'/>
<part name='strText2' type='xsd:anyType'/>
</message>

<message name='CreatePreview.tmpID'>
</message>

<message name='CreatePreview.tmpIDResponse'>
<part name='Result' type='xsd:string'/>
</message>

<portType name='CreatePreviewSoapPort'>

<operation name='CreateGraphics'
parameterOrder='strCatID strItemNo strStyle strColorDesc strText1 strText2'>
<input message='wsdlns:CreatePreview.CreateGraphics'/>
<output message='wsdlns:CreatePreview.CreateGraphicsResponse'/>
</operation>

<operation name='tmpID' parameterOrder=''>
<input message='wsdlns:CreatePreview.tmpID'/>
<output message='wsdlns:CreatePreview.tmpIDResponse'/>
</operation>

</portType>

<binding name='CreatePreviewSoapBinding' type='wsdlns:CreatePreviewSoapPort'
>

<stk:binding preferredEncoding='UTF-8'/>
<soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>

<operation name='CreateGraphics'>
<soap:operation
soapAction='http://tempuri.org/sartpreview/action/CreatePreview.CreateGraphi
cs'/>
<input>
<soap:body
use='encoded'
namespace='http://tempuri.org/sartpreview/message/'
encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'
parts='strCatID strItemNo strStyle strColorDesc strText1 strText2'/>
</input>
<output>
<soap:body
use='encoded'

namespace='http://tempuri.org/sartpreview/message/'

encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'
parts='Result strCatID strItemNo strStyle strColorDesc strText1 strText2'/>
</output>
</operation>

<operation name='tmpID'>
<soap:operation
soapAction='http://tempuri.org/sartpreview/action/CreatePreview.tmpID'/>
<input>
<soap:body
use='encoded'

namespace='http://tempuri.org/sartpreview/message/'

encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/>
</input>
<output>
<soap:body
use='encoded'

namespace='http://tempuri.org/sartpreview/message/'

encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'
parts='Result'/>
</output>
</operation>

</binding>

<service name='sartpreview' >
<port name='CreatePreviewSoapPort'
binding='wsdlns:CreatePreviewSoapBinding' >
<soap:address
location='http://bolteb/sartpreviewws/sartpreviewserver/sartpreview.ASP'/>
</port>
</service>

</definitions>
===========================================================

can anyone steer me in the right direction or give me a clue what is
going on?

You can read messages from the SOAP archive, unsubscribe from SOAP, or subscribe to other
DevelopMentor lists at http://discuss.develop.com.