Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Can't send binary data as a parameter

0 views
Skip to first unread message

James F

unread,
Jul 18, 2001, 4:53:37 PM7/18/01
to
I am trying to place a soap call to a function that takes an array of bytes
as a parameter, but I keep getting this error message:

Client:Sending the Soap message failed or no recognizable response was
received HRESULT=0x800A13BA - Client:Connector - Bad request to the server.
HRESULT=0x800A13BA

If I remove the parameter from the function, it works fine.

Here is the function definition in the soap server:
Public Function AddImage(ByVal DBName As String, ByVal PatientID As Long,
ByVal time As Date, _
ByVal Comments As String, ByVal valuestring As String, ByVal
DeviceID As Long, ByRef Image() As Byte) As String

Here is the section of the WSDL file which defines the message for that
function:
<message name='clsTestImage.AddImage'>
<part name='DBName' type='xsd:string'/>
<part name='PatientID' type='xsd:int'/>
<part name='time' type='xsd:dateTime'/>
<part name='Comments' type='xsd:string'/>
<part name='valuestring' type='xsd:string'/>
<part name='DeviceID' type='xsd:int'/>
<part name='Image' type='xsd:base64Binary'/>
</message>
<message name='clsTestImage.AddImageResponse'>
<part name='Result' type='xsd:string'/>
<part name='Image' type='xsd:base64Binary'/>
</message>

Roger Wolter

unread,
Jul 18, 2001, 8:25:06 PM7/18/01
to
My guess would be the binary data is big enough that the message size
exceeds the setting for the maximum ISAPI message size in the registry. By
default this is set to 100K.

"James F" <jwfa...@cyber-care.dontspam.net> wrote in message
news:ufWYK88DBHA.496@tkmsftngp05...

Brian

unread,
Jul 19, 2001, 9:07:09 AM7/19/01
to
I found that the maximum amount of bytes a parameter can
take is 70,000. I had to send the data over in chunks of
70,000. I think it was actually 72,000 but I rounded down
to keep it simple.

Perhaps you may be able to help me with my issue? See the
issue "multiple method calls" just below this one. This
is actually where I am having a problem. I am trying to
pass the initial array size to the server (first call),
then loop through the array of bites and send chunks of
70,000 to the server to store in a byte array (which was
redimensioned in the first call).

Brian

Roger Wolter

unread,
Jul 19, 2001, 6:51:40 PM7/19/01
to
Wow, that's a lot of work to get around a registry setting. Look at the
MaxPost Size setting in this excerpt from the documentation:.

When specifying the ISAPI handler, you can use the registry key,
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSOAP\SOAPISAP, to change the default
values of the following three configuration variables:

a.. MaxPostSize - the maximum size of the SOAP message that you can POST
to the ISAPI handler. While this setting help you to keep hackers from tying
up your service by posting extremely large messages, you may need to
increase the default size (100 KB) if your service accepts large SOAP
messages.
b.. NumThreads - 2*CPU + 1 is the default value. In most cases, the
default value provides the best performance. You may try increasing this
number if you are getting a lot of messages queued for your service.
c.. ObjCachedPerThread - 5 is the default value. On the first call, the
ISAPI listener loads the WSDL and WSML files, and keeps them cached for
performance. Generally, this should be the number of WSDL files you have on
your server.
Configuring ISAPI Listener
When the ISAPI is installed, it registers itself to handle WSDL files.
SoapToolkit 2.0 installation does this by creating an App Mapping to
associate the .WSDL extension with soapisap.dll at the machine (server)
level. If the App Mappings have changed at a lower node than the machine
level (such as at the Web Site or Virtual Directory level) prior to Soap
Toolkit 2.0 installation, then the newly added .WSDL mapping will not be
inherited from the machine level settings. In this case you can manually
enter the App Mappings at the lower level node using the IIS MMC Admin tool.

For example, these are the steps to manually add the App Mappings for the
Default Web Site on IIS 5.0 using the IIS MMC Admin tool:

1.. Select the Home Directory tab under the properties for the Default Web
Site.
2.. On the Home Directory tab click the Configuration button and select
the App Mappings tab.
3.. If the .wsdl extension does not exist, then add a new extension entry
for .wsdl by clicking the Add button.
4.. Enter the path to soapisap.dll. Note that because of a bug in the UI
of the IIS Admin tool a pathname with spaces cannot be added. To workaround
this problem enter the short-file pathname to the soapisap.dll (for example,
C:\PROGRA~\COMMON~1\MSSOAP\BINARIES\SOAPISAP.DLL). Enter .wsdl in the
Extension text box. For Verbs select Limit to and add GET,POST,HEAD.
Finally, Script Engine should be checked and Check that files exist should
be unchecked. Click OK to enter the new entry.
Note Although, the above steps will add the App Mappings at the Default
Web Site level, the same procedure can be followed at a lower level such as
the Virtual Directory level.


"Brian" <brianpmc...@aol.com> wrote in message
news:514f01c11053$b7912fc0$a4e62ecf@tkmsftngxa06...

0 new messages