INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

SOAP Error w/ Message Format

SOAP Error w/ Message Format

(OP)
Hello Folks!
Env: WIN 2003 Server, JScript, SOAP

I have having a problem with transmitting a SOAP message and I think that I am not passing the correct XML for a string array. I get back HTTP Err 500 - which is just an general error - usual cause is a badly formed SOAP message.

WSDL items:

CODE

The WSDL def for the select items array:
- <complexType name="CmSelectionCriteria">
- <sequence>
  <element name="MaxReturnedDevices" nillable="true" type="xsd:unsignedInt" />
  <element name="Class" nillable="true" type="xsd:string" />
  <element name="Model" nillable="true" type="xsd:unsignedInt" />
  <element name="Status" type="xsd:string" />
  <element name="NodeName" nillable="true" type="xsd:string" />
  <element name="SelectBy" type="xsd:string" />
  <element name="SelectItems" nillable="true" type="tns:SelectItems" />
  </sequence>
  </complexType>

- <complexType name="SelectItem">
- <sequence>
  <element name="Item" type="xsd:string" />
  </sequence>
  </complexType>
  
- <complexType name="SelectItems">
- <complexContent>
- <restriction base="soapenc:Array">
  <attribute ref="soapenc:arrayType" wsdl:arrayType="tns:SelectItem[]" />
  </restriction>
  </complexContent>
  </complexType>

My SOAP/XML message:

CODE

RIS SOAP Request=[
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope
 xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
 xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
 xmlns:tns="http://schemas.cisco.com/ast/soap/"
 xmlns:types="http://schemas.cisco.com/ast/soap/encodedTypes"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<tns:AstHeader>
 <SessionId xsi:type="xsd:string">613</SessionId>
</tns:AstHeader>
</soap:Header>
<soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
 <tns:SelectCmDevice>
 <StateInfo xsi:type="xsd:string"/>
 <tns:CmSelectionCriteria xsi:type="tns:CmSelectionCriteria">
 <MaxReturnedDevices xsi:type="xsd:unsignedInt">200</MaxReturnedDevices>
 <NodeName xsi:type="xsd:string"/>
 <SelectBy xsi:type="xsd:string">Name</SelectBy>
 <SelectItems soapenc:arrayType="tns:SelectItem[1]" xsi:type="soapenc:Array">
 <item xsi:type="tns:SelectItem">
     <Item xsi:type="xsd:string">SEP0017593F52C4</Item>
 </item>
 </SelectItems>
 </CmSelectionCriteria>
 </tns:SelectCmDevice>
</soap:Body>
</soap:Envelope>
] Len[1098] SEQ#[613]
OK - Completed building HTTP Header for URL[https://myserver:8443/realtimeservice/services/RisPort]

SOAPAction[http://schemas.cisco.com/ast/soap/action/#RisPort#SelectCmDevice]
Transmitting RIS Request to [https://myserver:8443/realtimeservice/services/RisPort] for UID[user1]
RIS Return HTTP Status=>500
A critical RIS HTTP Error has occurred. Status=[500]

What would be the correct way to send the array data with one entry?
Thanks!!
 

RE: SOAP Error w/ Message Format

The elements Class, Model and Status are nillable but not dispensable. I would say add them back as empty elements.

RE: SOAP Error w/ Message Format

(OP)
ok, Thanks for info.
I have done that but get the same results.
Keith

RE: SOAP Error w/ Message Format

[1] As Class and Model only are nillable (true), my previous note included Status too quick, when you add Status element, make sure use empty string rather than empty tag to play safe, in case you don't know what to put.
    <Status xsi:type="xsd:string"></Status>
Also I suppose you respect the "sequence" order of them all.

[2] I am not sure CmSelectionCriteria is defined in the namespace http://schemas.cisco.com/ast/soap/. It should be in null namespace as the rest of MaxReturnedDevice, ... etc. Hence, take out the prefix tns associated with it.

RE: SOAP Error w/ Message Format

(OP)
Resolved!!!
This:
</CmSelectionCriteria>
should have been this:
</tns:CmSelectionCriteria>

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close