This week's book giveaway is in the Spring forum.
We're giving away four copies of Pro Spring MVC with WebFlux: Web Development in Spring Framework 5 and Spring Boot 2 and have Marten Deinum & Iuliana Cosmina on-line!
See this thread for details.
Win a copy of Pro Spring MVC with WebFlux: Web Development in Spring Framework 5 and Spring Boot 2 this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

Help need :

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 906
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic