Highlighted
Absent Member.
Absent Member.
667 views

getCIsById SOAP

Jump to solution

I am trying to use SOAP (via Postman) to getCIsById

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:upd="http://schemas.hp.com/ucmdb/1/params/update" xmlns:types="http://schemas.hp.com/ucmdb/1/types" xmlns:queryparams="http://schemas.hp.com/ucmdb/1/params/query" xmlns:upd1="http://schemas.hp.com/ucmdb/1/types/update">
<soap:Header/>
<soap:Body>
<queryparams:getCIsById>
<types:cmdbContext>
<types:callerApplication>Test</types:callerApplication>
</types:cmdbContext>

<types:IDs>
<types:ID temp="false">442e1e5f48186991bf04cd7bfd4990be</types:ID>
</types:IDs>

</queryparams:getCIsById>

</soap:Body>
</soap:Envelope>

 

The response indicates I have the wrong namespace for the cmdbContext element:

<faultstring>Expected "{http://schemas.hp.com/ucmdb/1/params/query}cmdbContext" start tag, found "{http://schemas.hp.com/ucmdb/1/types}cmdbContext" start tag (line -1, col -1, in SOAP-message)</faultstring>
<detail/>

 

But the schema seems to indicate I should use types:

http://cmshelpcenter.saas.hp.com/CMS/10.31/ucmdb-docs/docs/eng/APIs/CMDB_Schema/QueryServic-getCIsBy045f.html

Any ideas?

 

 

 

0 Likes
1 Solution

Accepted Solutions
Highlighted
Absent Member.
Absent Member.

Re: getCIsById SOAP

Jump to solution

To answer my  own question,  it is because the target namespace is different:

<xs:schema ...  elementFormDefault="qualified" targetNamespace="http://schemas.hp.com/ucmdb/1/params/query">
...

<xs:complexType name="getCIsById">

<xs:sequence>
<xs:element name="cmdbContext" type="types:CmdbContext"/>
<xs:element minOccurs="0" name="CIsTypedProperties" type="props:TypedPropertiesCollection"/>
<xs:element name="IDs" type="types:IDs"/>
</xs:sequence>
</xs:complexType>
<xs:element name="getCIsById" type="queryparams:getCIsById"/>

 

<xs:schema ..... elementFormDefault="qualified" targetNamespace="http://schemas.hp.com/ucmdb/1/types">

<xs:complexType name="IDs">
<xs:sequence>
<xs:element maxOccurs="unbounded" name="ID" type="types:ID"/>
</xs:sequence>
</xs:complexType>

 

So the following works:

 

<queryparams:getCIsById>


<queryparams:cmdbContext>
<types:callerApplication>Test</types:callerApplication>
</queryparams:cmdbContext>

<queryparams:IDs>
<types:ID temp="false">4ae72d6c7de1536492db235be50766ad</types:ID>
</queryparams:IDs>

</queryparams:getCIsById>

 

 

 

View solution in original post

1 Reply
Highlighted
Absent Member.
Absent Member.

Re: getCIsById SOAP

Jump to solution

To answer my  own question,  it is because the target namespace is different:

<xs:schema ...  elementFormDefault="qualified" targetNamespace="http://schemas.hp.com/ucmdb/1/params/query">
...

<xs:complexType name="getCIsById">

<xs:sequence>
<xs:element name="cmdbContext" type="types:CmdbContext"/>
<xs:element minOccurs="0" name="CIsTypedProperties" type="props:TypedPropertiesCollection"/>
<xs:element name="IDs" type="types:IDs"/>
</xs:sequence>
</xs:complexType>
<xs:element name="getCIsById" type="queryparams:getCIsById"/>

 

<xs:schema ..... elementFormDefault="qualified" targetNamespace="http://schemas.hp.com/ucmdb/1/types">

<xs:complexType name="IDs">
<xs:sequence>
<xs:element maxOccurs="unbounded" name="ID" type="types:ID"/>
</xs:sequence>
</xs:complexType>

 

So the following works:

 

<queryparams:getCIsById>


<queryparams:cmdbContext>
<types:callerApplication>Test</types:callerApplication>
</queryparams:cmdbContext>

<queryparams:IDs>
<types:ID temp="false">4ae72d6c7de1536492db235be50766ad</types:ID>
</queryparams:IDs>

</queryparams:getCIsById>

 

 

 

View solution in original post

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.