Home > Software engineering >  VB access webserver service problems
VB access webserver service problems

Time:10-04

Made a use of webserver interface to access the remote server program, the network connection is no problem, but after the query command input function is always an error, please help solve, thank you! The code is as follows:
Dim soapClient As New SoapClient30
Dim getData As String

SoapClient. ClientProperty (" ServerHTTPRequest ")=True
SoapClient. MSSoapInit "http://210.100.49.138/trffweb/services/TmriOutAccess? WSDL
"SoapClient. ConnectorProperty (" Timeout ")="9000"

Headstr="& lt; ? The XML version="+ CRH (34) & amp; "1.0" & amp; CRH (34) + "" +" encoding="+ CRH (34) & amp; "GBK" & amp; CRH (34) + "?>" + "& lt; Root>" + "& lt; QueryCondition>" + "& lt; Hp>" + "02" + "& lt;/hp>" + "& lt; Zl>" + "1234" + "& lt;/zl>" "& lt;/QueryCondition>" + "& lt;/root>"

GetData=https://bbs.csdn.net/topics/soapClient.ObjectOut (" 01 ", UTF8Encode (headstr))

When you perform to the following error: in the time of the last step
Linenumber WSDLReader: XML Parser failed at 0, linepasition 0,
Reason is: the specified resource download failed,
HRESULT=0 x1: function is not correct,
- WSDLReader: loading of the WSDL file failed
HRESULT=0 x80070057: parameter error,
- the Client: One of the paeameters supplied is invalid.
HRESULT=0 x80070057: parameter error

ObjectOut is a function of the other server specified
Isn't me the SOAP Toolkit 3.0 use errors, or statement is wrong, please help to give directions,

CodePudding user response:

Why their stitching XML, soap toolkits can automatically create the soap XML

CodePudding user response:

Why their stitching XML, soap toolkits can automatically create the soap XML

, please show the soap toolkit automatically create the soap XML, thank you!

CodePudding user response:

Headstr="& lt; ? The XML version="+ CRH (34) & amp; "1.0" & amp; CRH (34) + "" +" encoding="+ CRH (34) & amp; "GBK" & amp; CRH (34) + "?>" + "& lt; Root>" + "& lt; QueryCondition>" + "& lt; Hp>" + "02" + "& lt;/hp>" + "& lt; Zl>" + "1234" + "& lt;/zl>" + "& lt;/QueryCondition>" + "& lt;/root>"

The scarlet letter part of a +, suggest you print headstr look at first headstr content is correct

CodePudding user response:

In addition, the somebody else is clearly required GBK encoding of an XML document, you use UTF8Encode convert the XML to UTF8 format, do not know will not have influence,

CodePudding user response:

The other side of the interface rules must use Chinese UTF8Encode convert the XML to UTF8 format, this has no effect, the other side of the webserver written using Java, know of no other SoapClient30 usage, please directly, thank you!
  • Related