• Post Reply Bookmark Topic Watch Topic
  • New Topic

Help need :

 
Angel Leka
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am calling a web service through my VB programme.
My calling VB programme looks like this :
Dim objSOAPClient As New SoapClient30
Dim value As String
Dim objXMLDocReply As New MSXML2.DOMDocument
Dim xmlDataList As MSXML2.IXMLDOMNodeList
Dim xmlDataNode As MSXML2.IXMLDOMNode
objSOAPClient.MSSoapInit "http://machine:8080/Mywebservicepath/MyWebServiceName.wsdl"
objSOAPClient.ConnectorProperty("Timeout") = 600000
objSOAPClient.ClientProperty("ServerHTTPRequest") = True
objXMLDocReply.LoadXml ("<?xml version=""1.0"" encoding=""UTF-8"" ?><Correspondence>" & _
"<CompanyCode>00</CompanyCode>" & _
"<PolicyNumber>D000001121</PolicyNumber>" & _
"<Plan>10T</Plan>" & _
"<DocPrintVariables><Image>" & _
"<Name>IS NQ TRANSFER LETTER</Name>" & _
"<Fields>" & _
"<Name>FirstName_PINS</Name>" & _
"<Name>POLN_LOB</Name>" & _
"<Name>Weight_PINS</Name>" & _
"</Fields></Image></DocPrintVariables></Correspondence>")
value = objSOAPClient.GetData("<?xml version=""1.0"" encoding=""UTF-8"" ?><Correspondence>" & _
"<CompanyCode>00</CompanyCode>" & _
"<PolicyNumber>D000001121</PolicyNumber>" & _
"<Plan>10T</Plan>" & _
"<DocPrintVariables><Image>" & _
"<Name>IS NQ TRANSFER LETTER</Name>" & _
"<Fields>" & _
"<Name>FirstName_PINS</Name>" & _
"<Name>POLN_LOB</Name>" & _
"<Name>Weight_PINS</Name>" & _
"</Fields></Image></DocPrintVariables></Correspondence>")
and the error I am getting is:
Run-time error '-2147467259 (80004005)':
parsing error: org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed
Any body having any idea whats going wrong?
Thanks in advance
[ October 03, 2003: Message edited by: Angel Leka ]
 
JeanLouis Marechaux
Ranch Hand
Posts: 906
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Angel,
First of all, don't forget that in JavaRanch, there's Java
It means this website is not really dedicated (and thus specialized) to VB code.
I'll try some help however.
I think this kind of error could be due to XML structure problems.
So maybe the XML your sending is not well-formed ??
 
Angel Leka
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.
But the error is in java code, not in VB code and my XML is also fine.
Here is the detailed scenario:
My VB client code is using MS soaptoolkit 3.0 and server side its Java code, deployed on Websphere using Apache Soap Toolkit.
I have checked that the wsdl file I am referring to is probably wrong, i.e. the <service name="Stock">
</service>
element is not proper, because a prefix "tns:" is missing in <port> element which should be there.
So can this be a reason for SAXParserException?
I am not sure about this. Can you tell me when I send the request to server, does the server also checks/validates the incoming XML against the wsdl file? And can it give SaxParserException if an "tns:" element is missing?
As I feel wsdl file is only to show external world about the services you are providing and how to call them.So in case if wsdl is a "tns:" prefix in one element it shouldn't make that much of a difference.
And incase, I need to correct the wsdl file, Can you tell me how to correct it? Do I need to simply change the file and re-start the server? or is there any oter process of registering in UBR (as I read wsdl's are registered in some registry called UBR). It will be of great help if you can tell me any link where I can see how to correct wsdl file and reload it.
Step by step.
Thanks
[ October 05, 2003: Message edited by: Angel Leka ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!