[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1013
  • Last Modified:

Strange problem with a soap request

here is the code:
function ConnectBySoap()
{
     SOAP.wireDump = "true";    
try     {    
var service = SOAP.connect("http://softwaretest/DocumentTrackingService/Service1.asmx?WSDL");
var DocumentID ={soapType: "xsd:string",soapValue:"Doc21"};
service.GetTrackingInfo(DocumentID);
        }    
catch(error)     {               }
}

Here is the debugger:
<?xml version="1.0" ?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><m:GetTrackingInfo xmlns:m="http://softwaretest/DocumentTrackingService" xmlns="http://softwaretest/DocumentTrackingService">Doc21</m:GetTrackingInfo></SOAP-ENV:Body></SOAP-ENV:Envelope>
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <soap:Body>...

the big thing is  xmlns="http://softwaretest/DocumentTrackingService">Doc21</m:GetTrackingInfo>
Doc21 should be (correct me if I am wrong) in side an <string></string> set.
0
jj819430
Asked:
jj819430
  • 4
  • 3
1 Solution
 
Karl Heinz KremerCommented:
You are right, there is something strange with your debugger output. I expect to see this:
<inputString xsi:type="xsd:string">Doc21</inputString>

Are you sure the GetTrackingInfo method takes a string as parameter?

0
 
jj819430Author Commented:
yes it does
[WebMethod]
public void GetTrackingInfo(string ID)
0
 
Karl Heinz KremerCommented:
Is it just the debugger output you are concerned with, or do you actually run into a problem?
0
Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

 
jj819430Author Commented:
I run into a serious problem. The value isn't passed to the web service.
It is connecting, and the function actually starts which is the strange part. But I need to get the value that is passed.
0
 
Karl Heinz KremerCommented:
I haven't done any serious work with Acrobat's SOAP implementation. So far everything I've tried did work... But I have to admit that this was limited to pretty simple "toy" programs.

Have you tried to pass in the string directly?
service.GetTrackingInfo("Doc21");


0
 
jj819430Author Commented:
Yes I have tried direct passing. Same thing happens.
0
 
jj819430Author Commented:
Ok so turns out I am a moron.
I just ended up adding the <inputString xsi:type="xsd:string">Doc21</inputString>
physically to the function call and it works.
I would think, and by all the sample code it seems that the code should do all of that.
Oh well,
Points are yours.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now